Which version of Java required for the Traccar Latest version in Linux?

Wasim Ahmed3 years ago

Software version I have installed as below:
OS: Ubuntu 18.04
Traccar: traccar-linux-64-4.6
Java: Java 1.8.0_05

When I run this URL http://35.231.79.23:8082
The connection with the database got stablished and tables are created, but not loading the Login screen of Traccar on the browser.

Thanks in Advance!!

Wasim Ahmed3 years ago

This is the traccar.xml file: (I have put dummy username and password here only, it's correct on the live server)

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

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

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
    <entry key='database.url'>jdbc:mysql://localhost:3306/traccardb1?serverTimezone=UTC&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>username</entry> 
    <entry key='database.password'>mypassword</entry>
</properties>
Omar Asim3 years ago

Dear Wasim,

Kindly show your traccar log, that would be helpful to find any errors.

Anton Tananaev3 years ago

You don't need any Java. Traccar comes with its own Java.

Wasim Ahmed3 years ago

Hi Anton,
It means I can uninstall the Java which I installed, and then Traccar will start running?
Maybe it conflicts with the Java which I installed?

Wasim Ahmed3 years ago

Hi Omar,
tracker-server.log file as below:

2019-09-13 04:25:02  INFO: Shutting down server...
2019-09-13 04:25:09  INFO: HikariPool-1 - Starting...
2019-09-13 04:25:09  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2019-09-13 04:25:10  INFO: HikariPool-1 - Start completed.
2019-09-13 04:25:11  INFO: Clearing database change log checksums
2019-09-13 04:25:11  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOGLOCK
2019-09-13 04:25:11  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOGLOCK
2019-09-13 04:25:11  INFO: SELECT `LOCKED` FROM traccardb1.DATABASECHANGELOGLOCK WHERE ID=1
2019-09-13 04:25:11  INFO: Successfully acquired change log lock
2019-09-13 04:25:11  INFO: SELECT MD5SUM FROM traccardb1.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2019-09-13 04:25:11  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = NULL
2019-09-13 04:25:11  INFO: Successfully released change log lock
2019-09-13 04:25:11  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOGLOCK
2019-09-13 04:25:11  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOGLOCK
2019-09-13 04:25:11  INFO: SELECT `LOCKED` FROM traccardb1.DATABASECHANGELOGLOCK WHERE ID=1
2019-09-13 04:25:11  INFO: Successfully acquired change log lock
2019-09-13 04:25:14  INFO: SELECT MD5SUM FROM traccardb1.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2019-09-13 04:25:14  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOG
2019-09-13 04:25:14  INFO: Reading from traccardb1.DATABASECHANGELOG
2019-09-13 04:25:14  INFO: SELECT * FROM traccardb1.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:d59fa93049c031a8bcfbc02958c1942c' WHERE ID = 'changelog-4.0-clean' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:1adabae3238e02ccc97cc422359a58a0' WHERE ID = 'changelog-4.0-clean-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:e1ddbe83e1ecf856a912755fc118f82e' WHERE ID = 'changelog-3.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:191c21d8f0f921845cf93bbc9d0639b9' WHERE ID = 'changelog-3.10-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:ad1f63566e8d08812fbf0b93a118ef6e' WHERE ID = 'changelog-3.10-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:127b36b9d32a9d236df51d19b18c3766' WHERE ID = 'changelog-3.7-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:7800f890b9706a480bd5a79b591b6ca7' WHERE ID = 'changelog-3.11' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.11'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:5ce520811d626ad325a014b9fcbb1a13' WHERE ID = 'changelog-3.12' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:a3bf7fabcde29e106fe2f89829a76a84' WHERE ID = 'changelog-3.12-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:cfc881bd2dadb561aa9c1a467bc8cc1c' WHERE ID = 'changelog-3.12-pgsql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:1be7e6c0520f8be53ef1b099d96afba5' WHERE ID = 'changelog-3.14' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.14'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:ac8ccec176027e98bbf45dc6c15d9b05' WHERE ID = 'changelog-3.15' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.15'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:b59407d70bfe9bf57bc9968adfbbdf1c' WHERE ID = 'changelog-3.16' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.16'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:3f14c3b08068eb7628d0d3e2941eb2d3' WHERE ID = 'changelog-3.3-admin' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.17'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:8aa3e56afe6ba86cd004fa801507bc28' WHERE ID = 'changelog-3.17' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.17'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:3974bfe5a2e962c0cd663433c832c16a' WHERE ID = 'changelog-4.0-pre' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:65fb49c5be37693183708351c507dd50' WHERE ID = 'changelog-4.0-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:9831511507d8ae1d6759c8ccf506a27a' WHERE ID = 'changelog-4.0-pg' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:ac63c4153f5b2ee5c7a07056da269571' WHERE ID = 'changelog-4.0' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:90aedfa378aa717f8d8ae541f97b87b2' WHERE ID = 'changelog-4.0-renaming' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2019-09-13 04:25:15  INFO: UPDATE traccardb1.DATABASECHANGELOG SET MD5SUM = '8:b148f52efe9c6a3e74a56e33e257a3e2' WHERE ID = 'changelog-4.1-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.1'
2019-09-13 04:25:15  INFO: SELECT COUNT(*) FROM traccardb1.DATABASECHANGELOG
2019-09-13 04:25:15  INFO: Reading from traccardb1.DATABASECHANGELOG
2019-09-13 04:25:15  INFO: SELECT * FROM traccardb1.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2019-09-13 04:25:15  INFO: Successfully released change log lock
2019-09-13 04:25:15  INFO: Logging initialized @7276ms to org.eclipse.jetty.util.log.Slf4jLog
2019-09-13 04:25:16  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2019-09-13 04:25:17  INFO: Operating system name: Linux version: 4.15.0-1040-gcp architecture: amd64
2019-09-13 04:25:17  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 11.0.4-ojdkbuild+11
2019-09-13 04:25:17  INFO: Memory limit heap: 893mb non-heap: 0mb
2019-09-13 04:25:17  INFO: Character encoding: UTF-8 charset: UTF-8
2019-09-13 04:25:17  INFO: Version: 4.6
2019-09-13 04:25:17  INFO: Starting server...
2019-09-13 04:25:17  INFO: jetty-9.4.20.v20190813; built: 2019-08-13T21:28:18.144Z; git: 84700530e645e812b336747464d6fbbf370c9a20; jvm 11.0.4-ojdkbuild+11
2019-09-13 04:25:17  INFO: Started o.t.w.@72af90e8{/,null,AVAILABLE}
2019-09-13 04:25:17  INFO: DefaultSessionIdManager workerName=node0
2019-09-13 04:25:17  INFO: No SessionScavenger set, using defaults
2019-09-13 04:25:17  INFO: node0 Scavenging every 660000ms
2019-09-13 04:25:19  INFO: Started o.e.j.s.ServletContextHandler@1a819901{/,null,AVAILABLE}
2019-09-13 04:25:19  INFO: Started ServerConnector@2016f509{HTTP/1.1,[http/1.1]}{0.0.0.0:8082}
2019-09-13 04:25:19  INFO: Started @11039ms
Omar Asim3 years ago

Dear Wasim,

Which version of Java have you installed ?

For running Traccar you have to install Java Offline Version, after that you install Traccar.

I dont feel like there is any issue as no issue is being shown over the logs, everything is normal.

For installing Java offline version :-

  1. Go to java.com
  2. Search for other versions
  3. Select Java Offline ( If your system is 32Bit then go for it else go for 64Bit )
  4. After installation restart the Traccar service and it should work without any conflict if facing.
Wasim Ahmed3 years ago

Dear Omar,
I have installed Java version 1.8.0_05 on the system manually, but I think this version is not compatible with Traccar.
Do you know which version of Java is compatible with Traccar? (Any link please)
Or there is no need of Java Installation, as Traccar comes with its own java.

Omar Asim3 years ago

Dear Wasim,

Sorry for the late reply, I'm attaching a link below for the java version.

https://www.java.com/en/download/manual.jsp

Please go to this link and download the version from the Linux list that suits your system.

Anton Tananaev3 years ago

You don't need to download Java. As I said, Traccar installer already comes with it.

Wasim Ahmed3 years ago

I'm trying to start the traccar service by this command: sudo service traccar start (is it correct?)

And when I try with this command: sudo /opt/traccar/bin/startDaemon.sh
it says: command not found
and there is no "bin" directory inside the traccar directory.

Wasim Ahmed3 years ago

Please overlook the above comment. The command which I was trying was for the older version of traccar.

Omar Asim3 years ago

Wasim,

Please try this command to run the traccar service.

sudo systemctl start traccar.service

let me know the results.