piaware icon indicating copy to clipboard operation
piaware copied to clipboard

piaware-status: False negatives when in unprivileged docker container

Open rfinnie opened this issue 6 years ago • 1 comments

When running in an unprivileged Docker container, everything functionally works fine as long as the proper USB device is passed in, but piaware-status reports:

root@98cec28c1d21:/# piaware-status 
PiAware master process (piaware) is running with pid 52.
PiAware ADS-B client (faup1090) is running with pid 90.
PiAware mlat client (fa-mlat-client) is running with pid 92.
Local ADS-B receiver (dump1090-fa) is running with pid 69.

unknown process (pid unknown) is listening for connections on port 30005.
faup1090 is NOT connected to the ADS-B receiver.
piaware is NOT connected to FlightAware.

dump1090 is producing data on localhost:30005.

Your feeder ID is [UUID] (configured at /etc/piaware.conf:9)

This is because socket to PID mappings aren't available:

root@98cec28c1d21:/# netstat --program --tcp --wide --all --numeric
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:30002           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:30003           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:30004           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:30005           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:30104           0.0.0.0:*               LISTEN      -                   
tcp        0      0 172.17.0.2:30002        172.17.0.1:55756        ESTABLISHED -                   
tcp        0      0 172.17.0.2:39529        70.42.6.198:1200        ESTABLISHED -                   
tcp        0      0 172.17.0.2:8080         10.9.8.4:59512          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:46626         127.0.0.1:30005         ESTABLISHED -                   
tcp        0      0 127.0.0.1:55802         127.0.0.1:30104         ESTABLISHED -                   
tcp        0      0 127.0.0.1:30104         127.0.0.1:55802         ESTABLISHED -                   
tcp        0      0 172.17.0.2:8080         10.9.8.4:59504          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:30005         127.0.0.1:46736         ESTABLISHED -                   
tcp        0      0 172.17.0.2:30005        172.17.0.1:39564        ESTABLISHED -                   
tcp        0      0 127.0.0.1:30005         127.0.0.1:46626         ESTABLISHED -                   
tcp        0      0 127.0.0.1:46736         127.0.0.1:30005         ESTABLISHED -                   
tcp        0      0 172.17.0.2:8080         10.9.8.4:59498          TIME_WAIT   -                   
tcp6       0      0 :::30002                :::*                    LISTEN      -                   
tcp6       0      0 :::30003                :::*                    LISTEN      -                   
tcp6       0      0 :::30004                :::*                    LISTEN      -                   
tcp6       0      0 :::30005                :::*                    LISTEN      -                   
tcp6       0      0 :::30104                :::*                    LISTEN      -                   
tcp6       0      0 :::30105                :::*                    LISTEN      -                   
tcp6       0      0 :::30106                :::*                    LISTEN      -                   

piaware-status should probably check for this situation; e.g. ":1200" and program "-" should report something like "piaware is probably connected to FlightAware, but cannot be certain due to environment restrictions." instead of "piaware is NOT connected to FlightAware."

rfinnie avatar Mar 17 '19 16:03 rfinnie

I'm not sure that it's expected that piaware-status will work in a docker environment

mutability avatar Mar 17 '19 17:03 mutability