NRDP HTTP Error 500 for Submit Check Data

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

With this config did you restart httpd?

And if so can you repost the error_log when accessing after updating to this config?

Thanks
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: NRDP HTTP Error 500 for Submit Check Data

Post by blackrino9 »

yes, the config you posted and http restarted.


Here are the entries in error.log with apache in debug mode when I click the "Submit Check Data" button.

[Fri Sep 29 20:08:47.187858 2017] [authz_core:debug] [pid 1523] mod_authz_core.c(809): [client 66.210.59.5:27806] AH01626: authorization result of Require all granted: granted, referer: http://myserver/nrdp/
[Fri Sep 29 20:08:47.187956 2017] [authz_core:debug] [pid 1523] mod_authz_core.c(809): [client 66.210.59.5:27806] AH01626: authorization result of <RequireAny>: granted, referer: http://myserver/nrdp/
[Fri Sep 29 20:08:47.188061 2017] [authz_core:debug] [pid 1523] mod_authz_core.c(809): [client 66.210.59.5:27806] AH01626: authorization result of Require all granted: granted, referer: http://myserver/nrdp/
[Fri Sep 29 20:08:47.188089 2017] [authz_core:debug] [pid 1523] mod_authz_core.c(809): [client 66.210.59.5:27806] AH01626: authorization result of <RequireAny>: granted, referer: http://myserver/nrdp/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

Doing some research it looks like this may just be a debug message
https://stackoverflow.com/questions/337 ... ed-granted

Are you getting no response on the front end still? Or a 500 error?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

Also, can you show the output of

Code: Select all

apachectl -t
and

Code: Select all

apachectl -S
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: NRDP HTTP Error 500 for Submit Check Data

Post by blackrino9 »

Still getting a 500 error.



root@myserver:~# apachectl -t
Syntax OK


root@myserver:~# apachectl -S
VirtualHost configuration:
*:80 myserver (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ldap-cache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

Where is your nrdp.conf ?
What OS and version is this?
We may need to try to re-create your setup
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: NRDP HTTP Error 500 for Submit Check Data

Post by blackrino9 »

/usr/local/nagios/etc/nrpd.cfg

Ubuntu 17.04
root@myserver:/usr/local/nagios/etc# uname -a
Linux myserver 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

Ok, here's a problem, your nrpd.cfg needs to go in a directory that is going to get picked up by apache.

I think on your system it needs to go in /etc/apache2/conf-enabled/

Then restart apache2

Code: Select all

systemctl restart apache2
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: NRDP HTTP Error 500 for Submit Check Data

Post by blackrino9 »

Sorry, that's my mistake. I got that config file confused with the nrpe.cfg.

The nrdp.conf file is already located in /etc/apache2/sites-enabled/


root@myserver:/etc/apache2/sites-enabled# ls -lah
total 20K
drwxr-xr-x 2 root root 4.0K Oct 2 21:40 .
drwxr-xr-x 8 root root 4.0K Sep 29 22:01 ..
lrwxrwxrwx 1 root root 35 Apr 6 17:19 000-default.conf -> ../sites-available/000-default.conf
-rw-r--r-- 1 root root 3.0K Sep 11 23:25 nagios.conf
-rw-r--r-- 1 root root 1.6K Sep 11 23:25 nagiosql.conf
-rw-r--r-- 1 root root 180 Sep 29 18:11 nrdp.conf

root@myserver:/etc/apache2/sites-enabled# cat nrdp.conf
<Directory "/usr/local/nrdp">
Options None
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>

Alias /nrdp "/usr/local/nrdp/server"


root@myserver:/usr/local/nrdp# ls -lah
total 24K
drwxr-xr-x 4 nagios nagios 4.0K Sep 28 00:41 .
drwxr-xr-x 12 root root 4.0K Sep 28 00:41 ..
-rw-r--r-- 1 nagios nagios 1.5K Sep 28 00:41 CHANGES.rst
drwxr-xr-x 2 nagios nagios 4.0K Sep 28 01:12 clients
-rw-r--r-- 1 nagios nagios 4.0K Sep 28 00:41 LICENSE.rst
drwxr-xr-x 4 nagios nagios 4.0K Sep 28 02:13 server


root@myserver:/usr/local/nrdp# cat /etc/group | grep nag
www-data:x:33:nagios,www-data
nagios:x:1001:nagios,www-data
nagcmd:x:1002:nagios,www-data
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP HTTP Error 500 for Submit Check Data

Post by scottwilkerson »

I just went through setting this up and also was getting a 500 error until I installed this package

Code: Select all

apt-get install php-simplexml
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked