Issue with updating to 3.8.0

There are heaps of history_xx.json files in folder /run/dump1090-fa, but these somehow do not make their way to the page usr/share/dump1090-fa/html/index.html
image

EVERYTHING SEEMS IN ORDER, BUT STILL :frowning:
image

image

.
This looks better, thanks to @mikkyo :slightly_smiling_face:

[abcd@fedora-31 ~]$ cat /etc/lighttpd/lighttpd.conf | grep -v ^#

var.log_root    = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir   = "/var/run"
var.home_dir    = "/var/lib/lighttpd"
var.conf_dir    = "/etc/lighttpd"
var.vhosts_dir  = server_root + "/vhosts"
var.cache_dir   = "/var/cache/lighttpd"
var.socket_dir  = state_dir + "/sockets"
include "modules.conf"
server.port = 80
server.use-ipv6 = "enable"
server.username  = "lighttpd"
server.groupname = "lighttpd"
server.document-root = server_root + "/lighttpd"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog             = log_root + "/error.log"
include "conf.d/access_log.conf"
include "conf.d/debug.conf"
server.event-handler = "linux-sysepoll"
server.network-backend = "sendfile"
server.stat-cache-engine = "simple"
server.max-connections = 1024
index-file.names += (
  "index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
url.access-deny             = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
include "conf.d/mime.conf"
include "conf.d/dirlisting.conf"
server.follow-symlink = "enable"
server.upload-dirs = ( "/var/tmp" )

server.modules += ( "mod_alias" )
include "/etc/lighttpd/conf.d/89-dump1090-fa.conf"

are you sure this is correct?
why did you add it?

have you checked the log for lighttpd?
Debug commands · wiedehopf/adsb-wiki Wiki · GitHub

Really … first thing i always ask :stuck_out_tongue:

also

wget http://localhost/dump1090-fa/data/aircraft.json

I found this when making lighttpd integration on ArchLinux, whose lighttpd.conf file was almost identical to Fedora one, and until I added mod-alias, the map wont display. Anyway no harm in adding this module. The file 89-dump1090-fa has alias redirect in it and needs this module. I think in Debian/Raspbian version of lighttpd.conf this module is included by default.

Forbidden !!!

[abcd@fedora-31 ~]$ wget http://localhost/dump1090-fa/data/aircraft.json
--2020-01-19 18:19:08--  http://localhost/dump1090-fa/data/aircraft.json
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2020-01-19 18:19:08 ERROR 403: Forbidden.
[abcd@fedora-31 ~]$ sudo journalctl --no-pager -u lighttpd
[sudo] password for abcd:
-- Logs begin at Sun 2019-12-22 13:55:51 EST, end at Sun 2020-01-19 18:30:10 EST. --
Jan 19 10:35:54 fedora-31 systemd[1]: /usr/lib/systemd/system/lighttpd.service:6: PIDFile= references a path below legacy directory /var/run/, updating /var/run/lighttpd.pid → /run/lighttpd.pid; please update the unit file accordingly.
Jan 19 10:36:15 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 10:36:15 fedora-31 lighttpd[2696]: 2020-01-19 10:36:15: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 10:36:15 fedora-31 lighttpd[2696]: 2020-01-19 10:36:15: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 10:36:15 fedora-31 lighttpd[2696]: 2020-01-19 10:36:15: (server.c.1437) can't have more connections than fds/2:  1024 1024
Jan 19 11:03:09 fedora-31 systemd[1]: Stopping Lightning Fast Webserver With Light System Requirements...
Jan 19 11:03:11 fedora-31 systemd[1]: lighttpd.service: Succeeded.
Jan 19 11:03:11 fedora-31 systemd[1]: Stopped Lightning Fast Webserver With Light System Requirements.
-- Reboot --
Jan 19 11:04:08 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 11:04:08 fedora-31 lighttpd[778]: Duplicate array-key '/dump1090-fa/data/'
Jan 19 11:04:09 fedora-31 lighttpd[778]: 2020-01-19 11:04:08: (configfile.c.1309) source: /etc/lighttpd/conf.d/89-dump1090-fa.conf line: 11 pos: 13 parser failed somehow near here: (EOL)
Jan 19 11:04:09 fedora-31 lighttpd[778]: 2020-01-19 11:04:08: (configfile.c.1309) source: /etc/lighttpd/lighttpd.conf line: 489 pos: 1 parser failed somehow near here: (EOL)
Jan 19 11:04:08 fedora-31 systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 19 11:04:08 fedora-31 systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jan 19 11:36:40 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 11:36:40 fedora-31 lighttpd[2147]: 2020-01-19 11:36:40: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 11:36:40 fedora-31 lighttpd[2147]: 2020-01-19 11:36:40: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 11:36:40 fedora-31 lighttpd[2147]: 2020-01-19 11:36:40: (server.c.1437) can't have more connections than fds/2:  1024 1024
Jan 19 11:49:55 fedora-31 systemd[1]: Stopping Lightning Fast Webserver With Light System Requirements...
Jan 19 11:49:56 fedora-31 systemd[1]: lighttpd.service: Succeeded.
Jan 19 11:49:56 fedora-31 systemd[1]: Stopped Lightning Fast Webserver With Light System Requirements.
-- Reboot --
Jan 19 15:30:40 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 15:30:41 fedora-31 lighttpd[775]: 2020-01-19 15:30:40: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 15:30:41 fedora-31 lighttpd[775]: 2020-01-19 15:30:40: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 15:30:41 fedora-31 lighttpd[775]: 2020-01-19 15:30:40: (server.c.1437) can't have more connections than fds/2:  1024 1024
Jan 19 15:52:20 fedora-31 systemd[1]: Stopping Lightning Fast Webserver With Light System Requirements...
Jan 19 15:52:21 fedora-31 systemd[1]: lighttpd.service: Succeeded.
Jan 19 15:52:21 fedora-31 systemd[1]: Stopped Lightning Fast Webserver With Light System Requirements.
-- Reboot --
Jan 19 15:53:19 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 15:53:19 fedora-31 lighttpd[768]: 2020-01-19 15:53:19: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 15:53:19 fedora-31 lighttpd[768]: 2020-01-19 15:53:19: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 15:53:19 fedora-31 lighttpd[768]: 2020-01-19 15:53:19: (server.c.1437) can't have more connections than fds/2:  1024 1024
-- Reboot --
Jan 19 17:14:49 fedora-31 systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jan 19 17:14:50 fedora-31 lighttpd[760]: 2020-01-19 17:14:49: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 17:14:50 fedora-31 lighttpd[760]: 2020-01-19 17:14:49: (network.c.162) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes
Jan 19 17:14:50 fedora-31 lighttpd[760]: 2020-01-19 17:14:49: (server.c.1437) can't have more connections than fds/2:  1024 1024
[abcd@fedora-31 ~]$

.

[abcd@fedora-31 ~]$ ls /etc/lighttpd/conf-enabled
ls: cannot access '/etc/lighttpd/conf-enabled': No such file or directory

Fedora’s lighttpd has folder conf.d instead of Debian’s folder conf-enabled
Accordingly I have added in lighttpd.conf of Fedora as follows:
include "/etc/lighttpd/conf.d/89-dump1090-fa.conf"

[abcd@fedora-31 ~]$ ls /etc/lighttpd/conf.d
89-dump1090-fa.conf  evhost.conf   secdownload.conf
access_log.conf      expire.conf   simple_vhost.conf
auth.conf            magnet.conf   ssi.conf
cgi.conf             mime.conf     status.conf
cml.conf             mod.template  trigger_b4_dl.conf
compress.conf        proxy.conf    userdir.conf
debug.conf           rrdtool.conf  webdav.conf
dirlisting.conf      scgi.conf

Probably you need to do something to make the contents of /run/dump1090-fa readable to the user that lighttpd runs as.

are you sure about the folder structure of the webroot set in webserver config/virtual host file?

I’ve got this error recently while playing around until i saw that the root folder of the device where the webserver pointed to was empty.

Fixing this error doesn’t hurt probably not the issue.

As obj said, check the permissions for /run/dump1090-fa:

ls -ld /run/dump1090-fa

dump1090-fa’s lighttpd integration on Fedora 31 amd64

(A) Settings >> Network >> IPv6 >> Disable >> Reboot
After disabling IPv6:

  1. localhost/dump1090-fa still showing AJAX warning “Problem fetching data”
  2. Browser stopped connecting to outside world. http://www.google.com, http://flightaware.com etc show “Server not found”.

Enabled IPv6 and rebooted

(B) Permissions of folder /run/dump1090-fa

[abcd@fedora-31 ~]$ ls -ld /run/dump1090-fa
drwxr-xr-x. 2 dump1090 dump1090 360 Jan 20 14:31 /run/dump1090-fa 

Compared with piaware:

pi@piaware:~ $ ls -ld /run/dump1090-fa
drwxr-xr-x 2 dump1090 nogroup 2500 Jan 20 19:45 /run/dump1090-fa

Will try by changing:
dump1090 dump1090
to
dump1090 nogroup

But dont remember the command to do so :frowning:

… That’s not what i meant… google the error message or just figure out how to fix it.
(lighttpd error message)

lighttpd[778]: Duplicate array-key '/dump1090-fa/data/'

lighttpd[778]: (configfile.c.1309) source: /etc/lighttpd/conf.d/89-dump1090-fa.conf line: 11 pos: 13 parser failed somehow near here: (EOL)

lighttpd[778]: (configfile.c.1309) source: /etc/lighttpd/lighttpd.conf line: 489 pos: 1 parser failed somehow near here: (EOL)

systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION

Brace missing or sth like that?

In the log you showed that error went away after a reboot or so that’s why i didn’t chase it.

This is the error i was referring to.
It also says what the issue is: server.use-ipv6
As you don’t need that config option, find it and remove it.

Already changed line
server.use-ipv6 = "enable"
to
server.use-ipv6 = "disable"

and rebooted, but “AJAX call failed, unable to fetch data” persists.

did you check via wget?
As it gives you an http error code that’s much more useful.

Also at least temporary (doesn’t survive dump1090-fa restart) try this:

sudo chmod 777 /run/dump1090-fa

Already done it, no use.

.

Will try tonight, away from PC now.

(A) librtlsdr

make failed without librtlsdr even though I have installed rtl-sdr

make succeded only after librtlsdr was installed.

With rtl-sdr installed, but without installing librtlsdr

[abcd@localhost dump1090-fa]$ sudo dnf install rtl-sdr 

[abcd@localhost dump1090-fa]$ sudo make BLADERF=no 
.... .... ....

Package 'librtlsdr', required by 'virtual:world', not found
cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE  -c ais_charset.c -o ais_charset.o
Package librtlsdr was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtlsdr.pc'
to the PKG_CONFIG_PATH environment variable
Package 'librtlsdr', required by 'virtual:world', not found
cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE  -c sdr_rtlsdr.c -o sdr_rtlsdr.o
sdr_rtlsdr.c:54:10: fatal error: rtl-sdr.h: No such file or directory
   54 | #include <rtl-sdr.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:45: sdr_rtlsdr.o] Error 1

.

(B) rtl-sdr

With librtlsdr installed and rtl-sdr removed

[abcd@localhost dump1090-fa]$ sudo dnf remove rtl-sdr 

[abcd@localhost dump1090-fa]$ ./dump1090

./dump1090: error while loading shared libraries: librtlsdr.so.0: cannot open shared object file: No such file or directory

.

With rtl-sdr installed

[abcd@localhost dump1090-fa]$ sudo dnf install rtl-sdr
[abcd@localhost dump1090-fa]$ ./dump1090
Wed Jan 22 13:24:29 2020 EST  dump1090-fa  starting up.
rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000101)
Detached kernel driver
Found Rafael Micro R820T tuner
rtlsdr: tuner gain set to 49.6 dB
Allocating 4 zero-copy buffers
*5dc01aa771a3b9;
CRC: 000000
RSSI: -1.8 dBFS
Score: 750
Time: 8929001.67us
DF:11 AA:C01AA7 IID:0 CA:5
 All Call Reply (reliable)
  ICAO Address:  C01AA7 (Mode S / ADS-B)
  Air/Ground:    airborne

