Traccar shows connection refused and dones't work

Jose Rodriguez3 years ago

Hi all.

Suddenly my traccar web does not work. I restarted the service but it does not start correctly. I upgraded to 4.15, upgraded packages of Debian 11 but nothing works.

The systemctl status traccar only shows:

● traccar.service - traccar
     Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2022-01-22 20:52:54 CET; 975ms ago
    Process: 3682 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml (code=exited, status=1/FAILURE)
   Main PID: 3682 (code=exited, status=1/FAILURE)
        CPU: 3.043s

and the log shows only:

2022-01-22 20:54:00  INFO: HikariPool-1 - Starting...
2022-01-22 20:54:06 ERROR: HikariPool-1 - Exception during pool initialization. - Conexión rehusada (Connection refused) - ConnectException (... < DataManager:131 < *:90 < Context:298 < Main:120 < ...)
2022-01-22 20:54:06 ERROR: Main method error - Conexión rehusada (Connection refused) - ConnectException (... < DataManager:131 < *:90 < Context:298 < Main:120 < ...)

If I access to MySQL (MariaDB) with mysql -u traccar_user -p I can access to database and see registers. All, traccar and MariaDB are on same server.

Does anyone any idea of what is happening?

Thanks.

Anton Tananaev3 years ago

Can you access the database like this?

mysql -h 127.0.0.1 -u traccar_user -p
Jose Rodriguez3 years ago

Hi Anton.

No, I can't... using mysql -u traccar_user -p I can, but specifing the host no...

The SELECT user,host from user in DB mysql gives me that the user traccar_user@localhost exists

Anton Tananaev3 years ago

That means MySQL is not configured to listen for a network connection. You have to enable it.

Jose Rodriguez3 years ago

You open my eyes, I went to my.cnf and I've edited it this week to ingress to MySQL from my LAN and added bind-address 192.168.0.x maintaining bind-address 127.0.0.1 in the line before. I commented the bind-address 192.168.0.x and now I can access by mysql -h 127.0.0.1 -u traccar_user -p but the web still not working.