WaterLemons2k / Docker-ddns-go

Minimal Docker Image for ddns-go
https://hub.docker.com/r/waterlemons2k/ddns-go
MIT License
1 stars 0 forks source link

web ui only listen ipv6 address #1

Open Wanxp opened 3 days ago

Wanxp commented 3 days ago

problem: can not visit web ui from http://ip:9876

ubuntu: 24.04 docker: 27.3.1 start cmd

docker run -d --name ddns-go --restart=always --net=host -v /opt/ddns-go:/root waterlemons2k/ddns-go

result:

netstat -nlp | grep 9876

out put

tcp6       0      0 :::9876                 :::*                    LISTEN      80686/ddns-go       
WaterLemons2k commented 3 days ago

problem: can not visit web ui from http://ip:9876/

I think it might be a firewall issue, check ufw or something. And make sure you can connect to it with curl on the host first:

curl -v localhost:9876

net.Listen will listen on both IPv4 and IPv6, as this app uses the tcp network: https://github.com/jeessy2/ddns-go/blob/v6.7.6/main.go#L197

Also a common problem in Go: golang/go#9334 golang/go#17615 golang/go#48723 hashicorp/nomad#10189 mholt/caddy-l4#47


result:

netstat -nlp | grep 9876

out put

tcp6       0      0 :::9876                 :::*                    LISTEN      80686/ddns-go       

This is a false positive from netstat (https://stackoverflow.com/a/58839676), so don't worry.