Hi All
Just upgraded 4.0.8 to 4.1.1, all seems to we working apart from the new map. The legacy map works fine. Screen grab attached of what I'm seeing. When I look at the NAGIOSerror.log I'm getting the following:
[Wed Jul 06 09:40:45.154456 2016] [cgi:error] [pid 2764] [client xxx.xxxx.x.xxx:27879] script not found or unable to stat: /usr/lib/cgi-bin/objectjson.cgi, referer: http://hostname.dom.com/map.html?host=all
When I look in /usr/lib/cgi-bin/ there are no files, the files its looking for are /opt/nagios/sbin/ and when I look at the config file /etc/apache2/conf-enabled/nagios-serve-cgi-bin.conf it looks like the path is correctly configured:
<IfDefine ENABLE_USR_LIB_CGI_BIN>
ScriptAlias /nagios/cgi-bin/ /opt/nagios/sbin/
ScriptAlias /cgi-bin/nagios/ /opt/nagios/sbin/
<Directory "/opt/nagios/sbin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
</IfDefine>
Is there somewhere else that the path could be defined that would be overwriting the above?
Appreciate any help
Gerry
Nagios Map Error After Upgrade
Re: Nagios Map Error After Upgrade
As a test, try changing it to this, restart apache, and see if it resolves the issue:
Let us know the results.
Thank you
Code: Select all
<IfDefine ENABLE_USR_LIB_CGI_BIN>
ScriptAlias /nagios/cgi-bin/ /opt/nagios/sbin/
ScriptAlias /cgi-bin/nagios/ /opt/nagios/sbin/
ScriptAlias /usr/lib/cgi-bin/ /opt/nagios/sbin/
<Directory "/opt/nagios/sbin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
</IfDefine>Thank you
Re: Nagios Map Error After Upgrade
Thanks for the reply and suggestion, tried that but same error. I also had a look in the map.html and change the cgiurl variable value to /opt/nagios/sbin/ but no joy either.
Anywhere else that path could be coming from?
Thanks
Gerry
Anywhere else that path could be coming from?
Thanks
Gerry
Re: Nagios Map Error After Upgrade
How did you perform the initial install? Likely you supplied the ./configure script with a set of paths to get it to install under /opt/nagios/sbin. If you didn't do that for the upgrade, it probably recompiled all of the binaries to operate under the assumption that they are in /usr/lib/cgi-bin/. Can you dig through your history to get the parameters used in the upgrade?
Former Nagios employee
Re: Nagios Map Error After Upgrade
Hi,
I did set the path during install, I was following a book when setting Nagios up but I documented everything back then and used the same command for the upgrade:
sh configure --prefix=/opt/nagios --sysconfdir=/etc/nagios --localstatedir=/var/nagios --libexecdir=/opt/nagios/plugins --with-command-group=nagiosgroup
Thanks
Gerry
I did set the path during install, I was following a book when setting Nagios up but I documented everything back then and used the same command for the upgrade:
sh configure --prefix=/opt/nagios --sysconfdir=/etc/nagios --localstatedir=/var/nagios --libexecdir=/opt/nagios/plugins --with-command-group=nagiosgroup
Thanks
Gerry
Re: Nagios Map Error After Upgrade
Can you run the following on the Nagios server and post the output?
Also, can you post the log file from where you compiled Nagios 4.1.1?
Code: Select all
ps -ef
ls -l /opt/nagios/sbin/
chage -l nagios
grep nag /etc/groupBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Map Error After Upgrade
Finally got this working, may be a configuration issue but in addition to the apache2 conf-enabled/nagios-serve-cgi-bin.conf I also needed to change the ScriptAlias and path within conf-enabled/serve-cgi-bin.conf
So changed it to:
#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ (commented out original value)
#<Directory "/usr/lib/cgi-bin"> (commented out original value)
ScriptAlias /cgi-bin/ /opt/nagios/sbin/
<Directory "/opt/nagios/sbin/">
Thanks for the help
gR
So changed it to:
#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ (commented out original value)
#<Directory "/usr/lib/cgi-bin"> (commented out original value)
ScriptAlias /cgi-bin/ /opt/nagios/sbin/
<Directory "/opt/nagios/sbin/">
Thanks for the help
gR
Re: Nagios Map Error After Upgrade
Thanks for sharing your solution! Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Nagios Map Error After Upgrade
For sure, thanks.