r/LibreNMS • • Sep 28 '26

PHP Update Failed

I did the required PHP update from 8.3 to 8.4. php-v shows that I am running 8.4.26 in the command line. However, my web GUI shows 502 Bad Gateway (nginx 1.18.0).

I am trying to follow the steps in a old post about updating 8.1 to 8.3. This is the validate php result.

I x'd out the rrd IP addresses here. I don't think that's the issue.

The final line of the validate says I must run this script as librenms or root, but I don't know what script that refers to.

I am a not well-versed with Linux, so I am looking for an "Idiot's Guide..."

Thank you.

Component | Version
--------- | -------
LibreNMS  | 26.9.1 (2026-09-22T13:33:27-04:00)
DB Schema | 2026_09_16_120000_widen_ent_physical_rev_columns (403)
PHP       | 8.4.26
Python    | 3.10.12
Database  | MariaDB 10.6.23-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1

[OK]    Composer Version: 2.10.3
[OK]    Dependencies up-to-date.
[OK]    Database Connected
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[OK]    No errors found with polling frequencies.
[WARN]  Could not check Python dependencies because this script is not running as librenms
[FIX]: 
The install docs show how this is done on a new install: https://docs.librenms.org/Installation/Install-LibreNMS/#configure-php-fpm
[OK]    rrd_dir is writable
[FAIL]  Some RRD files have the incorrect step. 602/6257
[FIX]: 
lnms maintenance:rrd-step all
RRD files with incorrect step:
xxx.xxx.xxx.xxx/port-id2384.rrd: the step is 300, but it must be 60

and 587 more...
[OK]    rrdtool version ok
[FAIL]  You need to run this script as 'librenms' or root

1 Upvotes

14 comments sorted by

View all comments

1

u/1div0 Sep 28 '26

For NGINX to talk to PHP the socket definition in the respective configs need to match. e.g.,

librenms@libre:~$ grep '^listen =' /etc/php/8.5/fpm/pool.d/librenms.conf
listen = /run/php/php8.5-fpm-librenms.sock

librenms@libre:~$ grep fastcgi_pass /etc/nginx/conf.d/librenms.conf
#   fastcgi_pass unix:/run/php/php8.3-fpm-librenms.sock;
  fastcgi_pass unix:/run/php/php8.5-fpm-librenms.sock;

librenms@libre:~$ ls -lh /run/php/php8.5-fpm-librenms.sock
srw-rw---- 1 www-data www-data 0 Sep 28 12:49 /run/php/php8.5-fpm-librenms.sock

2

u/tonymurray Sep 29 '26

This is why the docs suggest you don't add the version to the php-fpm socket path... no config changes during php updates, only copy librenms.conf to the new php fpm config directory.

1

u/1div0 Sep 29 '26

Absolutely! I'm not sure why I veered off the beaten path. I should correct mine.

1

u/fleckermann Sep 30 '26

This is the solution. Thanks to everyone in the thread.