Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Two instances of FR24feed on the same linux box?

  1. #1
    Passenger
    Join Date
    Jul 2014
    Location
    CYXE
    Posts
    7

    Two instances of FR24feed on the same linux box?

    After using the Windows feeder for several years, I have successfully migrated to feeding using the Linux/generic/i686/1.0.18-5 feeder. Many thanks to users abcd567 and others for the easy to follow instructions. I am also grateful that it was much less 'painful' than I anticipated.

    While leaving that feed running as it is, I want to create a new feed to track an experimental antenna installation, without disturbing the original. Obviously the new feed will require a separate sharing key and a separate installation of the feeder software.

    Is it possible/practical to run two instances of the FR24feed software on the same Linux box? This would be JUST the feeder, since the decoding would be handled by dump1090 running on a separate box and sent over the network. The two instances would each need to be using their own configuration files and ports.

    So my question isn't how to feed data to multiple tracking sites, but rather how to run multiple instances of FR24feed on one Linux box?

    Thanks
    yxespotter
    Saskatoon, Canada

  2. #2
    Captain
    Join Date
    Apr 2018
    Posts
    699
    I think the path to the config file is hardcoded into the application (/etc/fr24feed.ini)

    You could write a service file i suppose that copies a separate configuration to that location before each instance is started.
    Then you should of course ensure they are not started at the same time so the starting should probably be handled by the same service/script.

    Anyway good luck.

  3. #3
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,732
    Hi Yxespotter

    Nice to hear from you after a long gap

    Some years ago, you have successfully run two instances of dump1090-mutability on one RPi. On same lines, it is possible to run two instances of fr24feed. The main problem in case of fr24feed has been pointed out by @wiedehopf: the init file name and path is hard coded in the fr24feed binary.

    Have a look here:

    One Pi, Two Dongles, Two Maps

    .
    Last edited by abcd567; 2019-04-14 at 23:11.

  4. #4
    First officer
    Join Date
    Dec 2014
    Posts
    221
    How about running the second instance on a linux VM on your linux machine?

  5. #5
    First officer 1090 MHz's Avatar
    Join Date
    Sep 2013
    Location
    F-CYYZ2
    Posts
    386
    You can actually run up to 3 RTL tv tuner dongles at the same time on a Pi 3 board. I've done it before as a multi channel network tv tuner.

    Check out this thread... these guys are doing it.
    https://forums.liveatc.net/feed-setu...tuner-dongles/

  6. #6
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,732
    Method in followin post may be used:

    https://forum.flightradar24.com/thre...l=1#post117129


    However for two instances of fr24feed it will require following differences:

    (Method below is untested. This is a concept only.)

    (1) In step (4), create TWO fr24feed service files, with different names, for example these can be named "fr24feedA.service" and "fr24feedB.service".

    (2) passing all config options with the following line in service file:

    ExecStart=/usr/bin/fr24feed

    To be changed to

    ExecStart=/usr/bin/fr24feed --fr24key xxxxx --receiver dvbt
    OR
    ExecStart=/usr/bin/fr24feed --fr24key xxxxx --receiver beast-tcp --host 127.0.0.1:30005

    I will give it a try when I find time.
    Last edited by abcd567; 2019-04-15 at 21:36.

  7. #7
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,732
    OBJECTIVE
    On one Linux machine, we have to setup two feeders with two feeder id
    fr24feed-1 with fr24key=xxxxxxxxxxxxxxxx
    fr24feed-2 with fr24key=yyyyyyyyyyyyyyyy

    STEP-1
    Follow the steps in this post

    One Pi, Two Dongles, Two Maps


    This will install dump1090-mutability with following two instances running simutaneosly (requires 2 dvb-t dongles)
    • dump1090-mutability, uses dongle 0. outputs Beast format data on port 30005
    • dump1090-mut-2, uses dongle 1. outputs Beast format data on port 31005



    STEP-2
    Follow steps given below to install two instances of FR24 FEEDER
    • fr24feed-1, uses fr24key=xxxxxxxxxxxxxxxx, gets data from dump1090-mutability on port 30005
    • fr24feed-2, uses fr24key=yyyyyyyyyyyyyyyy, gets data from dump1090-mutability-2 on port 31005


    2.1 - Download, extract, and install fr24feed binary

    Code:
    sudo wget https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_1.0.18-5_amd64.tgz 
    sudo tar -xzf fr24feed_1.0.18-5_amd64.tgz
    cd fr24feed_amd64
    sudo install fr24feed /usr/bin/

    2.2 - Add system user fr24 to run the binary through fr24feed.service
    Code:
    sudo useradd --system fr24

    2.3 - Create fr24feed-1 service
    2.3.1 - Create a blank file fr24feed-1.service
    Code:
    sudo nano /lib/systemd/system/fr24feed-1.service
    2.3.2 - Copy-paste following code in blank file fr24feed-1.service
    Save file (Ctrl+o) and close file (Ctrl+x)
    Code:
    [Unit]
    Description=Flightradar24 Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    RuntimeDirectory=fr24feed
    RuntimeDirectoryMode=0755
    ExecStartPre=/bin/mkdir -p /var/log/fr24-1
    ExecStartPre=/bin/chown fr24 /var/log/fr24-1
    ExecStart=/usr/bin/fr24feed --fr24key=xxxxxxxxxxxxxxxx --receiver=beast-tcp --host=127.0.0.1:30005 --logmode=1 --logpath=/var/log/fr24-1/
    User=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target
    2.3.3 - Enable fr24feed-1 service
    Code:
    sudo systemctl enable fr24feed-1


    2.4 - Create fr24feed-2 service
    2.4.1 - Create a blank file fr24feed-2.service
    Code:
    sudo nano /lib/systemd/system/fr24feed-2.service
    2.4.2 - Copy-paste following code in blank file fr24feed-2.service
    Save file (Ctrl+o) and close file (Ctrl+x)

    Code:
    [Unit]
    Description=Flightradar24 Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    RuntimeDirectory=fr24feed
    RuntimeDirectoryMode=0755
    ExecStartPre=/bin/mkdir -p /var/log/fr24-2
    ExecStartPre=/bin/chown fr24 /var/log/fr24-2
    ExecStart=/usr/bin/fr24feed --fr24key=yyyyyyyyyyyyyyyy --receiver=beast-tcp --host=127.0.0.1:31005 --logmode=1 --logpath=/var/log/fr24-2/
    User=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target
    2.4.3 - Enable fr24feed-2 service
    Code:
    sudo systemctl enable fr24feed-2

    2.5 - Start feeders. (these two feeders will automatically start at boot)
    Code:
    sudo systemctl restart fr24feed-1  
    sudo systemctl restart fr24feed-2

    2.6 - Check status

    Feeder-1
    Code:
    abcd@debian:~$ sudo systemctl status fr24feed-1
    ● fr24feedA.service - Flightradar24 Feeder
       Loaded: loaded (/lib/systemd/system/fr24feed-1.service; enabled; vendor preset: enabled)
       Active: active (running) since Tue 2019-04-16 03:33:06 EDT; 1h 22min ago
     Main PID: 9871 (fr24feed)
        Tasks: 9 (limit: 4915)
       CGroup: /system.slice/fr24feed-1.service
               └─9871 /usr/bin/fr24feed --fr24key=yyyyyyyyyyyyyyyy --receiver=beast-tcp --host=127.0.0.1:30005
    
    Apr 16 03:33:06 debian systemd[1]: Started Flightradar24 Feeder.

    Feeder-2
    Code:
    abcd@debian:~$ sudo systemctl status fr24feed-2
    ● fr24feedB.service - Flightradar24 Feeder
       Loaded: loaded (/lib/systemd/system/fr24feed-2.service; enabled; vendor preset: enabled)
       Active: active (running) since Tue 2019-04-16 03:33:27 EDT; 1h 19min ago
     Main PID: 9897 (fr24feed)
        Tasks: 8 (limit: 4915)
       CGroup: /system.slice/fr24feed-2.service
               └─9897 /usr/bin/fr24feed --fr24key=xxxxxxxxxxxxxxxx --receiver=beast-tcp --host=127.0.0.1:31005
    
    Apr 16 03:33:27 debian systemd[1]: Started Flightradar24 Feeder.
    2.7 - Check Log files

    Code:
    cat /var/log/fr24-1/fr24feed.log
    
    cat /var/log/fr24-2/fr24feed.log
    PENDING:
    Log file. (Done on 16/04/2019 by modifying .service files)
    Resolve conflict between two instances for web page "localhost:8754"

    .
    Last edited by abcd567; 2019-04-16 at 23:31.

  8. #8
    Captain
    Join Date
    Apr 2018
    Posts
    699
    Do you just delete the /etc/fr24feed.ini when you give the parameters on the command line?

    Or do the command line parameters take precedence anyway?

    Also maybe you should mention that you can get a second feed key by using:
    Code:
    sudo fr24feed --signup
    It will put the share key into /etc/fr24feed.ini, so you need to note down your key before doing that.

    You can look up the feed keys you already have on the fr24 website:
    https://www.flightradar24.com/account/data-sharing
    Last edited by wiedehopf; 2019-04-16 at 10:16.

  9. #9
    Captain
    Join Date
    Apr 2018
    Posts
    699
    I just tried running a second instance on the command line for testing.

    It seems you should disable MLAT on one receiver because the ports are probably hard coded and the two UDP connections get in each others way.

    Adding --mlat=no to one of the command lines should be sufficient.

  10. #10
    Captain
    Join Date
    Apr 2018
    Posts
    699
    For troubleshooting it might not hurt to specify:
    Code:
    --logmode=1 --logpath=/var/log/fr24-1
    and
    --logmode=1 --logpath=/var/log/fr24-2
    after creating both directories:
    sudo mkdir /var/log/fr24-1
    sudo mkdir /var/log/fr24-2
    sudo chown fr24 /var/log/fr24-1
    sudo chown fr24 /var/log/fr24-2
    That way you can check the logs in both directories to make sure both instances are running correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •