View Live Data - not working

OrangePiPc+
Armbian Ubuntu Xenial

This worked on a previous install. The OS became corrupted so a fresh install was done. It only contains Piaware and dump1090-fa. I have removed Piaware and reinstalled. I then removed dump1090-fa and reinstalled. The problem still exists. I cannot access 192.168.0.x:8080.

Can you provide a fix please?

opi@orangepipcplus:~$ sudo service lighttpd status
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-06-04 18:17:13 AEST; 13h ago
Process: 917 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
Process: 871 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 917 (code=exited, status=255)

Jun 04 18:17:12 orangepipcplus systemd[1]: Starting Lighttpd Daemon…
Jun 04 18:17:13 orangepipcplus lighttpd[871]: Syntax OK
Jun 04 18:17:13 orangepipcplus systemd[1]: Started Lighttpd Daemon.
Jun 04 18:17:13 orangepipcplus lighttpd[917]: 2018-06-04 18:17:13: (log.c.118) opening errorlog '/var/log/lighttp
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Unit entered failed state.
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
lines 1-14/14 (END)…skipping…
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-06-04 18:17:13 AEST; 13h ago
Process: 917 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
Process: 871 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 917 (code=exited, status=255)

Jun 04 18:17:12 orangepipcplus systemd[1]: Starting Lighttpd Daemon…
Jun 04 18:17:13 orangepipcplus lighttpd[871]: Syntax OK
Jun 04 18:17:13 orangepipcplus systemd[1]: Started Lighttpd Daemon.
Jun 04 18:17:13 orangepipcplus lighttpd[917]: 2018-06-04 18:17:13: (log.c.118) opening errorlog '/var/log/lighttp
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Unit entered failed state.
Jun 04 18:17:13 orangepipcplus systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
~

Seems your folder /var/log/ which contains the lighttpd.log file gets deleted on reboot. The lighttpd crashes when it does not find its log file.

This usually happens if your folder /var/log/ is associated with tmpfs in fstab. Check it here

cat /etc/fstab

I have faced this problem on my Orange Pi PC about an year ago, and asked for solution in Armbian forum. I got following solution Click here.

  1. sudo nano /etc/default/log2ram
  2. disable (change enabled to disabled or may be enabled yes to enabled no, I am not sure, dont remember)
  3. reboot

cat /etc/fstab

UUID=c74e402e-d31e-4d05-9be3-1621d83f2985 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0

sudo nano /etc/default/log2ram
ENABLED was set to ‘false’ by me

configuration values for the log2ram service

enable the log2ram service?

ENABLED=false

size of the tmpfs mount

SIZE=50M

use rsync instead of cp -r

requires rsync installed, may provide better performance

due to copying only new and changed files

USE_RSYNC=true

I even removed lighttpd which took out dump1090-fa then reinstalled lighttpd then dump1090-fa but no joy :frowning: I will say I can now get the standard web page for lighttpd on 192.168.0.x:80 where as I could not before the above procedure. I feel lighttpd was updated in around March this year. I had piaware working completely with live data view before March. i wonder if the upgrade has anything to do with this issue?

Result: abcd567, your suggestion has not worked, unfortunately.

  1. I think your conclusion is not correct. Lighttpd was failing to start as shown in your first post. It is now working as mentioned in your 2nd post. This is result of setting ENABLED to false in file /etc/default/log2ram as suggested in my post. You can verify this by changing back ENABLED to true, rebooting the Pi, and checking status by command sudo systemctl status lighttpd

  2. You have 2nd problem. Although lighttpd stopped failing after disabling log2ram, it is serving its “Place Holder Page” instead of dump1090-fa SkyView map. This is because for some reason, lighttpd is not properly configured to serve dump1090-fa page. Following commands will most likely fix the configuration problem:

    sudo lighty-enable-mod dump1090-fa   
    sudo /etc/init.d/lighttpd force-reload   
    sudo reboot   

[SOLVED]

abcd567

2.) I am pleased to report you were absolutely correct.
1.) I will take your word for it.

Thank you very much.

Glad to know your problem is solved.

I don’t suppose you could help me with that 3g modem script. i just want to be able to plug the modem into the usb port and know it will work.

Unfortunately I have no experience or knowledge of 3g modem script, therefore unable to help.

Please dont take my word for it, I may be wrong. The reason is that I have reported this bug to Igor (the guy who maintains Armbian) one year ago, and disabling log2var workaround was given by him. It is very likely he has removed the bug in newer versions of Armbian which you are using.

That is why I asked you to test it by making ENABLED=true and reboot. If Igor has removed the bug, then your lighttpd will continue to work, and map will be available.

Your test result will help me. In future I will/will not suggest this workaround depending on your test results

Thanks in advance for conducting the test.

The situation now:

sudo /etc/default/log2ram

When ENABLED is ‘true’ then rebooted x.x.x.x:80 is displaying Placeholder Page.
x.x.x.x:8080 is displaying live data

sudo systemctl status lighttpd is Active

When ENABLED is ‘false’ then rebooted x.x.x.x:80 is displaying Placeholder Page
x.x.x.x:8080 is displaying live data

sudo systemctl status lighttpd is Active

So now it does not matter if ENABLED is true or false. It works.

Thanks a lot
It is clear now that Igor has fixed the log2ram bug in Armbian, and that workaround is no more needed.

Your problem was due to configuration of lighttpd. The module dump1090-fa was not enabled in lighttpd configuration.

Thanks again.