502 Bad Gateway After PHP8.1 Upgrade

That time of year to upgrade PHP and break everything. Validate command shows everything is ok. I followed the install instructions again and had to fix some things that way, but still getting the 502. What do I need to do to resolve this?

librenms@librenmsv2:~$ ./validate.php

Component Version
LibreNMS 22.9.0-34-ge4fdbbd82 (2022-10-03T13:55:49-04:00)
DB Schema 2022_09_03_091314_update_ports_adsl_table_with_defaults (246)
PHP 8.1.11
Python 3.8.10
Database MariaDB 10.3.34-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8

===========================================

[OK] Composer Version: 2.4.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[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] rrdtool version ok
[OK] Connected to rrdcached

Maybe php-fpm issue - have a look at this: Upgrading Ubuntu 20 to Ubuntu 22 and PHP 8.1 - #5 by murrant

1 Like

Can you check your socket is the same in php and nginx?
grep unix /etc/nginx/conf.d/librenms.conf
grep listen /etc/php-fpm.d/librenms.conf

Also, is your /var/logs/nginx/error.log saying something about fastcgi_params or fastcgi.conf ?
If your /etc/nginx/conf.d/librenms.conf is including fastcgi.conf, you might need to call fastcgi_params instead.

And as said rhinoau, you should check you have every package you need, maybe you installed some php74-xml and you didn’t install php81-xml for example.

Edit: whoops, solved in the meanwhile, enjoy

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.