Traccar Service on Ubuntu 16.04 Error

iawad8 years ago

Dear,
I need your assistance in this, I will tell you the steps that I have followed and where I'm stuck right now.

    1. Setup MySQL - Created an empty database. 2. Downloaded Latest traccar version. 3. Installed Latest Java and added it to environment variables and PATH. 4. Setup Traccar. 5. Configured Traccar to sue MySQL. 6. Made sure that the service is installed successfully.
Now, When I open MySQL, I can see that the database is still empty, no tables were created, I suspected that the database configurations are not correct in traccar.xml, but it actually was correct and I tested it. next thing I opened Traccar logs to see what is happening and found this:

WARNING|wrapper|Service traccar|16-11-24 12:43:43|YAJSW: yajsw-beta-12.07
WARNING|wrapper|Service traccar|16-11-24 12:43:43|OS   : Linux/4.4.0-47-generic/amd64
WARNING|wrapper|Service traccar|16-11-24 12:43:43|JVM  : Oracle Corporation/1.8.0_111//usr/lib/jvm/java-8-oracle/jre/64
INFO|wrapper|Service traccar|16-11-24 12:43:44|exec:"java" "-classpath" "/opt/traccar/wrapperApp.jar:/opt/traccar/tracker-server.jar:/opt/traccar/lib/log4j-1.2.17.jar:/opt/traccar/lib/joda-time-2.9.6.jar:/opt/traccar/lib/h2-1.4.193.jar:/opt/traccar/lib/mysql-connector-java-5.1.40.jar:/opt/traccar/lib/postgresql-9.4.1212.jre7.jar:/opt/traccar/lib/mssql-jdbc-6.1.0.jre7.jar:/opt/traccar/lib/HikariCP-java7-2.4.9.jar:/opt/traccar/lib/slf4j-api-1.7.21.jar:/opt/traccar/lib/netty-3.10.6.Final.jar:/opt/traccar/lib/async-http-client-1.9.40.jar:/opt/traccar/lib/slf4j-simple-1.7.21.jar:/opt/traccar/lib/javax.json-1.0.4.jar:/opt/traccar/lib/jetty-server-9.2.19.v20160908.jar:/opt/traccar/lib/javax.servlet-api-3.1.0.jar:/opt/traccar/lib/jetty-http-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-io-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-servlet-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-security-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-webapp-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-xml-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-jndi-9.2.19.v20160908.jar:/opt/traccar/lib/jetty-util-9.2.19.v20160908.jar:/opt/traccar/lib/websocket-server-9.2.19.v20160908.jar:/opt/traccar/lib/websocket-common-9.2.19.v20160908.jar:/opt/traccar/lib/websocket-api-9.2.19.v20160908.jar:/opt/traccar/lib/websocket-client-9.2.19.v20160908.jar:/opt/traccar/lib/websocket-servlet-9.2.19.v20160908.jar:/opt/traccar/lib/jersey-container-servlet-2.24.jar:/opt/traccar/lib/jersey-container-servlet-core-2.24.jar:/opt/traccar/lib/javax.inject-2.5.0-b05.jar:/opt/traccar/lib/jersey-common-2.24.jar:/opt/traccar/lib/javax.annotation-api-1.2.jar:/opt/traccar/lib/jersey-guava-2.24.jar:/opt/traccar/lib/hk2-api-2.5.0-b05.jar:/opt/traccar/lib/hk2-utils-2.5.0-b05.jar:/opt/traccar/lib/aopalliance-repackaged-2.5.0-b05.jar:/opt/traccar/lib/hk2-locator-2.5.0-b05.jar:/opt/traccar/lib/javassist-3.20.0-GA.jar:/opt/traccar/lib/osgi-resource-locator-1.0.1.jar:/opt/traccar/lib/jersey-server-2.24.jar:/opt/traccar/lib/jersey-client-2.24.jar:/opt/traccar/lib/jersey-media-jaxb-2.24.jar:/opt/traccar/lib/validation-api-1.1.0.Final.jar:/opt/traccar/lib/javax.ws.rs-api-2.0.1.jar:/opt/traccar/lib/jersey-media-json-jackson-2.24.jar:/opt/traccar/lib/jersey-entity-filtering-2.24.jar:/opt/traccar/lib/jackson-jaxrs-base-2.5.4.jar:/opt/traccar/lib/jackson-core-2.5.4.jar:/opt/traccar/lib/jackson-databind-2.5.4.jar:/opt/traccar/lib/jackson-jaxrs-json-provider-2.5.4.jar:/opt/traccar/lib/jackson-module-jaxb-annotations-2.5.4.jar:/opt/traccar/lib/jackson-annotations-2.5.4.jar:/opt/traccar/lib/liquibase-core-3.5.3.jar:/opt/traccar/lib/snakeyaml-1.17.jar:/opt/traccar/lib/mail-1.4.7.jar:/opt/traccar/lib/activation-1.1.jar:/opt/traccar/lib/jxls-2.3.0.jar:/opt/traccar/lib/commons-jexl-2.1.1.jar:/opt/traccar/lib/commons-logging-1.1.1.jar:/opt/traccar/lib/commons-beanutils-1.9.2.jar:/opt/traccar/lib/commons-collections-3.2.1.jar:/opt/traccar/lib/jcl-over-slf4j-1.7.12.jar:/opt/traccar/lib/logback-core-1.1.3.jar:/opt/traccar/lib/jxls-poi-1.0.11.jar:/opt/traccar/lib/poi-3.14.jar:/opt/traccar/lib/commons-codec-1.10.jar:/opt/traccar/lib/poi-ooxml-3.14.jar:/opt/traccar/lib/poi-ooxml-schemas-3.14.jar:/opt/traccar/lib/xmlbeans-2.6.0.jar:/opt/traccar/lib/stax-api-1.0.1.jar:/opt/traccar/lib/curvesapi-1.03.jar" "-Dfile.encoding=UTF-8" "-Xrs" "-Dwrapper.service=true" "-Dwrapper.console.visible=false" "-Dwrapper.port=15003" "-Dwrapper.key=-6379278849056210553" "-Dwrapper.teeName=-6379278849056210553$1479987823693" "-Dwrapper.tmp.path=/opt/traccar/tmp" "-Djna_tmpdir=/opt/traccar/tmp" "-Dwrapper.config=/opt/traccar/conf/wrapper.conf" "-Dwrapper.visible=false" "-Dwrapper.pidfile=/run/wrapper.traccar.pid" "org.rzo.yajsw.app.WrapperJVMMain" 
INFO|wrapper|Service traccar|16-11-24 12:43:44|posix_spawn pid 21829
INFO|wrapper|Service traccar|16-11-24 12:43:44|started process 21829
INFO|wrapper|Service traccar|16-11-24 12:43:44|started process with pid 21829
INFO|21829/0|Service traccar|16-11-24 12:43:45|[INFO] StandardFileSystemManager - Using "/tmp/vfs_cache" as temporary files store.
INFO|21829/0|Service traccar|16-11-24 12:43:46|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO|21829/0|Service traccar|16-11-24 12:43:46|Thu Nov 24 12:43:46 CET 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

