[ixpmanager] Assistance with Birdseye and HTTP 500 Error
Barry O'Donovan (INEX)
barry.odonovan at inex.ie
Sun Apr 27 15:21:01 IST 2025
Hi Michel,
Have you tried runnning with:
APP_DEBUG=true
in your env files?
- Barry
------ Original Message ------
>From "Michel Blais via ixpmanager" <ixpmanager at inex.ie>
To "Barry O'Donovan (INEX)" <barry.odonovan at inex.ie>
Cc "Michel Blais" <michel.blais.qc at gmail.com>; "INEX IXP Manager Users
Mailing List" <ixpmanager at inex.ie>
Date 26/04/2025 20:51:09
Subject Re: [ixpmanager] Assistance with Birdseye and HTTP 500 Error
>Finally, I can't figure out why I still get the 500 error. Help would
>be appreciated. Here is the debug info.
>
>I can't query the api. I get an error that it's not found.
>curl -v ipv4.rs1.dm1a.2675pt.qix.ca/api/status
>* Host ipv4.rs1.dm1a.2675pt.qix.ca:80 was resolved.
>* IPv6: (none)
>* IPv4: 192.168.240.31
>* Trying 192.168.240.31:80...
>* Connected to ipv4.rs1.dm1a.2675pt.qix.ca (192.168.240.31) port 80
> > GET /api/status HTTP/1.1
> > Host: ipv4.rs1.dm1a.2675pt.qix.ca
> > User-Agent: curl/8.5.0
> > Accept: */*
> >
>< HTTP/1.1 404 Not Found
>< Content-Type: text/html
>< Content-Length: 341
>< Date: Sat, 26 Apr 2025 15:25:41 GMT
>< Server: lighttpd/1.4.69
><
><?xml version="1.0" encoding="iso-8859-1"?>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>404 Not Found</title>
> </head>
> <body>
> <h1>404 Not Found</h1>
> </body>
></html>
>* Connection #0 to host ipv4.rs1.dm1a.2675pt.qix.ca left intact
>
>But I can query test.php
>curl ipv4.rs1.dm1a.2675pt.qix.ca/test.php
>=====================
>WORKING
>=====================
>
>index.php return a error 500
>curl ipv4.rs1.dm1a.2675pt.qix.ca/index.php
><!DOCTYPE html>
><html lang="en">
><head>
> <meta charset="UTF-8" />
> <meta name="robots" content="noindex,nofollow,noarchive" />
> <title>An Error Occurred: Internal Server Error</title>
> <link rel="icon" href="data:image/svg+xml,<svg
>xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text
>y=%221.2em%22 font-size=%2296%22>❌</text></svg>" />
> <style>body { background-color: #fff; color: #222; font: 16px/1.5
>-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica
>Neue", Arial, sans-serif; margin: 0; }
>.container { margin: 30px; max-width: 600px; }
>h1 { color: #dc3545; font-size: 24px; }
>h2 { font-size: 18px; }</style>
></head>
><body>
><div class="container">
> <h1>Oops! An Error Occurred</h1>
> <h2>The server returned a "500 Internal Server Error".</h2>
>
> <p>
> Something is broken. Please let us know what you were doing
>when this error occurred.
> We will fix it as soon as possible. Sorry for any inconvenience
>caused.
> </p>
></div>
></body>
></html>
>
>Here is the birdseye version
>cat /opt/birdseye/version.php
><?php
>
>$_ENV['BIRDSEYE_API_VERSION'] = '2.1.0';
>
>And the PHP version
>php --version
>PHP 8.3.20 (cli) (built: Apr 14 2025 18:44:12) (NTS)
>
>The wrapper work fine for both IPv4 and IPv6 daemon
>sudo -u www-data /usr/bin/sudo /opt/birdseye/bin/birdc -2 -s
>/var/run/bird/bird-rs1-dm1a-2675pt-ipv4.ctl "show status"
>BIRD 2.17 ready.
>Access restricted
>BIRD 2.17
>Router ID is 149.112.119.253
>Hostname is rs1.dm1a.2675pt
>Current server time is 2025-04-26 11:36:08
>Last reboot on 2025-04-14 19:08:00
>Last reconfiguration on 2025-04-26 11:30:01
>Daemon is up and running
>sudo -u www-data /usr/bin/sudo /opt/birdseye/bin/birdc -2 -s
>/var/run/bird/bird-rs1-dm1a-2675pt-ipv6.ctl "show status"
>BIRD 2.17 ready.
>Access restricted
>BIRD 2.17
>Router ID is 149.112.119.253
>Hostname is rs1.dm1a.2675pt
>Current server time is 2025-04-26 11:36:12
>Last reboot on 2025-04-14 19:08:00
>Last reconfiguration on 2025-04-26 11:30:01
>Daemon is up and running
>
>Her is the environnements config
>cat /srv/birdseye/*env | egrep -v '(^#)|(^\s*$)'
>BIRDC="/usr/bin/sudo /opt/birdseye/bin/birdc -2 -s
>/var/run/bird/bird-rs1-dm1a-2675pt-ipv4.ctl"
>
>CACHE_DRIVER=file
>
>LOOKING_GLASS_ENABLED=true
>
>BIRDC="/usr/bin/sudo /opt/birdseye/bin/birdc -2 -s
>/var/run/bird/bird-rs1-dm1a-2675pt-ipv6.ctl"
>
>CACHE_DRIVER=file
>
>LOOKING_GLASS_ENABLED=true
>
>
>The RS config from the DB
>mysql> SELECT * FROM routers WHERE id = 3\G
>
>*************************** 1. row ***************************
>
> id: 3
>
> pair_id: NULL
>
> vlan_id: 1
>
> handle: rs1-dm1a-2675pt-ipv6
>
> protocol: 6
>
> type: 1
>
> name: RS1 - 2675pt - PVE NET1 - IPv6
>
> shortname: RS1 - 2675pt - IPv6
>
> router_id: 149.112.119.253
>
> peering_ip: 2602:f777::253
>
> asn: 15037
>
> software: 6
>
> mgmt_host: rs1.dm1a.2675pt.qix.ca
>
> api: https://ipv6.rs1.dm1a.2675pt.qix.ca/api
>
> api_type: 1
>
> lg_access: 0
>
> quarantine: 0
>
> bgp_lc: 1
>
> template: api/v4/router/server/bird2/standard
>
> skip_md5: 0
>
> last_update_started: 2025-04-26 12:45:01
>
> last_updated: 2025-04-26 12:45:01
>
> pause_updates: 0
>
> rpki: 0
>
> software_version: 2.17
>
> operating_system: Debian
>
>operating_system_version: 12
>
> rfc1997_passthru: 1
>
> created_at: 2025-04-13 15:02:33
>
> updated_at: 2025-04-26 12:45:01
>
>1 row in set (0.00 sec)
>
>
>
>mysql> SELECT * FROM routers WHERE id = 1\G
>
>*************************** 1. row ***************************
>
> id: 1
>
> pair_id: NULL
>
> vlan_id: 1
>
> handle: rs1-dm1a-2675pt-ipv4
>
> protocol: 4
>
> type: 1
>
> name: RS1 - 2675pt - PVE NET1 - IPv4
>
> shortname: RS1 - 2675pt - IPv4
>
> router_id: 149.112.119.253
>
> peering_ip: 149.112.119.253
>
> asn: 15037
>
> software: 6
>
> mgmt_host: rs1.dm1a.2675pt.qix.ca
>
> api: https://ipv4.rs1.dm1a.2675pt.qix.ca/api
>
> api_type: 1
>
> lg_access: 0
>
> quarantine: 0
>
> bgp_lc: 1
>
> template: api/v4/router/server/bird2/standard
>
> skip_md5: 0
>
> last_update_started: 2025-04-26 12:45:01
>
> last_updated: 2025-04-26 12:45:01
>
> pause_updates: 0
>
> rpki: 0
>
> software_version: 2.17
>
> operating_system: Debian
>
>operating_system_version: 12
>
> rfc1997_passthru: 1
>
> created_at: 2025-04-10 03:27:54
>
> updated_at: 2025-04-26 12:45:01
>
>1 row in set (0.00 sec)
>
>
>No log entries on storage when the error 500 happen.
>root at rs1:/opt/birdseye# ls -la storage/logs/
>
>total 12
>
>drwxr-xr-x 2 www-data www-data 4096 Apr 20 08:09 .
>
>drwxr-xr-x 5 www-data www-data 4096 Apr 20 08:09 ..
>
>-rw-r--r-- 1 www-data www-data 1778 Apr 20 08:10 lumen-2025-04-20.log
>
>
>Lighttpd log entries. DEPRECATED entries comes from using the inex
>config but I don't have those error with the default debian config. I
>have the same 500 error with both config.
>2025-04-20 09:54:56: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-20 09:54:57: (server.c.1704) server started (lighttpd/1.4.69)
>
>2025-04-24 19:24:33: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-24 19:24:33: (server.c.1704) server started (lighttpd/1.4.69)
>
>2025-04-24 21:20:15: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-24 21:20:16: (server.c.1704) server started (lighttpd/1.4.69)
>
>2025-04-26 09:22:31: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-26 09:22:31: (server.c.1704) server started (lighttpd/1.4.69)
>
>2025-04-26 14:55:32: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-26 14:55:32: (server.c.1704) server started (lighttpd/1.4.69)
>
>2025-04-26 14:55:32: (mod_deflate.c.736) DEPRECATED: compress.filetype
>replaced with deflate.mimetypes
>
>2025-04-26 14:55:32: (mod_deflate.c.799) DEPRECATED: compress.cache-dir
>replaced with deflate.cache-dir
>
>2025-04-26 14:56:38: (server.c.2078) server stopped by UID = 0 PID = 1
>
>2025-04-26 14:56:39: (server.c.1704) server started (lighttpd/1.4.69)
>
>
>Same via "journalctl -t lighttpd"
>Apr 19 10:52:51 rs1.dm1a.2675pt lighttpd[60354]: include
>"/etc/lighttpd/conf-enabled/*.conf"
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006655]: WARNING:
>include-conf-enabled.pl is deprecated and slated for removal.
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006655]: Replace in
>lighttpd.conf with:
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006655]: include
>"/etc/lighttpd/conf-enabled/*.conf"
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006650]: 2025-04-26 14:55:32:
>(mod_deflate.c.736) DEPRECATED: compress.filetype replaced with
>deflate.mim>
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006650]: 2025-04-26 14:55:32:
>(mod_deflate.c.799) DEPRECATED: compress.cache-dir replaced with
>deflate.ca>
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006661]: WARNING:
>include-conf-enabled.pl is deprecated and slated for removal.
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006661]: Replace in
>lighttpd.conf with:
>
>Apr 26 14:55:32 rs1.dm1a.2675pt lighttpd[1006661]: include
>"/etc/lighttpd/conf-enabled/*.conf"
>
>
>The lighttpd config file
>server.modules = (
>
>"mod_indexfile",
>
>"mod_access",
>
>"mod_alias",
>
> "mod_redirect",
>
>)
>
>
>
>server.document-root = "/opt/birdseye/public"
>
>server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
>
>server.errorlog = "/var/log/lighttpd/error.log"
>
>server.pid-file = "/run/lighttpd.pid"
>
>server.username = "www-data"
>
>server.groupname = "www-data"
>
>server.port = 80
>
>server.bind ="192.168.240.31"
>
>
>
># features
>
>#https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_feature-flagsDetails
>
>server.feature-flags += ("server.h2proto" => "enable")
>
>server.feature-flags += ("server.h2c" => "enable")
>
>server.feature-flags += ("server.graceful-shutdown-timeout" => 5)
>
>#server.feature-flags += ("server.graceful-restart-bg" =>
>"enable")
>
>
>
># strict parsing and normalization of URL for consistency and security
>
>#
>https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
>
># (might need to explicitly set "url-path-2f-decode" = "disable"
>
># if a specific application is encoding URLs inside url-path)
>
>server.http-parseopts = (
>
> "header-strict" => "enable",# default
>
> "host-strict" => "enable",# default
>
> "host-normalize" => "enable",# default
>
> "url-normalize-unreserved"=> "enable",# recommended highly
>
> "url-normalize-required" => "enable",# recommended
>
> "url-ctrls-reject" => "enable",# recommended
>
> "url-path-2f-decode" => "enable",# recommended highly (unless
>breaks app)
>
> #"url-path-2f-reject" => "enable",
>
> "url-path-dotseg-remove" => "enable",# recommended highly (unless
>breaks app)
>
> #"url-path-dotseg-reject" => "enable",
>
> #"url-query-20-plus" => "enable",# consistency in query string
>
>)
>
>
>
>index-file.names = ( "index.php", "index.html" )
>
>url.access-deny = ( "~", ".inc" )
>
>static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
>
>
>
># default listening port for IPv6 falls back to the IPv4 port
>
>include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
>
>include_shell "/usr/share/lighttpd/create-mime.conf.pl"
>
>include "/etc/lighttpd/conf-enabled/*.conf"
>
>
>
>#server.compat-module-load = "disable"
>
>server.modules += (
>
>"mod_dirlisting",
>
>"mod_staticfile",
>
>)
>
>
>I also tried this one based on the inex config. Both with same 500
>error.
># Sample Bird's Eye Lighttpd config - just added a small amount to
>
># the standard Lighttpd configuration.
>
>
>
>server.modules = (
>
> "mod_access",
>
> "mod_alias",
>
> #"mod_compress",
>
> "mod_deflate",
>
> "mod_redirect",
>
> "mod_rewrite",
>
>)
>
>
>
>server.document-root = "/opt/birdseye/public"
>
>server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
>
>server.errorlog = "/var/log/lighttpd/error.log"
>
>server.pid-file = "/var/run/lighttpd.pid"
>
>server.username = "www-data"
>
>server.groupname = "www-data"
>
>server.port = 80
>
>server.bind = "192.168.240.31"
>
>
>
>index-file.names = ( "index.php", "index.html",
>"index.lighttpd.html" )
>
>url.access-deny = ( "~", ".inc" )
>
>static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
>
>
>
>compress.cache-dir = "/var/cache/lighttpd/compress/"
>
>compress.filetype = ( "application/javascript", "text/css",
>"text/html", "text/plain" )
>
>
>
># default listening port for IPv6 falls back to the IPv4 port
>
>## Use ipv6 if available
>
>#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
>
>include_shell "/usr/share/lighttpd/create-mime.conf.pl"
>
>include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
>
>
>
>url.redirect = ()
>
>url.rewrite-once = (
>
>
>"^/(css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf)$"
>=> "$0",
>
> "^/(favicon\.ico|robots\.txt|sitemap\.xml)$" => "$0",
>
> "^/test\.php$" => "$0",
>
> "^/[^\?]*(\?.*)?$" => "/index.php/$1"
>
>)
>
>
>And I added a symbolic link from /srv/birdseye pointing to
>/opt/birdseye just in case the path used by inex could still be
>somewhere in the config files.
>
>Thanks
>
>Le sam. 26 avr. 2025 à 08:26, Michel Blais <michel.blais.qc at gmail.com>
>a écrit :
>>Thanks Barry,
>>
>>I was confused between the binary and the wrapper since they both have
>>the same name and are both in a directory called bin.
>>
>>Thanks for pointing that out. I still get an error 500 but I will try
>>to figure it out with the debugging documentation and if I can't
>>figure it out, write back with all the needed information indicated in
>>the doc.
>>
>>Thanks again.
>>
>>Le jeu. 24 avr. 2025 à 07:01, Barry O'Donovan (INEX)
>><barry.odonovan at inex.ie> a écrit :
>>>
>>>Hi Michel,
>>>
>>> >I'm new to IXP manager and would need help with birdseye.
>>>Welcome!
>>>
>>>Did you see the debugging section at:
>>>
>>>https://docs.ixpmanager.org/latest/features/looking-glass/#debugging
>>>
>>>And can you run through this providing the output along the way?
>>>
>>>Other notes:
>>>
>>>
>>> >Initially tried version 2.0 with PHP 8.2 from the Debian repository
>>>
>>>This should probably have worked? But:
>>>
>>> >Then installed PHP 8.3 from the sury.org repository and tried
>>>Birdseye
>>> >2.1
>>> >Also tried PHP 8.4 briefly but encountered many deprecated warnings
>>>in
>>> >the Lighttpd logs, so I reverted to 8.3
>>>
>>>2.1 is a better choice; depreciation warnings can be ignored (and
>>>turned
>>>off).
>>>
>>> >My .env file for the route server looks like this:
>>> >cat birdseye-rs1-cabId-dcName-ipv4.env
>>> >IRDC="/usr/bin/sudo /usr/local/sbin/birdc -s
>>> >/var/run/bird/bird-rs1-cabId-dcName-ipv4.ctl"
>>>Why are you calling birdc directly? You should be using the wrapper
>>>script (or a modified version of it if necessary) as supplied in the
>>>Birdseye bin/ directory. This ensures birdc is run in restricted
>>>(read-only) mode.
>>>
>>>(Preumably you cut the ‘B’ from the start of the above line when
>>>pasting
>>>also).
>>>
>>>
>>> >The www-data user is able to successfully run Bird commands via the
>>> >CLI:
>>> >su -l www-data -s /bin/bash
>>> >/usr/bin/sudo /usr/local/sbin/birdc -s
>>> >/var/run/bird/bird-rs1-cabId-dcName-ipv4.ctl "show status”
>>>
>>>You need to do this with the wrapper script.
>>>
>>> >but I had to remove the "-2" because this option doesn't seem to be
>>> >supported anymore in bird 2.17.
>>>
>>>-2 is not a bircd parameter but a wrapper script parameter:
>>>
>>># parameter $1: either -4 or -6 to chose between birdc and birdc6, or
>>>-2
>>>for Bird v2
>>>
>>> - Barry
>>
>>
>>--
>>Cordialement, / With regards,
>>
>>Michel Blais
>>
>
>
>--
>Cordialement, / With regards,
>
>Michel Blais
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20250427/617883b3/attachment-0001.htm>
More information about the ixpmanager
mailing list