FlightAware Discussions

SkyAware direct local connection on shared RPi configured as an OctoPi

I followed these instructions to successfully install and start PiAware on an RPi B 3+ that was already configured as an OctoPi to monitor 3D printing. The only issue I have is trying to direct connect to monitor my data via SkyAware. When I click “View live data” my browser says it cannot reach the site (192.168.1.6:8080). I assume this has something to do with the OctoPi also running on that RPi since typing in 192.168.1.6 brings me to the OctoPi web interface. Do I need to simply change the port in the PiAware configuration to something other than 8080 so that I can connect to SkyAware?

This is a shot in the dark mate as I’m not super familiar with OctoPi, but I think it already has a webserver defaulting webcam or something like that on :8080. Perhaps try 192.168.1.6/dump1090-fa/

Like I said, shot in the dark, but without asking a zillion questions about your current webserver config, it’s worth a quick try.

I think you’re right. I tried your suggestion, but it didn’t work.

A bit more invasive, but give this a whirl if you are bored:

sudo nano /etc/lighttpd/conf-enabled/89-dump1090-fa.conf

change the 8080 to a different port, maybe 8090 for a test then save

sudo systemctl restart lighttpd

Then try to reach it on 192.168.1.6:8090

@Nitr0 That did not work

Sorry bud. I am not privy to whatever webserver setup that currently resides within the OctoPi image to be much more help. Someone smart here I’m sure has already been through this, so hopefully they can chime in.

https://github.com/wiedehopf/adsb-wiki/wiki/Debug-commands#lighttpd

@wiedehopf Are you suggesting I run that Lighttpd command?

The page is called debug commands, thus yes and share the results (last 30 lines for each command are sufficient).
Sometimes i think … things are obvious but obviously they are not.

@wiedehopf

pi@OctoPi:~ sudo journalctl --no-pager -u lighttpd [sudo] password for pi: -- Logs begin at Thu 2020-08-13 11:44:33 PDT, end at Thu 2020-08-13 20:15:28 PDT . -- -- No entries -- pi@OctoPi:~ ls /etc/lighttpd/conf-enabled
88-dump1090-fa-statcache.conf 89-dump1090-fa.conf 90-javascript-alias.conf
pi@OctoPi:~ grep mod_setenv /etc/lighttpd/ -rnT /etc/lighttpd/conf-available/89-dump1090-fa.conf: 24: server.modules += ( "mod _setenv" ) pi@OctoPi:~

Let’s try again, but restart lighttpd first.

sudo systemctl restart lighttpd
sudo journalctl --no-pager -u lighttpd

This doesn’t work? What does it say?

http://192.168.1.6/dump1090-fa

Honestly OctoPi have taken over lighttpd … which is annoying to debug.

