Page 1 of 3
NRDP HTTP Error 500 for Submit Check Data
Posted: Wed Sep 27, 2017 9:26 pm
by blackrino9
Hello,
I've just installed the NRDP agent on an Ubuntu Server running Nagios Core v4.3.2. I've set the Token in the config file and verified that it works when navigating to
http://myserver/nrdp and clicking Submit Command. The server responds with a nice message and even performs the default DISABLE_HOST_NOTIFICATIONS task when I provide a valid host name. The issue is when I try to test the Submit Check Data. If I don't provide a token, I get a nice message letting me know that no token was provided. However, if I provide the token that I've configured in the server to accept, I receive an HTTP 500 error. I've enabled debug logging in apache but don't see any messages that would point me to an issue. All the permissions to the various folders look correct.
Any ideas what could be causing the problem?
Thanks
root@nagios:/# ls -lah /usr/local/nagios/var/spool/
drwxrwsr-- 2 nagios nagcmd 4.0K Sep 28 02:16 checkresults
root@nagios:/# ls -lah /usr/local/nagios/var/rw/
prw-rw---- 1 nagios nagcmd 0 Sep 28 02:16 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Sep 28 02:16 nagios.qh
Group Information:
nagcmd

1002:nagios,www-data
NRDP version:
1.4.0
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 10:48 am
by scottwilkerson
It could be selinux preventing the write, you may want to check if it is enabled.
Also, you may want to check the apache error log to see what was causing the 500 error
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 11:20 am
by blackrino9
Hi,
thanks for the reply. SELinux is not installed and the apache logs don't provide any additional details on the 500 error even with debug mode logging turned on.
content of /var/log/apache2/error.log during failed submit
[Thu Sep 28 16:16:57.297950 2017] [authz_core:debug] [pid 6559] mod_authz_core.c(809): [client 66.210.59.5:30476] AH01626: authorization result of Require all granted: granted, referer:
http://myserver/nrdp/
[Thu Sep 28 16:16:57.298028 2017] [authz_core:debug] [pid 6559] mod_authz_core.c(809): [client 66.210.59.5:30476] AH01626: authorization result of <RequireAny>: granted, referer:
http://myserver/nrdp/
[Thu Sep 28 16:16:57.298274 2017] [authz_core:debug] [pid 6559] mod_authz_core.c(809): [client 66.210.59.5:30476] AH01626: authorization result of Require all granted: granted, referer:
http://myserver/nrdp/
[Thu Sep 28 16:16:57.298299 2017] [authz_core:debug] [pid 6559] mod_authz_core.c(809): [client 66.210.59.5:30476] AH01626: authorization result of <RequireAny>: granted, referer:
http://myserver/nrdp/
content of /var/log/apache2/access.log during failed submit:
66.210.59.5 - user [28/Sep/2017:16:18:36 +0000] "POST /nrdp/ HTTP/1.1" 500 185 "
http://mysever/nrdp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 11:24 am
by scottwilkerson
Can you posts your apache config file for nrdp.conf
I believe it is using a version for older systems
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 4:17 pm
by blackrino9
<Directory "/usr/local/nrdp">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "NRDP"
# AuthType Basic
# AuthUserFile /usr/local/nrdp/htpasswd.users
# Require valid-user
Require all granted
</Directory>
Alias /nrdp "/usr/local/nrdp/server"
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 4:42 pm
by kyang
I don't have an option for "Require all granted"
Comment that out and see if that works?
then restart apache
Here's what mine looks like, and I'm able to use NRDP just fine.
Code: Select all
<Directory "/usr/local/nrdp">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "NRDP"
# AuthType Basic
# AuthUserFile /usr/local/nrdp/htpasswd.users
# Require valid-user
</Directory>
Alias /nrdp "/usr/local/nrdp/server"
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 5:53 pm
by blackrino9
tried commenting that line out and restarting.
Result: 403 Forbidden on the entire /nrdp page.
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Thu Sep 28, 2017 6:08 pm
by blackrino9
I did a little bit of research and updated my nrdp.conf file to more closely match the config file Nagios uses. It didn't fix the issue, but it looks a lot cleaner.
<Directory "/usr/local/nrdp">
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
Different configurations for different versions are partially documented here:
https://httpd.apache.org/docs/current/upgrading.html
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Fri Sep 29, 2017 9:15 am
by scottwilkerson
You really need something like this
Code: Select all
<Directory "/usr/local/nrdp">
Options None
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
Alias /nrdp "/usr/local/nrdp/server"
Re: NRDP HTTP Error 500 for Submit Check Data
Posted: Fri Sep 29, 2017 1:10 pm
by blackrino9
thanks
I had that and it didn't resolve the problem.
This is a tough one to figure out.