I don’t think you understand the packaging here. The compile failure will be because you’re missing a development/headers package somewhere.

My point was that it makes no sense to mix the distribution-provided packages with a compiled-from-source library, and doing so is asking for random crashes in anything that uses the library if there have been any ABI changes. If you’re going to build from source and install system-wide, then don’t install the distribution-provided packages, and you should probably rebuild everything that uses librtlsdr from source too.

1 Like

Thanks Oliver for guidance.

After some “research” :slightly_smiling_face: & Googling, I found that make install installs librtlsdr.so.xx file in directory /usr/lib/. This does not match Fedora/RHEL, which requires the x64 library files to be located in /usr/lib64. As a result installing x64 package rtl-sdr from Fedora repository became necessary.

SOLUTION:

  1. Added following flags to cmake ../ command:
    -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX=/usr

  2. Added command sudo ldconfig
    (ldconfig command alone did not solve the problem untill I first rebuilt and reinstalled using above noted flags with cmake).

By doing above two things, I no longer needed following two commands:

sudo dnf install rtl-sdr
sudo cp /usr/local/lib/pkgconfig/librtlsdr.pc /usr/share/pkgconfig/librtlsdr.pc

.
ADDITIONAL IMPROVEMENT:
I also added these two flags to cmake ../:
-DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON

