NRDP HTTP Error 500 for Submit Check Data
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
NRDP HTTP Error 500 for Submit Check Data
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:
nagcmd1002:nagios,www-data
NRDP version:
1.4.0
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:
nagcmd1002:nagios,www-data
NRDP version:
1.4.0
-
- 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
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
Also, you may want to check the apache error log to see what was causing the 500 error
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
Re: NRDP HTTP Error 500 for Submit Check Data
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"
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"
-
- 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
Can you posts your apache config file for nrdp.conf
I believe it is using a version for older systems
I believe it is using a version for older systems
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
Re: NRDP HTTP Error 500 for Submit Check Data
<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"
# 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
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.
Comment that out and see if that works?
Code: Select all
#Require all granted
Code: Select all
service httpd restart
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"
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
Re: NRDP HTTP Error 500 for Submit Check Data
tried commenting that line out and restarting.
Result: 403 Forbidden on the entire /nrdp page.
Result: 403 Forbidden on the entire /nrdp page.
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
Re: NRDP HTTP Error 500 for Submit Check Data
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
<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
-
- 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
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"
-
- Posts: 27
- Joined: Wed Apr 12, 2017 7:19 pm
Re: NRDP HTTP Error 500 for Submit Check Data
thanks
I had that and it didn't resolve the problem.
This is a tough one to figure out.
I had that and it didn't resolve the problem.
This is a tough one to figure out.