VPS install Traccar problem

Alex3 years ago

Hello!
I try to start "service traccar start"

And got the

Loaded: loaded (/etc/systemd/sgstem/traccar.service: enabled: vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Hed 2021-11-17 14:03:10 UTC: as ago
Process: 32609 ExecStart=/opt/traccar/Jrelb1n/Java -Jar tracker-server.Jar conf/traccar.xm1 L:_--
Main PID: 32609 (code=ex1ted, status=1/FAILURE)

My config

<?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/traccar?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>traccar_user</entry>
    <entry key='database.password'>7rights</entry>
</properties>
Anton Tananaev3 years ago

You need to provide error details.

Alex3 years ago

What kind of error deail?

Anton Tananaev3 years ago

Error message and stack trace.

Alex3 years ago

Ubuntu 20.04, LAMP
I follow your instruction on traccar https://www.traccar.org/install-digitalocean/

https://prnt.sc/1zxhr63

Anton Tananaev3 years ago

If you access full systemd log it might have more information. Again, we would need to see the error details. The information you provided so far doesn't help to determine the cause. It just says that it fails, but not why.

Alex3 years ago
2021-11-17 17:39:59  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-11-17 17:40:04 ERROR: HikariPool-1 - Exception during pool initialization. - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:04 ERROR: Main method error - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:15  INFO: HikariPool-1 - Starting...
2021-11-17 17:40:16  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-11-17 17:40:21 ERROR: HikariPool-1 - Exception during pool initialization. - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:21 ERROR: Main method error - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:32  INFO: HikariPool-1 - Starting...
2021-11-17 17:40:33  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-11-17 17:40:38 ERROR: HikariPool-1 - Exception during pool initialization. - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:38 ERROR: Main method error - Connection refused (Connection refused) - ConnectException (... < DataManager:130 < *:89 < Context:290 < Main:120 < ...)
2021-11-17 17:40:49  INFO: HikariPool-1 - Starting...
Anton Tananaev3 years ago

The error means that the database is not accessible.

Alex3 years ago

I follow your instruction
What I need to do?

Slawek3 years ago

You can try this script

Use Reset MySQL script
Default make user/password root/root if you want change read instruction

https://www.traccar.org/forums/topic/mysql-server-scripts/

Anton Tananaev3 years ago

You need to figure our why database is not accessible. There's plenty of documentation on MySQL online.

Macan3 years ago

Try instead of localhost to use 127.0.0.1