The infamous Unable to get process status

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.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

The infamous Unable to get process status

Post by amprantino »

I have upgraded an old installation to a new server, plus new Nagios version (4.4.1)

After the upgrade I face some problems. The first one I have to face is the "Unable to get process status"

Debiam v9.5
service nagios status
● nagios.service - Nagios Core 4.4.1
Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-08-01 17:23:28 EEST; 13min ago
Docs: https://www.nagios.org/documentation
Process: 105639 ExecStopPost=/bin/rm -f /var/log/nagios/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 105636 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=1/FAILURE)
Process: 121112 ExecStart=/usr/bin/nagios -d /etc/nagios/nagios.cfg (code=exited, status=254)
Process: 121109 ExecStartPre=/usr/bin/nagios -v /etc/nagios/nagios.cfg (code=exited, status=0/SUCCESS)
Main PID: 103295 (code=exited, status=0/SUCCESS)

Aug 01 17:23:29 davinci nagios[121109]: Checked 640 hosts
Aug 01 17:23:29 davinci nagios[121109]: Checked 0 service dependencies
Aug 01 17:23:29 davinci nagios[121109]: Checked 200 host dependencies
Aug 01 17:23:29 davinci nagios[121109]: Checked 12 timeperiods
Aug 01 17:23:29 davinci nagios[121109]: Checking global event handlers...
Aug 01 17:23:29 davinci nagios[121109]: Checking obsessive compulsive processor commands...
Aug 01 17:23:29 davinci nagios[121109]: Checking misc settings...
Aug 01 17:23:29 davinci nagios[121109]: Total Warnings: 0
Aug 01 17:23:29 davinci nagios[121109]: Total Errors: 0
Aug 01 17:23:29 davinci nagios[121109]: Things look okay - No serious problems were detected during the pre-flight check
selinux is disabled

Apache2 logs:

Code: Select all

[Wed Aug 01 17:47:13.866061 2018] [cgi:error] [pid 147927] [client 192.168.241.54:56794] End of script output before headers: statusjson.cgi, referer: https://nagios.mydomain.com/main.php
[Wed Aug 01 17:47:49.058590 2018] [cgi:error] [pid 147928] [client 192.168.241.54:56817] AH01215: (13)Permission denied: exec of '/var/www/nagios_ramdisk/cgi-bin/statusjson.cgi' failed: /var/www/nagios_ramdisk/cgi-bin/statusjson.cgi, referer: https://nagios.mydomain.com/main.php
[Wed Aug 01 17:47:49.060342 2018] [cgi:error] [pid 147928] [client 192.168.241.54:56817] End of script output before headers: statusjson.cgi, referer: https://nagios.mydomain.com/main.php
I dont understand how to solve this permission (?) issue....
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: The infamous Unable to get process status

Post by amprantino »

The problem was that apache2 was accessing a ramdisk.
The ramdisk was mounted with options "nodev,nosuid,noexec,nodiratime,size=1024M" and apache2 didnt like it. :ugeek:

mount -o remount,nodiratime,nosuid,nodev /var/www/nagios_ramdisk
did the job. noexec option was causing all the problems with the cgis

You may close the topic
Thank you
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: The infamous Unable to get process status

Post by cdienger »

Glad to hear you were able to resolve it! Thanks for posting your fix as well!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked