Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traccar process not binding to IPv6 stack #143

Open
Kaldek opened this issue Oct 29, 2024 · 2 comments
Open

Traccar process not binding to IPv6 stack #143

Kaldek opened this issue Oct 29, 2024 · 2 comments

Comments

@Kaldek
Copy link

Kaldek commented Oct 29, 2024

Running the latest Docker image here, and while the container will happily take an IPv6 address, the Traccar service doesn't bind to the IPv6 stack.

/opt/traccar # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:xx:xx:xx:xx:71  
          inet addr:192.168.0.217  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2404:xxxx:xxxx::d00d:d00d/64 Scope:Global
          inet6 addr: fe80::1b:2100:xxxx:xxxx/64 Scope:Link
          inet6 addr: 2404:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1077 errors:0 dropped:0 overruns:0 frame:0
          TX packets:326 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:244656 (238.9 KiB)  TX bytes:74289 (72.5 KiB)

/opt/traccar # netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 127.0.0.11:37749        0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:5019            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:5018            0.0.0.0:*               LISTEN      

...SNIP...

tcp        0      0 192.168.0.217:8082      192.168.0.210:39680     TIME_WAIT   
tcp        0      0 192.168.0.217:8082      192.168.0.210:39718     ESTABLISHED 
tcp        0      0 192.168.0.217:8082      192.168.0.177:37100     ESTABLISHED 
udp        0      0 127.0.0.11:48705        0.0.0.0:*                           
udp        0      0 0.0.0.0:5001            0.0.0.0:*                           
udp        0      0 0.0.0.0:5002            0.0.0.0:*                           
udp        0      0 0.0.0.0:5003            0.0.0.0:*                           
udp        0      0 0.0.0.0:5004            0.0.0.0:*                           
udp        0      0 0.0.0.0:5005            0.0.0.0:*                           
udp        0      0 0.0.0.0:5008            0.0.0.0:*                           
udp        0      0 0.0.0.0:5009            0.0.0.0:*                           
udp        0      0 0.0.0.0:5013            0.0.0.0:*                           

... SNIP...

udp        0      0 0.0.0.0:5254            0.0.0.0:*                           
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ]         STREAM     CONNECTED     41382888

/opt/traccar # ps
PID   USER     TIME  COMMAND
    1 root      1:18 java -Xms1g -Xmx1g -Djava.net.preferIPv4Stack=true -jar tracker-server.jar conf/traccar.xml

Not sure if the Java execution command is the problem here as it says "preferred".

@Kaldek
Copy link
Author

Kaldek commented Oct 29, 2024

Alright this does look to be the problem (lots of Googling here; I'm not a Java guy). This "preferred" setting stops the use of IPv6.

@tananaev
Copy link
Member

@magna-z do you know why we need java.net.preferIPv4Stack=true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants