Issue starting up

Trike8 years ago

Hello everyone.
Sorry for the question but I've checked before write and I doesn't find anything.

root@hostname:/# uname -a
Linux hostname 4.4.0-1013-aws #22-Ubuntu SMP Fri Mar 31 15:41:31 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I've installed java, mysql, phpmyadmin for checking mysql faster


root@hostname:/# java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

and configured the database connection in /opt/traccar/conf/traccar.xml



  <entry key="config.default">./conf/default.xml</entry>

    <entry key='database.driver'>com.mysql.Driver</entry>
    <entry key='database.datasource'>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar</entry>
    <entry key='database.user'>[real username]</entry>
    <entry key='database.password'>[password for that username]</entry>

when I try to test, I get an error without any logs and or informations


 /opt/traccar/bin/startDaemon.sh
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-stable-12.08
OS   : Linux/4.4.0-1013-aws/amd64
JVM  : Oracle Corporation/9-internal//usr/lib/jvm/java-9-openjdk-amd64/64
************* STARTING traccar ***********************

[waiting a little time here]

Service traccar NOT started

or, more compact


/etc/init.d/traccar start
Starting traccar ...
YAJSW: yajsw-stable-12.08
OS   : Linux/4.4.0-1013-aws/amd64
JVM  : Oracle Corporation/9-internal//usr/lib/jvm/java-9-openjdk-amd64/64
************* STARTING traccar ***********************

Service traccar NOT started

in the db named traccar I've no tables created.
sorry for the bad/silly questions but I can't fix the issue

Trike8 years ago

Solved (partialy, but unlock the situation)

instead of /etc/init.d traccar start use java -jar tracker-server.jar conf/traccar.xml

it would provide the errors on the screen

Anton Tananaev8 years ago

The issue is likely because you are using Java 9 which is a preview version and is not ready for production.

Trike8 years ago
 java -jar tracker-server.jar conf/traccar.xml
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
INFO 4/19/17, 11:39 PM: liquibase: Clearing database change log checksums
INFO 4/19/17, 11:39 PM: liquibase: Successfully acquired change log lock
INFO 4/19/17, 11:39 PM: liquibase: Successfully released change log lock
INFO 4/19/17, 11:39 PM: liquibase: Successfully acquired change log lock
INFO 4/19/17, 11:39 PM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO 4/19/17, 11:39 PM: liquibase: Successfully released change log lock
Exception in thread "main" java.lang.NullPointerException
        at org.traccar.database.DeviceManager.getAllGroups(DeviceManager.java:321)
        at org.traccar.database.PermissionsManager.refreshPermissions(PermissionsManager.java:127)
        at org.traccar.database.PermissionsManager.<init>(PermissionsManager.java:92)
        at org.traccar.Context.init(Context.java:276)
        at org.traccar.Main.main(Main.java:35)

is this related to java 9 too ?

I'm testing the platform, I can obliterate the virtual machine and start back with different software if needed.

Anton Tananaev8 years ago

This look like an issue with data in the database.

Trike8 years ago

I've cleaned the database and launched set-up again

/opt/traccarjava -jar tracker-server.jar conf/traccar.xml
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
INFO 4/20/17, 7:36 AM: liquibase: Clearing database change log checksums
INFO 4/20/17, 7:36 AM: liquibase: Successfully acquired change log lock
INFO 4/20/17, 7:36 AM: liquibase: Successfully released change log lock
INFO 4/20/17, 7:36 AM: liquibase: Successfully acquired change log lock
INFO 4/20/17, 7:36 AM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO 4/20/17, 7:36 AM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO 4/20/17, 7:36 AM: liquibase: ./schema/changelog-master.xml: changelog-3.8::changelog-3.8-dropuniquetoken::author: Change set changelog-3.8::changelog-3.8-dropuniquetoken::author failed, but failOnError was false.  Error: Can't DROP 'uk_user_token'; check that column/key exists [Failed SQL: ALTER TABLE traccar.users DROP KEY uk_user_token]
INFO 4/20/17, 7:36 AM: liquibase: Successfully released change log lock

and stuck here.

if I check the log

2017-04-20 07:32:32  INFO: Operating system name: Linux version: 4.4.0-1013-aws architecture: amd64
2017-04-20 07:32:32  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 9-internal+0-2016-04-14-195246.buildd.src
2017-04-20 07:32:32  INFO: Memory limit heap: 239mb non-heap: 0mb
2017-04-20 07:32:32  INFO: Character encoding: UTF-8 charset: UTF-8
2017-04-20 07:32:32  INFO: Version: 3.11-SNAPSHOT
2017-04-20 07:32:46  INFO: Starting server...
2017-04-20 07:36:26  INFO: Shutting down server...

i realy don't understand. Is it better to downgrade java to 8 or 7 ?

Anton Tananaev8 years ago

You definitely should not use Java 9. It's a preview version.

Trike8 years ago

many thanks. With Java 8 it started.
now the server is online but I can't see position of the smartphone app.

https://www.traccar.org/troubleshooting/

I don't see the Hex in the log
the log is already enabled to "all"
The Server is visible from the Internet. Used port check tool to verify.

is the standard port 5055 ok for the app ?

Anton Tananaev8 years ago

Yes, port is 5055. Check status screen in the app.

Trike8 years ago
netstat -l

tcp6       0      0 [::]:5055               [::]:*                  LISTEN
https://www.traccar.org/port-check/

Port is open

in the server log I've no HEX
in the app I've only

service created
connection changed
Anton Tananaev8 years ago

If you don't see location update on the status screen in the app, it means that your phone doesn't have a location. Possibly location is disabled or phone just can't get a fix.

Trike8 years ago

Many thanks, I move to checking the server into checking the phone :)