Can not bring up the traccar service on linux 64 ubuntu

jxu9 years ago

After the installation traccar 3.2

As root, I ran

$sudo /opt/traccar/bin/traccar start

service not up

$/opt/traccar/bin/traccar console

it shows
Running traccar...

wrapper  | --> Wrapper Started as Console
wrapper  | Java Service Wrapper Community Edition 64-bit 3.5.27
wrapper  |   Copyright (C) 1999-2015 Tanuki Software, Ltd. All Rights Reserved.
wrapper  |     http://wrapper.tanukisoftware.com
wrapper  | 
wrapper  | Launching a JVM...
jvm 1    | WrapperManager: Initializing...
jvm 1    | WrapperSimpleApp: 
jvm 1    | WrapperSimpleApp Error: Encountered an error running main:
jvm 1    | WrapperSimpleApp Error: java.lang.ClassNotFoundException: org.prosgresql.Driver
jvm 1    | WrapperSimpleApp Error: 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
jvm 1    | WrapperSimpleApp Error: 	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
jvm 1    | WrapperSimpleApp Error: 	at java.security.AccessController.doPrivileged(Native Method)
jvm 1    | WrapperSimpleApp Error: 	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
jvm 1    | WrapperSimpleApp Error: 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.Class.forName0(Native Method)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.Class.forName(Class.java:195)
jvm 1    | WrapperSimpleApp Error: 	at org.traccar.database.DataManager.initDatabase(DataManager.java:93)
jvm 1    | WrapperSimpleApp Error: 	at org.traccar.database.DataManager.<init>(DataManager.java:62)
jvm 1    | WrapperSimpleApp Error: 	at org.traccar.Context.init(Context.java:112)
jvm 1    | WrapperSimpleApp Error: 	at org.traccar.Main.main(Main.java:29)
jvm 1    | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
jvm 1    | WrapperSimpleApp Error: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.reflect.Method.invoke(Method.java:606)
jvm 1    | WrapperSimpleApp Error: 	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
jvm 1    | WrapperSimpleApp Error: 	at java.lang.Thread.run(Thread.java:745)
wrapper  | <-- Wrapper Stopped
Anton Tananaev9 years ago
  1. Why are you installing old version of Traccar?

  2. I can see that you are not using default config. Why you didn't mention it in the post?

  3. What are the changes in the config?

jxu9 years ago

we have instructions to install 3.2

after some work, we now fix the above problem but now we have new one

1)the configure file change only on the db side

<entry key="database.driver">org.postgresql.Driver</entry>
<entry key="database.url">jdbc:postgresql://10.0.110.70:5432/scoobra</entry>
<entry key="database.user">scoobra</entry>
<entry key="database.password">scoobra1</entry>

2)new error log, we use nping to verify the port , it is working, anything we need to change on postgres side to permit the connection from traccar.

Running traccar...
wrapper  | --> Wrapper Started as Console
wrapper  | Java Service Wrapper Community Edition 64-bit 3.5.27
wrapper  |   Copyright (C) 1999-2015 Tanuki Software, Ltd. All Rights Reserved.
wrapper  |     http://wrapper.tanukisoftware.com
wrapper  | 
wrapper  | Launching a JVM...
jvm 1    | WrapperManager: Initializing...
jvm 1    | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
jvm 1    | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.1 [built 16-June-2015 00:06:36 -0700; debug? true; trace: 10]
jvm 1    | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> z8kfsx9f1vathqu2eg5st|149544d, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> z8kfsx9f1vathqu2eg5st|149544d, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://10.0.110.70:5432/scoobra, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
jvm 1    | [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9f1vathqu2eg5st|149544d]-HelperThread-#0] WARN com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5bef330a -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
jvm 1    | [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9f1vathqu2eg5st|149544d]-HelperThread-#1] WARN com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@684a25ab -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
jvm 1    | [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9f1vathqu2eg5st|149544d]-HelperThread-#2] WARN com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@c4a6572 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
jvm 1    | org.postgresql.util.PSQLException: Connection to 10.0.110.70:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
jvm 1    | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:247)
jvm 1    | 	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
jvm 1    | 	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:149)
jvm 1    | 	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:35)
jvm 1    | 	at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
jvm 1    | 	at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:47)
jvm 1    | 	at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:30)
jvm 1    | 	at org.postgresql.Driver.makeConnection(Driver.java:414)
jvm 1    | 	at org.postgresql.Driver.connect(Driver.java:282)
jvm 1    | 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
jvm 1    | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
jvm 1    | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
jvm 1    | 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
jvm 1    | 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
jvm 1    | Caused by: java.net.ConnectException: Connection refused
jvm 1    | 	at java.net.PlainSocketImpl.socketConnect(Native Method)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
jvm 1    | 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
jvm 1    | 	at java.net.Socket.connect(Socket.java:579)
jvm 1    | 	at org.postgresql.core.PGStream.<init>(PGStream.java:61)
jvm 1    | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:129)
jvm 1    | 	... 17 more
jvm 1    | org.postgresql.util.PSQLException: Connection to 10.0.110.70:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
jvm 1    | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:247)
jvm 1    | 	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
jvm 1    | 	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:149)
jvm 1    | 	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:35)
jvm 1    | 	at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
jvm 1    | 	at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:47)
jvm 1    | 	at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:30)
jvm 1    | 	at org.postgresql.Driver.makeConnection(Driver.java:414)
jvm 1    | 	at org.postgresql.Driver.connect(Driver.java:282)
jvm 1    | 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
jvm 1    | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
jvm 1    | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
jvm 1    | 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
jvm 1    | 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
jvm 1    | 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
jvm 1    | Caused by: java.net.ConnectException: Connection refused
jvm 1    | 	at java.net.PlainSocketImpl.socketConnect(Native Method)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
jvm 1    | 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
jvm 1    | 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
jvm 1    | 	at java.net.Socket.connect(Socket.java:579)
jvm 1    | 	at org.postgresql.core.PGStream.<init>(PGStream.java:61)
jvm 1    | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:129)
jvm 1    | 	... 17 more
jvm 1    | org.postgresql.util.PSQLException: Connection to 10.0.110.70:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Anton Tananaev9 years ago

Clearly the problem is with connection to the server now.

jxu9 years ago

do u happen to know what should be done on postgres side?

Anton Tananaev9 years ago

Unfortunately no. Is postrgesql located on the same machine? If yes, you should use localhost instead of network ip address.

jxu9 years ago

i tried that , not working,any other suggestion?

Anton Tananaev9 years ago

You can try to use any JDBC viewer to connect to the database to test the connection. I guess there is some config problem.

jxu9 years ago

sorry for spam email.

which jdbc viewer you will recommend?

thanks

Anton Tananaev9 years ago

For example you can try open source SQuirreL SQL.