Installing RRDCached and now getting 502 Bad Gateway

I’m getting 502 Bad Gateway after installation of RRDCached
LibreNMS was running fine before. I followed Ubuntu 16 installation instructions here:

[email protected]:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 22.6.0-27-gafb5fb7ee
DB Schema | 2022_05_30_084932_update-app-status-length (242)
PHP       | 7.4.30
Python    | 3.10.4
MySQL     | 10.6.7-MariaDB-2ubuntu1
RRDTool   | 1.7.2
SNMP      | 5.9.1
====================================

[OK]    Composer Version: 2.3.9
[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]    rrdtool version ok
[OK]    Connected to rrdcached
[email protected]:~$

NGINX errorlog:
2022/07/10 22:55:27 [crit] 2319908#2319908: *1 connect() to unix:/run/php/php7.4-fpm-librenms.sock failed (13: Permission denied) while connecting to upstream, client:

/etc/php/7.4/fpm/pool.d/librenms.conf:
listen = /run/php/php7.4-fpm-librenms.sock

/etc/nginx/conf.d/librenms.conf:
fastcgi_pass unix:/run/php/php7.4-fpm-librenms.sock;

service php7.4-fpm status:
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-07-10 22:54:28 CEST; 40min ago
Docs: man:php-fpm7.4(8)
Process: 2319918 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Main PID: 2319915 (php-fpm7.4)
Status: “Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec”
Tasks: 3 (limit: 2240)
Memory: 10.8M
CPU: 235ms
CGroup: /system.slice/php7.4-fpm.service
├─2319915 “php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”
├─2319916 “php-fpm: pool librenms” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”
└─2319917 “php-fpm: pool librenms” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”

Jul 10 22:54:28 nms01 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager…
Jul 10 22:54:28 nms01 systemd[1]: Started The PHP 7.4 FastCGI Process Manager.

Any help appreciated :slight_smile:

Jens

This is your problem, your nginx user cant access the socket file. Its described in the installation docs; Installing LibreNMS - LibreNMS Docs

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