This eliminated blacklisting of rtl modules. Following two steps are no longer required:

sudo nano /etc/modprobe.d/blacklist-rtl-sdr.conf 
#Copy-paste following:
blacklist rtl2832
nblacklist dvb_usb_rtl28xxu
blacklist rtl8192cu
blacklist rtl8xxxu

.

sudo wget -O /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules"

UPDATED PROCEDURE

sudo dnf install libusb-devel     
sudo dnf install ncurses-devel    
sudo dnf install make  
sudo dnf install cmake
git clone https://github.com/steve-m/librtlsdr.git 
cd librtlsdr 
sudo mkdir build && cd build 
sudo cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX=/usr 
sudo make 
sudo make install 
sudo ldconfig 

sudo git clone https://github.com/flightaware/dump1090.git dump1090-fa 
cd dump1090-fa  
sudo make BLADERF=no  


sudo cp ~/dump1090-fa/dump1090 /usr/bin/dump1090-fa
sudo cp ~/dump1090-fa/debian/dump1090-fa.default /etc/default/dump1090-fa  
sudo cp ~/dump1090-fa/debian/dump1090-fa.service /usr/lib/systemd/system/dump1090-fa.service  
sudo mkdir -p /usr/share/dump1090-fa/  
sudo cp ~/dump1090-fa/debian/start-dump1090-fa /usr/share/dump1090-fa/start-dump1090-fa  
sudo cp -r ~/dump1090-fa/public_html /usr/share/dump1090-fa/html  
sudo useradd --system dump1090  
 
