dump1090 no longer starting after script install

Discussion in 'Feeding' started by ETSF35, Oct 28, 2018.

  1. ETSF35

    ETSF35 New Member

    Hi!

    I am running dump1090-mutability on Raspbian Buster feeding to FR24 and FA. dump1090-mutability is the Raspbian package (1.15~20180310), I did not build it myself.

    I tried feeding to ADS-B exchange as well using the "script" method. After some issues with missing dependencies for building mlat-client, the install script seems to succed. However, as soon as I reboot, dump1090 will no longer start as a service. I can still run it (dumping all messages to console), but it won't start as a service. When I disable ADS-B exchange by renaming the adsb-exchange folder, so that the scripts can no longer start, dump1090 does work as expected again.

    Thus, I assume there is some race condition with one of the ADS-B exchange scripts beeing started before dump1090 is up and running, claiming a port that dump1090 will later need.

    Questions:
    1. Has anyone seen this issue before?
    2. If so, how have you been able to resolve it?
    Thanks in advance.
     
    Last edited: Oct 28, 2018
  2. MDA

    MDA Administrator Staff Member

  3. ETSF35

    ETSF35 New Member

    rc.local is installed and running. It does run the ADS-B exchange scripts, but dump1090 does not work any more in this case.
     
  4. MDA

    MDA Administrator Staff Member

    Can you post dump1090 start parameters (from HTOP)?
     
  5. ETSF35

    ETSF35 New Member

    Warning: I could not copy it from htop, so there may be some typos:

    Code:
    /usr/bin/dump1090-mutability --net --ppm 0 --fix --lat mylat --lon mylong --max-range 350 -net-ri-port 30001 --net-ro-port 30002 --net-bi-port 30004 --net-bo-port 30005 --net-sbs-port 30003 --net-heartbeat 60 --net-ro-interval 1 --net-buffer 2 --net-bind-address 127.0.0.1 --stats-every 3600 --write-json /run/dump1090-mutability --write-json-every 1 --json-location-accuracy 2 --quiet
    However, these are default settings except for my position and the max range. Everything else is default.
     
  6. MDA

    MDA Administrator Staff Member

    Looks normal. Some more questions:
    - how did you install dump1090-mutability pracompiled package
    - were other feeders installed on pure Raspbian
    - is socat installed?
    Your problem is not typical.
     
  7. ETSF35

    ETSF35 New Member

    First of all, there is one error in my first post: I am not on Stretch, but Buster. dump1090-mutability is not in Stretch as far as I know.

    Code:
    sudo apt-get install dump1090-mutability
    Yes, fr24feed and piaware are running successfully.

    Yes.

    Not sure that's a relief. ;)

    I believe this is what happens: For some reason, the adsbexchange scripts are run by rc.local before dump1090 is started. When that happens, socat is claiming port 3005 as an input port, so it is busy when dump1090 is attempting to claim it later. Just a theory, I might edit the scripts to test if dump1090 is running before running the script itself.
     
  8. MDA

    MDA Administrator Staff Member

    MLAT client is listening on port 30005. You can edit sleep parameter in /home/pi/adsb-exchange/adsbexchange-mlat_maint.sh so it will wait fe. 90 seconds.
    Run mlat-client, reboot and look into log file /var/log/dump1090-mutability.log
    There should be some information about dump1090 startup problem.
    Please check adsbexchange-netcat_maint.sh - one of users had error in this script which can cause that port 30005 will be claimed.
     
  9. ETSF35

    ETSF35 New Member

    It was a timing issue as I suspected. I edited both adsbexchange-mlat_maint.sh as well as adsbexchange-netcat_maint.sh. Can't post more cloudflare blocks me. :(

    Not sure if the feed works correctly, will need to check the statistics. If it does not, I will open a separate thread. Thanks for now.
     
  10. MDA

    MDA Administrator Staff Member

    For a short time you was present on sync matrix but not synced.
    netcat script should contain something like that (if you don't feed custom port)
    Code:
    socat -u TCP:localhost:30005,nodelay TCP:feed.adsbexchange.com:30005,nodelay
     
  11. ETSF35

    ETSF35 New Member

    netcat script was almost the same, except for the nodelay option. This was missing. Rebooting now.

    Also, the mlat scrip keeps loosing connection. I don't know why.
     
  12. MDA

    MDA Administrator Staff Member

    As I wrote no data (not synced with any other station). In this case server is disconnecting.
    Just let it run.
     
  13. ETSF35

    ETSF35 New Member

    OK, so things get a little clearer now. After the reboot, I had the same issue as before again, dump1090 wouldn't start. It turned out this was a race condition that previously only hit when running adsb-exchange, but it was not related to adsb-exchange. This was a configuration error in fr24feed.

    Fixed that, set up adsb-exchange again from scratch and rebooted. dump1090 running nicely, adsbexchange scripts, socat and mlat-client also visible in htop. But my feeder still does not show up in the MLAT matrix.
     
    Last edited: Oct 28, 2018
  14. MDA

    MDA Administrator Staff Member

    Now be patient, it can take even hours to get connected (Eastern Europe region has many feedeers).
     
  15. MDA

    MDA Administrator Staff Member

    Finally works, Grüße nach Bayern :).
     
  16. James

    James Guest

    Script method doesn't mess with dump1090. All it does is install MLAT client and install 2 bash scripts .. one that socats data to adsbx, and one that starts mlat.

    It's foot print is minimal and makes no major system changes.