ShoGinn / flightradar24

Docker container for ADS-B - This is the flightradar24.com component
GNU General Public License v3.0
6 stars 6 forks source link

No Connection To dump1090 #1

Closed WhiteNoseThunderPants closed 4 years ago

WhiteNoseThunderPants commented 5 years ago

I have your dump1090 container running with port 30005 exposed. The logs show that it does find my RTL-SDR device.

I am using your containers on Unraid and my problem is that both the flightaware and flightradar24 containers are unable to connect to the dump1090 container. the logs show that they are unable to resolve dump1090. I verified that it is the correct name of my container.

I'm not sure where to begin troubleshooting from here. I tried adding an entry to my /etc/hosts file for dump1090 to the LAN IP of the server, but that did not help.

Any guidance would be appreciated.

Here is the relevant log for flightradar24:

2019-10-02 09:30:33 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:33 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:38 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:38 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:43 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:43 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:43 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:43 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:48 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:48 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:53 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:53 | [reader][e]Could not connect to tcp://dump1090:30005
2019-10-02 09:30:58 | [reader][i]Connecting to Beast receiver via (tcp://dump1090:30005)
2019-10-02 09:30:58 | [reader][e]Could not connect to tcp://dump1090:30005

Here it is for flightaware:

mlat-client(25): Reconnecting in 30.0 seconds
Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr dump1090 --net-bo-port 30005 --stdout --lat 28.043 --lon -97.226
Started faup1090 (pid 32) to connect to the ADS-B data program at dump1090/30005
faup1090(32): faup1090: failed to connect to dump1090:30005 (is dump1090 running?): can't resolve dump1090: Name or service not known

lost connection to the ADS-B data program at dump1090/30005 via faup1090
faup1090 exited with EXIT 1
will reconnect to the ADS-B data program at dump1090/30005 in 30 seconds
mlat-client(25): Connection to dump1090:30005 failed: [Errno -2] Name or service not known
ShoGinn commented 5 years ago

the issue is with docker in Unraid is you have to name the container "dump1090" (case matters) If you console the flightradar24 or flightaware and ping dump1090 it should work.

WhiteNoseThunderPants commented 5 years ago

So this is the docker run command that Unraid is using to start up dump1090:

docker run -d --name='dump1090' --net='bridge' --log-opt max-size='100m' --log-opt max-file='3' -e TZ="America/Chicago" -e HOST_OS="Unraid" -p '30005:30005/tcp' --device='/dev/bus/usb/002/007' --cap-add=SYS_NICE 'shoginn/dump1090'

If I do a docker ps this is what it shows for dump1090:

CONTAINER ID        IMAGE                                          COMMAND                  CREATED              STATUS              PORTS                                                                                                                          NAMES
ca3ca5c74090        shoginn/dump1090                               "tini -- nice -n -5 …"   About a minute ago   Up About a minute   30002/tcp, 0.0.0.0:30005->30005/tcp                                                                                            dump1090

Pinging however fails from either docker container as well as the docker host (Unraid). Is there anything in the docker run command that looks off to you?

WhiteNoseThunderPants commented 5 years ago

I did verify that I can ping the docker IP that is given to the dump1090 container from within the flightradar24 container.

WhiteNoseThunderPants commented 5 years ago

Here is the result from attempting to ping dump1090 container from flightradar24 container:

root@836b60f26974:/# ping dump1090
ping: dump1090: Name or service not known

Results after pinging dump1090 container IP from flightradar24 container:

root@836b60f26974:/# ping 172.17.0.36
PING 172.17.0.36 (172.17.0.36) 56(84) bytes of data.
64 bytes from 172.17.0.36: icmp_seq=1 ttl=64 time=0.315 ms
64 bytes from 172.17.0.36: icmp_seq=2 ttl=64 time=0.075 ms
64 bytes from 172.17.0.36: icmp_seq=3 ttl=64 time=0.075 ms
64 bytes from 172.17.0.36: icmp_seq=4 ttl=64 time=0.117 ms
^C
--- 172.17.0.36 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3084ms
rtt min/avg/max/mdev = 0.075/0.145/0.315/0.100 ms
WhiteNoseThunderPants commented 5 years ago

It seems as though it is a DNS issue. I added a DNS entry to my firewall to point it to the LAN IP of my Unraid server and now they can communicate. This does not seem ideal, but it is working.

ShoGinn commented 5 years ago

You are correct, I forgot to mention you have to setup a private network in Unraid so they all communicate.

Bridge mode creates a new subnet every time in Unraid.

Here is a good tutorial.

https://forums.unraid.net/topic/70906-added-in-651-docker-user-defined-bridge-networks/

ShoGinn commented 4 years ago

im assuming this fixed it.. if not re-open!