Nagios Core UI 503 Service Unavailable

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
uc-vel
Posts: 3
Joined: Wed Jan 13, 2021 6:19 pm

Nagios Core UI 503 Service Unavailable

Post by uc-vel »

Hi All,

I have newly installed Nagios core 4.4.14 from the source on a Red Hat Enterprise Linux release 8.8 server by following the instructions given in the below article.

https://support.nagios.com/kb/article/n ... .html#RHEL

I have installed Nagios plugins too as per https://support.nagios.com/kb/article.php?id=569#RHEL

The httpd and Nagios services are up and running fine, however I get this error (http 503) when I access its UI via web browser.

"Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

Further checking the httpd error log, I find these:

[Mon Sep 11 14:54:49.165662 2023] [mpm_event:notice] [pid 101222:tid 140032802023744] AH00489: Apache/2.4.37 (Red Hat Enterprise Linux) configured -- resuming normal operations
[Mon Sep 11 14:54:49.165685 2023] [core:notice] [pid 101222:tid 140032802023744] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Sep 11 14:54:52.144139 2023] [proxy:error] [pid 101225:tid 140032107083520] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:52.144192 2023] [proxy_fcgi:error] [pid 101225:tid 140032107083520] [client xxx.xx.x.xxx:60288] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:54:52.905178 2023] [proxy:error] [pid 101224:tid 140031905756928] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:52.905220 2023] [proxy_fcgi:error] [pid 101224:tid 140031905756928] [client xxx.xx.x.xxx:60289] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:54:53.057945 2023] [proxy:error] [pid 101225:tid 140031964473088] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:53.057987 2023] [proxy_fcgi:error] [pid 101225:tid 140031964473088] [client xxx.xx.x.xxx:60290] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:54:53.190753 2023] [proxy:error] [pid 101226:tid 140032189540096] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:53.190795 2023] [proxy_fcgi:error] [pid 101226:tid 140032189540096] [client xxx.xx.x.xxx:60291] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:54:53.351157 2023] [proxy:error] [pid 101226:tid 140032098690816] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:53.351197 2023] [proxy_fcgi:error] [pid 101226:tid 140032098690816] [client xxx.xx.x.xxx:60292] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:54:53.579096 2023] [proxy:error] [pid 101226:tid 140032081905408] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Mon Sep 11 14:54:53.579143 2023] [proxy_fcgi:error] [pid 101226:tid 140032081905408] [client xxx.xx.x.xxx:60293] AH01079: failed to make connection to backend: httpd-UDS
[Mon Sep 11 14:55:23.472273 2023] [autoindex:error] [pid 101224:tid 140031888971520] [client 127.0.0.1:37220] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:00:23.477044 2023] [autoindex:error] [pid 101226:tid 140032065120000] [client 127.0.0.1:51166] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:05:23.481227 2023] [autoindex:error] [pid 101225:tid 140032081905408] [client 127.0.0.1:55172] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:10:23.485566 2023] [autoindex:error] [pid 101225:tid 140032073512704] [client 127.0.0.1:43198] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:15:23.490512 2023] [autoindex:error] [pid 101483:tid 140032189540096] [client 127.0.0.1:36090] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:20:23.495263 2023] [autoindex:error] [pid 101226:tid 140031570212608] [client 127.0.0.1:49454] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 15:25:23.499134 2023] [autoindex:error] [pid 101224:tid 140031880578816] [client 127.0.0.1:44094] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

I have also noticed, php-fpm service is trying to start while the server is booting up and gets failed.

# systemctl status php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2023-09-11 15:33:13 AEST; 1h 17min ago
Process: 941 ExecStart=/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 941 (code=exited, status=78)

Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx systemd[1]: Starting The PHP FastCGI Process Manager...
Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx php-fpm[941]: [11-Sep-2023 15:33:13] ERROR: [pool www] cannot get uid for user 'nginx': Success (0)
Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx php-fpm[941]: [11-Sep-2023 15:33:13] ERROR: FPM initialization failed
Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx systemd[1]: php-fpm.service: Main process exited, code=exited, status=78/CONFIG
Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx systemd[1]: php-fpm.service: Failed with result 'exit-code'.
Sep 11 15:33:13 xxxxxxxxxxxxxxxxxx systemd[1]: Failed to start The PHP FastCGI Process Manager.


Any suggestion on what might be causing this ?

Many thanks!
User avatar
danderson
Posts: 111
Joined: Wed Aug 09, 2023 10:05 am

Re: Nagios Core UI 503 Service Unavailable

Post by danderson »

Thanks for reaching out @uc-vel,

I was able to replicate this issue by removing the nginx user. You can fix this by either adding the nginx user, or going into /etc/php-fpm.d/www.conf and changing the line listen.acl_users = apache,nginx to listen.acl_users = apache
Post Reply