LibreNMS - 502 Bad Gateway

Hey Guys,

I upgraded ubuntu from Ubuntu 21.04 to 22.1, and since then I’m able to run ./daily.sh and ./validate.php successfully

librenms@librenms:~$ ./validate.php

Component Version
LibreNMS 22.12.0 (2022-12-28T14:26:21-04:00)
DB Schema 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP 8.1.2-1ubuntu2.9
Python 3.10.6
Database MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.1
[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
[FAIL] Time between this server and the mysql database is off
Mysql time 2023-01-19 15:56:14
PHP time 2023-01-19 11:56:14
[FAIL] Both Dispatcher Service and Python Wrapper were active recently, this could cause double polling
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
librenms@librenms:~$
librenms@librenms:~$

The timezones were set to match not sure why this error was received

update here, error seems to be related to the below.

2023/01/24 16:45:52 [crit] 899522#899522: *61 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: 10.77.6.231, server: 10.77.0.6, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/run/php-fpm-librenms.sock:”, host: “10.77.0.6”

thoughts ?

so i was able to resolve this

in
vi /etc/php/8.1/fpm/pool.d/librenms.conf

user = librenms
group = librenms

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; ‘ip.add.re.ss:port’ - to listen on a TCP socket to a specific IPv4 address on
; a specific port;
; ‘[ip:6:addr:ess]:port’ - to listen on a TCP socket to a specific IPv6 address on
; a specific port;
; ‘port’ - to listen on a TCP socket to all addresses
; (IPv6 and IPv4-mapped) on a specific port;
; ‘/path/to/unix/socket’ - to listen on a unix socket.
; Note: This value is mandatory.
listen = /run/php/php-fpm.sock

must match with

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

server {
listen 80;
server_name <server_address>;
root /opt/librenms/html;
index index.php;

charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/].php(/|$) {
fastcgi_pass unix:/run/php/php-fpm.sock;

however now I encountered the below.

which is odd because I’m seeing read/write/execute privileges

how do I proceed ?

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