Unable to connect to Traccar

Maurizio Panzica2 years ago

Hello,

My Traccar installation is running on Ubuntu 22.04.
Unfortunately I can connect to the web interface from the local box only.
I can't connect to Traccar neither from any other PC in my network nor - obviously - from outside.
The netstat -tlnp command shows the following output:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      803/mysqld
tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN      605/Agent
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      461/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      738/sshd: /usr/sbin
tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN      803/mysqld
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      719/cupsd
tcp6       0      0 :::8082                 :::*                    LISTEN      731/java
tcp6       0      0 ::1:631                 :::*                    LISTEN      719/cupsd
tcp6       0      0 :::22                   :::*                    LISTEN      738/sshd: /usr/sbin
tcp6       0      0 :::5093                 :::*                    LISTEN      731/java

So both 8082 and 5093 ports are listening, but only on TCP6.
The service status looks as follows:

● traccar.service - traccar
     Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-12-03 08:06:18 CET; 1h 32min ago
   Main PID: 731 (java)
      Tasks: 34 (limit: 4409)
     Memory: 248.6M
        CPU: 42.528s
     CGroup: /system.slice/traccar.service
             └─731 /usr/bin/java -jar tracker-server.jar /etc/opt/traccar.conf

Please note that everything used to work fine until a few days ago.
Since I haven't used my bike for a while I didn't realized until this morning that it was not working anymore.
I have also updated to 5.5 just in case, but nothing has changed.
Is there anything that I am missing?

Thank you in advance.
M.

Track-trace2 years ago

Meaby firewall on local box or router setting ?

Able to ping the local box ip from other pc on local network ?

Maurizio Panzica2 years ago

Can't be the firewall.

root@MINIS-N40:/home/maurizio# ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)

and the box replies to pings:

C:\Windows\System32>ping 192.168.178.188

Pinging 192.168.178.188 with 32 bytes of data:
Reply from 192.168.178.188: bytes=32 time=312ms TTL=64
Reply from 192.168.178.188: bytes=32 time=17ms TTL=64
Reply from 192.168.178.188: bytes=32 time=235ms TTL=64
Reply from 192.168.178.188: bytes=32 time=133ms TTL=64

Ping statistics for 192.168.178.188:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 17ms, Maximum = 312ms, Average = 174ms

Running out of ideas...

Anton Tananaev2 years ago

Must be some network problem. If you see ports open in Traccar, it should accept connection and data.

As for tcp6, I believe it should be dual stack, so it means both v4 and v6.

Track-trace2 years ago

@Maurizio Panzica

I also run my traccar server on same ubuntu server and netstat -tlnp looks the same

Meaby you should allow port 5093 and 8082 in your uwf also since i only see port 22 allowed in your uwf.

A simple test would be to shutdown your traccar server and just install a clean traccar server in another directory, create its own database and run it on the same ports to test it with that default config etc.

Maurizio Panzica2 years ago

@Track-trace

Oh stupid me! Sure it was the local firewall. I was so upset that the system all of sudden didn't work anymore that I didn't notice the firewall status was active. But I didn't change anything! I don't need a fw on my local box so I have never activated it myself. Some recent update must have enabled it by default.
Disabling the fw solved the problem, of course.
Thank you for pointing me in the right direction.

Cheers.