and then I wanted to check on the service itself, so I ran the command

service traccar status
and found this

traccar.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

I would really appreciate your help on this one.

iawad8 years ago

Guys, no need to do anything, I fixed the issue by installing version 3.7 .

Anton Tananaev8 years ago

That's not really a fix. I would recommend to install the latest release.

negamkpk8 years ago

could you please share traccar.xml file to utrack.in@gmail.com.it will help ful for me to learn about mysql configuration.

iawad8 years ago

Guys, the latest version has a very small traccar.xml file, no entries for anything but the database configuration, and I mean the four lines only.

Anton Tananaev8 years ago

We are aware of that. What's your question?

iawad8 years ago

I was supposed to create the database, and traccar was supposed to create the tables inside of it by default. That didn't happen, and there were no error messages at all in the logs, like nothing was happening. I changed back to the older version and it worked like a charm.

Anton Tananaev8 years ago

I suspect that you have removed something that you shouldn't have removed from the config. Specifically "config.default" parameter.

iawad8 years ago

No I've not. Have you tested installing the latest version on this ubuntu version ?

Anton Tananaev8 years ago

Yes, most of the demo servers run on Ubuntu. I had no problems installing Traccar there.

iawad8 years ago

Dear Anton,
Since you're sure about this, I will test it again on another server of mine running the same version of ubuntu and tell you how it goes.

Anton Tananaev8 years ago

If it doesn't work, send me your config file.