sudo systemctl enable dump1090-fa
sudo systemctl restart dump1090-fa

Thanks @wiedehopf. Disabling SELinux solved the problem:

sudo nano /etc/sysconfig/selinux

Changed
SELINUX=enforcing
to
SELINUX=disabled
Rebooted Fedora

[abcd@localhost ~]$ wget http://localhost/dump1090-fa/data/aircraft.json
--2020-01-25 01:01:27--  http://localhost/dump1090-fa/data/aircraft.json
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 489 [application/json]
Saving to: ‘aircraft.json’

aircraft.json       100%[===================>]     489  --.-KB/s    in 0s

2020-01-25 01:01:27 (2.08 MB/s) - ‘aircraft.json’ saved [489/489]

NEXT ISSUE: SkyView fails to load from another computer on same network (This problem is NOT due to disabling of SELinux. It existed even before disabling SELinux)

Tried IP-of-Fedora/dump1090-fa/ - failed (timed out)

Checked Firewall status

[abcd@localhost ~]$ sudo firewall-cmd --list-all --zone=public
public
  target: default
  icmp-block-inversion: no
  interfaces:
  sources:
  services: dhcpv6-client mdns ssh
  ports: 80/tcp 443/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

Checked Netstat

[abcd@localhost ~]$ sudo netstat -ntulp

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:8080         0.0.0.0:*         LISTEN      763/lighttpd
tcp        0      0 0.0.0.0:80           0.0.0.0:*         LISTEN      763/lighttpd
tcp        0      0 0.0.0.0:30002        0.0.0.0:*         LISTEN      1349/dump1090-fa
tcp        0      0 0.0.0.0:30003        0.0.0.0:*         LISTEN      1349/dump1090-fa
tcp        0      0 0.0.0.0:30004        0.0.0.0:*         LISTEN      1349/dump1090-fa
tcp        0      0 0.0.0.0:30005        0.0.0.0:*         LISTEN      1349/dump1090-fa
tcp        0      0 0.0.0.0:22           0.0.0.0:*         LISTEN      764/sshd
tcp        0      0 127.0.0.1:631        0.0.0.0:*         LISTEN      762/cupsd
tcp        0      0 0.0.0.0:30104        0.0.0.0:*         LISTEN      1349/dump1090-fa
tcp6       0      0 :::30002             :::*              LISTEN      1349/dump1090-fa
tcp6       0      0 :::30003             :::*              LISTEN      1349/dump1090-fa
tcp6       0      0 :::30004             :::*              LISTEN      1349/dump1090-fa
tcp6       0      0 :::30005             :::*              LISTEN      1349/dump1090-fa
tcp6       0      0 :::22                :::*              LISTEN      764/sshd
tcp6       0      0 ::1:631              :::*              LISTEN      762/cupsd
tcp6       0      0 :::30104             :::*              LISTEN      1349/dump1090-fa
udp        0      0 0.0.0.0:38989        0.0.0.0:*                     653/avahi-daemon: r
udp        0      0 127.0.0.1:323        0.0.0.0:*                     699/chronyd
udp        0      0 0.0.0.0:5353         0.0.0.0:*                     653/avahi-daemon: r
udp6       0      0 :::40387             :::*                          653/avahi-daemon: r
udp6       0      0 ::1:323              :::*                          699/chronyd
udp6       0      0 fe80::244e:7461:3be:546 :::*                          737/NetworkManager
udp6       0      0 :::5353              :::*                          653/avahi-daemon: r

.

Tried IP-of-Fedora:8080 - Success map shows

After Googling, found on this site, that it is NOT necessary to disable SELinux as suggested in https://www.tecmint.com/disable-selinux-in-centos-rhel-fedora/.

Instead, keep SELINUX=enforcing and issue following command, and it does the trick:

sudo semanage permissive -a httpd_t

Problem still to resolve:
From another computer on same LAN, IP-of-Fedora/dump1090-fa/ does NOT work (time out).
However IP-of-Fedora:8080 works OK

 

Did not use chmod 777.
Instead solved it like this:

 

1 Like