0

trying to run BirdNET-pi (https://github.com/mcguirepr89/BirdNET-Pi) on my new Pi5. This is a sound analyzing program which is accessible via webinterface.

This is working on my Pi4 (Bullseye Lite), but I can't make it work on my Pi5 (Bookworm Lite). I think the issue is related to Caddy, though not 100% sure... I have limited knowledge of webservers and close to no knowledge of Caddy, but trying to rootcause the issue though.

The installation of the install script on a fresh Bookworm Lite OS is successful. However, I can not access the page webpage.

  1. I noticed, Apache was installed on the Pi5, but this was NOT installed on the Pi4:

Pi4 (working):

pibirdnet:~/BirdNET-Pi$ apachectl status
-bash: apachectl: command not found

Pi5 (setup not working):

pi:~/BirdNET-Pi$  apachectl status
/usr/sbin/apachectl: 113: www-browser: not found
'www-browser -dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars

As a result, I get directed to the Apache page when browsing to the site

enter image description here

So, I'm stopping Apache on the Pi5:

sudo service apache2 stop

and after changing a reference file in the Caddyfile (php8.2-fpm.sock instead of php7.4-fpm.sock which was in the install script), I get this reply (Caddy is enabled and running now):

Pi5 (not working):

pi:~/BirdNET-Pi$ curl -v 127.0.0.1:80
*   Trying 127.0.0.1:80...
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Server: Caddy
< Date: Wed, 13 Dec 2023 21:10:24 GMT
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact

As a reference, I get this on my Pi4 (working):

pibirdnet:~/BirdNET-Pi$  curl -v 127.0.0.1:80
*   Trying 127.0.0.1:80...
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Server: Caddy
< Date: Wed, 13 Dec 2023 21:11:41 GMT
< Content-Length: 716

I thought this might be related to access rights, so gave full read/write access to the folder where the www data is, but this doesn't change anything.

  1. Not sure if this matters, but one thing I observed, is difference here:

Pi4 (working):

pibirdnet:~/BirdNET-Pi$ getcap -r / 2>/dev/null
pibirdnet:~/BirdNET-Pi$

Pi5 (not working):

pi:~/BirdNET-Pi$ getcap -r / 2>/dev/null
/usr/lib/aarch64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-ptp-helper cap_net_bind_service,cap_net_admin=ep
pi:~/BirdNET-Pi$

Note that the Caddyfile /etc/caddy/ has the same folder reference

So,... I'm a bit clueless, but I think somehow it has to do with access rights differences Bookworm vs Bullseye.

For info, the Caddyfile is as following:

http://  {
  root * /home/pi/BirdSongs/Extracted
  file_server browse
  handle /By_Date/* {
    file_server browse
  }
  handle /Charts/* {
    file_server browse
  }
  reverse_proxy /stream localhost:8000
  php_fastcgi unix//run/php/php8.2-fpm.sock
  reverse_proxy /log* localhost:8080
  reverse_proxy /stats* localhost:8501
  reverse_proxy /terminal* localhost:8888
}
  1. so, now, when I do this:

Pi4 (working), this one is on 192.168.15.55:

192.168.15.55 is loading
192.168.15.55/index.php is loading

Pi5 (not working) this one is on 192.168.15.185:

192.168.15.185 gives Access Denied (error 403)
192.168.15.185/index.php gives File not found

Added the handle_logger to the Caddyfile, and getting below reply:

403 Forbidden stat /home/pi/BirdSongs/Extracted: permission denied fileserver.(*FileServer).ServeHTTP (staticfiles.go:282) r9uk4n20p
6
  • I wonder if the issue is bullseye vs bookworm rather than pi4 vs pi5 Dec 13, 2023 at 22:30
  • have you also confirmed the same version of caddy on both pi's Dec 13, 2023 at 22:38
  • sure, the issue is bookworm, but unfort I can not run bullseye on Pi5 :-(.
    – pieterdp
    Dec 14, 2023 at 7:31
  • the Pi5 (bookworm) has 2.7.6; the Pi4 has 2.7.5
    – pieterdp
    Dec 14, 2023 at 7:35
  • difference in the Pi4 vs Pi5, output of /etc/passwd: Pi4: caddy:x:999:995:Caddy web server:/var/lib/caddy:/usr/sbin/nologin Pi5: caddy:x:999:992:Caddy web server:/var/lib/caddy:/usr/sbin/nologin
    – pieterdp
    Dec 14, 2023 at 17:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.