Error Whoops! Error: Could not open CGI config file
Error Whoops! Error: Could not open CGI config file
Hi,
I updated Nagios Core from 3.2.3 to 4.0.1. We previously had it installed in a directory called /usr/local/nagios-3.2.3. But then the upgraded version is now installed in /usr/local/nagios-4.0.2. The upgrade went fine but one of the links on the left "MAP" when i click on it gives this error.
------------------------
Whoops!
Error: Could not open CGI config file '/usr/local/nagios-3.2.3/etc/cgi.cfg' for reading!
-------------------------
Why is it still taking the old location and where is it taking it from ?? We have got Apache linked to it.
Awaiting quick reply.
Regards,
Farooq Ahmed
I updated Nagios Core from 3.2.3 to 4.0.1. We previously had it installed in a directory called /usr/local/nagios-3.2.3. But then the upgraded version is now installed in /usr/local/nagios-4.0.2. The upgrade went fine but one of the links on the left "MAP" when i click on it gives this error.
------------------------
Whoops!
Error: Could not open CGI config file '/usr/local/nagios-3.2.3/etc/cgi.cfg' for reading!
-------------------------
Why is it still taking the old location and where is it taking it from ?? We have got Apache linked to it.
Awaiting quick reply.
Regards,
Farooq Ahmed
Re: Error Whoops! Error: Could not open CGI config file
Maybe your init script is still pointing to the old config location?
Code: Select all
grep "prefix=" /etc/init.d/nagiosFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Error Whoops! Error: Could not open CGI config file
Hi,
Just checked that and it looks OK.
prefix=/usr/local/nagios-4.0.2
exec_prefix=/usr/local/nagios-4.0.2
What can be the problem??? Please help.
Just checked that and it looks OK.
prefix=/usr/local/nagios-4.0.2
exec_prefix=/usr/local/nagios-4.0.2
What can be the problem??? Please help.
Re: Error Whoops! Error: Could not open CGI config file
Hi,
Is it that there is a symlink to the old config in Apache??
Is it that there is a symlink to the old config in Apache??
Re: Error Whoops! Error: Could not open CGI config file
Hi,
This is how the entries are in /etc/init.d/nagios
prefix=/usr/local/nagios-4.0.2
exec_prefix=/usr/local/nagios-4.0.2
NagiosBin=${exec_prefix}/bin/nagios
NagiosCfgFile=/usr/local/nagios-4.0.2/etc/nagios.cfg
NagiosStatusFile=${prefix}/var/status.dat
NagiosRetentionFile=${prefix}/var/retention.dat
NagiosCommandFile=${prefix}/var/rw/nagios.cmd
NagiosVarDir=${prefix}/var
NagiosRunFile=${prefix}/var/nagios.lock
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=${exec_prefix}/sbin
NagiosUser=nagios
NagiosGroup=nagcmd
Anything wrong???
This is how the entries are in /etc/init.d/nagios
prefix=/usr/local/nagios-4.0.2
exec_prefix=/usr/local/nagios-4.0.2
NagiosBin=${exec_prefix}/bin/nagios
NagiosCfgFile=/usr/local/nagios-4.0.2/etc/nagios.cfg
NagiosStatusFile=${prefix}/var/status.dat
NagiosRetentionFile=${prefix}/var/retention.dat
NagiosCommandFile=${prefix}/var/rw/nagios.cmd
NagiosVarDir=${prefix}/var
NagiosRunFile=${prefix}/var/nagios.lock
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=${exec_prefix}/sbin
NagiosUser=nagios
NagiosGroup=nagcmd
Anything wrong???
Re: Error Whoops! Error: Could not open CGI config file
Hi,
I am going crazy now !!!!!!!!!!!!
There is one more error i get when i click on Service Groups Summary.
It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
I assume that its related to the aboce cgi.cfg error.
I am going crazy now !!!!!!!!!!!!
There is one more error i get when i click on Service Groups Summary.
It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
I assume that its related to the aboce cgi.cfg error.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Error Whoops! Error: Could not open CGI config file
Yes, this is attributed to the CGI issues you are having, you will need to change the required paths to point to the correct one of the current CGI.cfg file. Do you have notes on what you changed last time? There are quite a lot of custom paths here.
Re: Error Whoops! Error: Could not open CGI config file
Hi,
These are the steps i followed for upgrading from 3.2.3 to 4.0.2 Core.
-->wget http://osdn.dl.sourceforge.net/sourcefo ... 4.x.tar.gz
-->tar xzf nagios-4.x.tar.gz
-->cd nagios-4.x
-->./configure --with-command-group=nagcmd
-->make all
-->make install
--> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
0 Errors found.
--> Lastly, service nagios reload
All these commands were run being a root user.
Note: Prior to upgrade i had a folder /usr/local/nagios-3.2.3 which had a symlink to nagios.
nagios -> /usr/local/nagios-3.2.3
I changed that to nagios -> /usr/local/nagios-4.0.2 before the upgrade so that the upgrade runs successfully.
Upgrade was successful apart from the error "Error: Could not open CGI config file '/usr/local/nagios-3.2.3/etc/cgi.cfg' for reading!" when you click on Map or Trends
Please help as i need to sort it ASAP.
These are the steps i followed for upgrading from 3.2.3 to 4.0.2 Core.
-->wget http://osdn.dl.sourceforge.net/sourcefo ... 4.x.tar.gz
-->tar xzf nagios-4.x.tar.gz
-->cd nagios-4.x
-->./configure --with-command-group=nagcmd
-->make all
-->make install
--> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
0 Errors found.
--> Lastly, service nagios reload
All these commands were run being a root user.
Note: Prior to upgrade i had a folder /usr/local/nagios-3.2.3 which had a symlink to nagios.
nagios -> /usr/local/nagios-3.2.3
I changed that to nagios -> /usr/local/nagios-4.0.2 before the upgrade so that the upgrade runs successfully.
Upgrade was successful apart from the error "Error: Could not open CGI config file '/usr/local/nagios-3.2.3/etc/cgi.cfg' for reading!" when you click on Map or Trends
Please help as i need to sort it ASAP.
Re: Error Whoops! Error: Could not open CGI config file
Run the following command and show us the output:
Code: Select all
ls -lR /usr/local | grep ^lBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error Whoops! Error: Could not open CGI config file
Hi,
This is the output.
lrwxrwxrwx. 1 root root 23 Jan 14 09:22 nagios -> /usr/local/nagios-4.0.2
lrwxrwxrwx. 1 root root 21 Sep 22 2011 nrpe -> /usr/local/nrpe-2.12/
Regards,
Farooq Ahmed
This is the output.
lrwxrwxrwx. 1 root root 23 Jan 14 09:22 nagios -> /usr/local/nagios-4.0.2
lrwxrwxrwx. 1 root root 21 Sep 22 2011 nrpe -> /usr/local/nrpe-2.12/
Regards,
Farooq Ahmed