You could install nginx, configure it to a different port, install tar1090 and include the file provided by tar1090.
But that reqires some basic understanding of how to configure nginx.
(https://github.com/wiedehopf/tar1090#tar1090)

I think it may be due to HAProxy that’s probably already on his system as an intermediary. Per the above, I had him reroute the listener to :8090 and that didn’t work…

sudo cat /etc/haproxy/haproxy.cfg

No clue what the extra layer does to the listeners if it’s installed - I’ve never found a use for these extra layers as I find it simpler to set everything up properly in the webserver configs themselves, so no experience with these “bandaids” – If this is the issue in the first place. Grabbing at straws and that’s all we can do unless we’re sitting there.

Installing yet another webserver would complicate matters even more imho.

Might well be :wink:

Didn’t know haproxy was installed.

pi@OctoPi:~ sudo systemctl restart lighttpd [sudo] password for pi: pi@OctoPi:~ sudo systemctl restart lighttpd
Job for lighttpd.service failed.
See “systemctl status lighttpd.service” and “journalctl -xe” for details.
pi@OctoPi:~ $ sudo journalctl --no-pager -u lighttpd
– Logs begin at Sat 2020-08-15 08:46:40 PDT, end at Sat 2020-08-15 17:07:47 PDT. –
Aug 15 17:06:33 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:34 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:34 OctoPi lighttpd[26467]: 2020-08-15 17:06:34: (network.c.309) can’t bind to socket: 0.0.0.0: already in use
Aug 15 17:06:34 OctoPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Aug 15 17:06:34 OctoPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Aug 15 17:06:34 OctoPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Aug 15 17:06:34 OctoPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 1.
Aug 15 17:06:34 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:34 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:35 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:35 OctoPi lighttpd[26480]: 2020-08-15 17:06:35: (network.c.309) can’t bind to socket: 0.0.0.0: already in use
Aug 15 17:06:35 OctoPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Aug 15 17:06:35 OctoPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Aug 15 17:06:35 OctoPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Aug 15 17:06:35 OctoPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 2.
Aug 15 17:06:35 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:35 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:36 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:36 OctoPi lighttpd[26506]: 2020-08-15 17:06:36: (network.c.309) can’t bind to socket: 0.0.0.0: already in use
Aug 15 17:06:36 OctoPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Aug 15 17:06:36 OctoPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Aug 15 17:06:36 OctoPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Aug 15 17:06:36 OctoPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 3.
Aug 15 17:06:36 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:36 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:37 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:37 OctoPi lighttpd[26517]: 2020-08-15 17:06:37: (network.c.309) can’t bind to socket: 0.0.0.0: already in use
Aug 15 17:06:37 OctoPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Aug 15 17:06:37 OctoPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Aug 15 17:06:37 OctoPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Aug 15 17:06:37 OctoPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 4.
Aug 15 17:06:37 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:37 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:37 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: Stopping Lighttpd Daemon…
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Main process exited, code=killed, status=15/TERM
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Succeeded.
Aug 15 17:06:38 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Failed with result ‘start-limit-hit’.
Aug 15 17:06:38 OctoPi systemd[1]: Failed to start Lighttpd Daemon.

More than 1 web server installed?

sudo netstat -lntp

pi@OctoPi:~ $ sudo netstat -lntp
[sudo] password for pi:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:30002 0.0.0.0:* LISTEN 28637/dump1090-fa
tcp 0 0 0.0.0.0:30003 0.0.0.0:* LISTEN 28637/dump1090-fa
tcp 0 0 0.0.0.0:30004 0.0.0.0:* LISTEN 28637/dump1090-fa
tcp 0 0 0.0.0.0:30005 0.0.0.0:* LISTEN 28637/dump1090-fa
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 624/sshd
tcp 0 0 0.0.0.0:30104 0.0.0.0:* LISTEN 28637/dump1090-fa
tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 407/python2
tcp6 0 0 :::80 :::* LISTEN 621/haproxy
tcp6 0 0 :::30002 :::* LISTEN 28637/dump1090-fa
tcp6 0 0 :::30003 :::* LISTEN 28637/dump1090-fa
tcp6 0 0 :::30004 :::* LISTEN 28637/dump1090-fa
tcp6 0 0 :::30005 :::* LISTEN 28637/dump1090-fa
tcp6 0 0 :::22 :::* LISTEN 624/sshd
tcp6 0 0 :::30104 :::* LISTEN 28637/dump1090-fa
tcp6 0 0 :::30105 :::* LISTEN 26170/fa-mlat-clien
tcp6 0 0 :::30106 :::* LISTEN 26170/fa-mlat-clien
tcp6 0 0 :::443 :::* LISTEN 621/haproxy

Figured as much. Going to need to get some help from someone who has messed with haproxy. No clue why a dist would have a need for that on an SBC of all things, but is what it is. Between that and lighttpd crapping out, not sure where to begin since this is not a typical setup.

@Nitr0 I have a YouTube & Google level education in Linux, so unfortunately I’m not sure what to make of that. This was my first attempt to use an RPi for a secondary purpose. It would have been nice if just changing the port did what I needed, but I’m good to either live without SkyAware or just buy another RPi for dedicated use. Thanks again for trying to help this noob! :wink:

I’m sure there is an easy workaround. Do you still have port 8090 set from when you tried above?

sudo systemctl status lighttpd

That might give a little more information where the service goes south. You’ll never get a webpage without the webserver running. It could be as simple as adding another entry in the haproxy.cfg file to allow port 8090. 8080 is already being used for your webcam in OctoPi - although I guarantee that’s not working either right now… I have zero experience with haproxy and can’t for the life of me fathom why it would be needed in the first place as there are webserver config files for a reason. They must have had some good reason I guess.

Correct, my webcam is not loading. I haven’t been using my 3D printer, so I haven’t bothered troubleshooting it. Maybe we could solve two things for the price of one!

pi@OctoPi:~ $ sudo systemctl status lighttpd
[sudo] password for pi:
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset:
Active: failed (Result: start-limit-hit) since Sat 2020-08-15 17:06:38 PDT; 4
Process: 26522 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.c
Process: 26527 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
Main PID: 26527 (code=killed, signal=TERM)

Aug 15 17:06:37 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:37 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: Stopping Lighttpd Daemon…
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Main process exited, code=k
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Succeeded.
Aug 15 17:06:38 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Start request repeated too
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Failed with result 'start-l
Aug 15 17:06:38 OctoPi systemd[1]: Failed to start Lighttpd Daemon.
lines 1-16/16 (END)…skipping…
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Sat 2020-08-15 17:06:38 PDT; 4h 5min ago
Process: 26522 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Process: 26527 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=killed, signal=TERM)
Main PID: 26527 (code=killed, signal=TERM)

Aug 15 17:06:37 OctoPi systemd[1]: Starting Lighttpd Daemon…
Aug 15 17:06:37 OctoPi systemd[1]: Started Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: Stopping Lighttpd Daemon…
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Main process exited, code=killed, status=15/TERM
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Succeeded.
Aug 15 17:06:38 OctoPi systemd[1]: Stopped Lighttpd Daemon.
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Aug 15 17:06:38 OctoPi systemd[1]: lighttpd.service: Failed with result ‘start-limit-hit’.
Aug 15 17:06:38 OctoPi systemd[1]: Failed to start Lighttpd Daemon.