check
sudo service traccar status
It says:
root@iplaner:/home/wojciech# service traccar status
● traccar.service - traccar
Loaded: loaded (/etc/systemd/system/traccar.service; enabled)
Active: active (running) since pią 2020-12-18 12:51:13 CET; 969ms ago
Main PID: 12563 (java)
CGroup: /system.slice/traccar.service
└─12563 /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
gru 18 12:51:13 iplaner.pl systemd[1]: Started traccar.
gru 18 12:51:14 iplaner.pl traccar[12563]: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The drive...nnecessary.
Hint: Some lines were ellipsized, use -l to show in full.
And service tracar status -l says:
root@iplaner:/home/wojciech# service traccar status -l
● traccar.service - traccar
Loaded: loaded (/etc/systemd/system/traccar.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since pią 2020-12-18 12:52:14 CET; 2s ago
Process: 13526 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml (code=exited, status=1/FAILURE)
Main PID: 13526 (code=exited, status=1/FAILURE)
gru 18 12:52:14 iplaner.pl systemd[1]: Unit traccar.service entered failed state.
root@iplaner:/home/wojciech#
But website is still running.
show
traccar.xml
Interestingly i can see traccar log as well. it keeps repeating:
2020-12-18 13:00:55 INFO: HikariPool-1 - Starting...
2020-12-18 13:00:55 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-12-18 13:00:56 ERROR: HikariPool-1 - Exception during pool initialization. - Malformed database URL, failed to parse the main URL sections. - WrongArgumentException (... < DataManager:139 < *:89 < Context:292 < Main:137 < ...)
2020-12-18 13:00:56 ERROR: Main method error - Malformed database URL, failed to parse the main URL sections. - WrongArgumentException (... < DataManager:139 < *:89 < Context:292 < Main:137 < ...)
2020-12-18 13:01:07 INFO: HikariPool-1 - Starting...
My config looks like this:
<?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>
<!--
This is the main configuration file. All your configuration parameters should be placed in this file.
Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
remove "config.default" parameter from this file unless you know what you are doing.
For list of available parameters see following page: https://www.traccar.org/configuration-file/
-->
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql:./data/database?serverTimezone=UTC&</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>
</properties>
I guess my timezone should be CET as well?
did you do mysql database for traccar ?
witch ver traccar did you install ?
It worked since i installed it. I haven't touched mysql for that.
I belive traccar 4, installed in september 2020 - i acutally updated older version
your config looks wrong
correct for h2 database
<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:./data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>
for mysql
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'>your_password</entry>
witch database do you use ?
im using mysql.
checked if mysql user has access to that database and confirmed.
after modyfing the mysql entry, stopping service and starting it, i get this status:
root@iplaner:/opt/traccar/conf# service traccar status
● traccar.service - traccar
Loaded: loaded (/etc/systemd/system/traccar.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since pią 2020-12-18 13:34:11 CET; 2s ago
Process: 26197 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml (code=exited, status=1/FAILURE)
Main PID: 26197 (code=exited, status=1/FAILURE)
gru 18 13:34:11 iplaner.pl systemd[1]: Unit traccar.service entered failed state.
Can i change to H2 ? I don't care about historial data, just need the service to be running.
just use config for h2 database
read this if you want use mysql
to choose h2 i use that stock config without password for user ?
yes
ok, i manged to get it runing, but now i cant login.
DO i need to recreate users? Where do I add them if this is H2 database instead of Mysql ?
try
admin
admin
World!
How do i import devices, users etc?
Hi,
traccar is a great tool, but yesterday around 5:38am my server stopped receiving any data from Teltonika devices.
I have restarted the service - no change,
I have testing if port is open - it's open
I have checked /opt/traccar/logs - this folder is empty
How can i troubleshoot why did the data stop coming in ?
Help !
Regards,