Upgrade to PHP8.4 and now getting 502 bad Gateway

Been running on Ubuntu 24.04 with PHP8.3, upgraded to 8.4. Followed several guides on this site and everything looks good under the hood but getting a 502 Bad Gateway from a browser. Any guidance would be appreciated. No real significant errors in /var/log/nginx either. Am seeing errors in /opt/librenms/logs/error.log, listed at the bottom. Here are my relevant configs and statuses:

librenms@:~$ ./validate.php

Component Version
LibreNMS 26.9.0-dev.4+3411dbf20 (2026-08-18T10:01:01+00:00)
DB Schema 2026_07_30_162514_add_device_refresh_config_permission (397)
PHP 8.4.24
Python 3.12.3
Database MariaDB 10.11.14-MariaDB-0ubuntu0.24.04.1
RRDTool 1.7.2
SNMP 5.9.4.pre2
===========================================

[OK] Composer Version: 2.9.7
[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] rrd_dir is writable
[OK] rrdtool version ok


/etc/php/8.4/fpm/pool.d/librenms.conf

; pool name (‘www’ here)
[librenms]

; If the group is not set, the user’s group is used.
user = librenms
group = librenms

; Note: This value is mandatory.
listen = /run/php/php-fpm-librenms.sock

; Default Values: Owner is set to the master process running user. If the group

; is not set, the owner’s group is used. Mode is set to 0660.
listen.owner = www-data
listen.group = www-data
;listen.mode = 0660


/etc/php/8.4/fpm/pool.d/www.conf

; pool name (‘www’ here)
[www]

; If the group is not set, the user’s group is used.
user = www-data
group = www-data

; Note: This value is mandatory.
listen = /run/php/php8.4-fpm.sock

;is not set, the owner’s group is used. Mode is set to 0660.

listen.owner = www-data
listen.group = www-data
;listen.mode = 0660


/etc/nginx/conf.d/librenms.conf

location ~ [^/].php(/|$) {
fastcgi_pass unix:/run/php-fpm-librenms.sock;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi.conf;
}



/run/php/
srw-rw---- 1 www-data www-data 0 Aug 18 12:48 php8.4-fpm.sock
srw-rw---- 1 www-data www-data 0 Aug 18 12:48 php-fpm-librenms.sock


/opt/librenms/logs/error.log
2026/08/18 13:03:06 [crit] 1150#1150: *1 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream,
client:10.1.x.x, server: <redact-name.local.net>, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php-fpm-librenms.sock:”, host: “10.6.x.x”

Hi,

look, the path is wrong

listen = /run/php/php8.4-fpm.sock ↔ fastcgi_pass unix:/run/php-fpm-librenms.sock;

that should be identically as far as i remember.

Ok, updated the librenms.conf and pointed to /run/php/php8.4-fpm.sock but now the php8.4-fpm.service will not start

Logs are pointing to the [librenms] pool and the [www] pool conflicting we each other, I’m assuming its because both are pointing at /run/php/php8.4-fpm.sock

Can I get rid of the [www] pool?

[19-Aug-2026 11:14:58] ERROR: [pool www] unable to set listen address as it’s already used in another pool ‘librenms’
[19-Aug-2026 11:14:58] ERROR: failed to post process the configuration

Double Check your settings.

Best way how to do it you can read here:

Thank you! I’m am back up, removed the www.conf and that resolved the php8.4-fpm.service conflict and somehow I miss-configured the nginx config…messed up the fastcgi_pass path, had /run/php8.4-fpm.sock instead of /run/php//php8.4-fpm.sock. Again thanks for the help!