CGI Errors and NSClient++ errors on Windows 7 workstation

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.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

CGI Errors and NSClient++ errors on Windows 7 workstation

Post by JW21a »

Greetings to All,

I am experiencing three issues with Nagios and I need assistance. First, I have a OpenSuSe box (10.217.99.101) that is failing to CGI script, even though the firewall is disabled and the Nagios configs are not detecting any errors. Error message:
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.


Second, NSClient++ is replicating the same exact error message on my Windows 7 (64 bit) workstation:
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100
/server/protocol.hpp:65 Rejected connection from: ::ffff:10.217.99.100

Lastly, some menu selection, such as Map and Documentation, are not working due to object not found?

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404

10.217.99.101
Thu 21 Feb 2013 12:00:02 PM EST
Apache/2.2.21 (Linux/SUSE)

I am running the latest revision of Nagios Core:
Nagios® Core™
Version 3.4.4
January 12, 2013


nagios -v /etc/nagios/nagios.cfg

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Thank you in advance for your assistance to this urgent matter.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by sreinhardt »

1) I see below that your configurations look good, lets make sure that nagios is actually running though.

Code: Select all

ps aux | grep bin/nagios
How have you installed nagios, package or source install?

2) Have you configured nsclient to receive from ipv6 addresses? It would appear that you are being rejected based on its internal IP whitelisting. You mentioned this is "the exact same error", is that just in reference to that it keeps saying the same thing?

3) what url are you attempting to check? Depending on, this could be similarly related to the first issue of the webui not working.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by JW21a »

Answer 1a)
Status:
susetestbox:/var/log/nagios # nagios -v /etc/nagios/nagios.cfg

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


susetestbox:/ # ps aux | grep /bin/nagios
root 24718 0.0 0.0 2528 484 pts/0 S+ 14:28 0:00 grep --color=auto /bin/nagios

susetestbox:/ # service nagios status
redirecting to systemctl
nagios.service - LSB: Network monitor Nagios
Loaded: loaded (/etc/init.d/nagios)
Active: active (running) since Thu, 21 Feb 2013 14:22:05 -0500; 6min ago
Process: 23393 ExecStop=/etc/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 23502 ExecStart=/etc/init.d/nagios start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/nagios.service
â 23581 /usr/sbin/nagios -d /etc/nagios/nagios.cfg

susetestbox:/var/log/nagios # more nagios.log
[1361422800] LOG ROTATION: DAILY
[1361422800] LOG VERSION: 2.0
[1361422800] CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1361422800] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.06, 0.07, 0.05
[1361422800] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 2 users currently logged in
[1361422800] CURRENT SERVICE STATE: localhost;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 299 bytes in 0.001 second response time
[1361422800] CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1361422800] CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 10817 MB (37% inode=-):
[1361422800] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.8 (protocol 2.0)
[1361422800] CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 86% free (1636 MB out of 1915 MB)
[1361422800] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 112 processes with STATE = RSZDT
[1361426312] Auto-save of retention data completed successfully.
[1361429912] Auto-save of retention data completed successfully.
[1361433512] Auto-save of retention data completed successfully.
[1361437112] Auto-save of retention data completed successfully.
[1361440712] Auto-save of retention data completed successfully.
[1361444312] Auto-save of retention data completed successfully.
[1361447912] Auto-save of retention data completed successfully.
[1361451512] Auto-save of retention data completed successfully.
[1361455112] Auto-save of retention data completed successfully.
[1361458712] Auto-save of retention data completed successfully.
[1361462312] Auto-save of retention data completed successfully.
[1361465912] Auto-save of retention data completed successfully.
[1361469512] Auto-save of retention data completed successfully.
[1361469974] SERVICE ALERT: localhost;Current Load;WARNING;SOFT;1;WARNING - load average: 5.42, 2.29, 0.95
[1361470034] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load average: 2.03, 1.89, 0.90
[1361473112] Auto-save of retention data completed successfully.
[1361474515] Caught SIGTERM, shutting down...
[1361474515] Successfully shutdown... (PID=7143)
[1361474525] Nagios 3.3.1 starting... (PID=23579)
[1361474525] Local time is Thu Feb 21 14:22:05 EST 2013
[1361474525] LOG VERSION: 2.0
[1361474525] Finished daemonizing... (New PID=23581)


Answer 1b)
I installed the lastest version of Nagios Core (nagios-3.4.4.tar.gz) and Nagios Plugins (nagios-plugins-1.4.16.tar.gz), which is based on upgrading nagios core v3.2.3 and nagios plugins v1.4.16, from the following website:
(http://nagios.sourceforge.net/docs/3_0/ ... nsuse.html)



Answer 2)
I am running NSClient++ version 0.4.1.90 and I am only using IP version 4, not IP version 6. The reference are based on the same recurring NSClient++ log monitor.


Answer 3)
From the Nagios startup page, I am attempting to click on the url links: Documectation, Maps, Host, Process Info or Services; and it seems that the error message are completely non-responsive.
Error Message:
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.


------------------------

Thank you, sreinhardt.

Answer 1a)
Status:
susetestbox:/var/log/nagios # ls -la /usr/local/nagios/
total 0
drwxr-xr-x 1 root root 56 Feb 14 16:50 .
drwxr-xr-x 1 root root 78 Feb 14 11:20 ..
drwxrwxr-x 1 nagios nagios 32 Feb 14 16:41 bin
drwxrwxr-x 1 nagios nagios 164 Feb 19 16:46 etc
drwxr-xr-x 1 root root 0 Feb 14 16:50 include
drwxrwxr-x 1 nagios nagios 1366 Feb 14 16:50 lib
drwxrwxr-x 1 nagios nagios 282 Feb 14 16:41 sbin
drwxrwxr-x 1 nagios nagios 274 Feb 14 16:41 share
drwxrwxr-x 1 nagios nagios 102 Feb 20 15:09 var

susetestbox:/var/log/nagios # nagios -v /etc/nagios/nagios.cfg
Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


susetestbox:/ # ps aux | grep /bin/nagios
root 24718 0.0 0.0 2528 484 pts/0 S+ 14:28 0:00 grep --color=auto /bin/nagios

susetestbox:/ # service nagios status
redirecting to systemctl
nagios.service - LSB: Network monitor Nagios
Loaded: loaded (/etc/init.d/nagios)
Active: active (running) since Thu, 21 Feb 2013 14:22:05 -0500; 6min ago
Process: 23393 ExecStop=/etc/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 23502 ExecStart=/etc/init.d/nagios start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/nagios.service
â 23581 /usr/sbin/nagios -d /etc/nagios/nagios.cfg

susetestbox:/var/log/nagios # more nagios.log
[1361422800] LOG ROTATION: DAILY
[1361422800] LOG VERSION: 2.0
[1361422800] CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1361422800] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.06, 0.07, 0.05
[1361422800] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 2 users currently logged in
[1361422800] CURRENT SERVICE STATE: localhost;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 299 bytes in 0.001 second response time
[1361422800] CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1361422800] CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 10817 MB (37% inode=-):
[1361422800] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.8 (protocol 2.0)
[1361422800] CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 86% free (1636 MB out of 1915 MB)
[1361422800] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 112 processes with STATE = RSZDT
[1361426312] Auto-save of retention data completed successfully.
[1361429912] Auto-save of retention data completed successfully.
[1361433512] Auto-save of retention data completed successfully.
[1361437112] Auto-save of retention data completed successfully.
[1361440712] Auto-save of retention data completed successfully.
[1361444312] Auto-save of retention data completed successfully.
[1361447912] Auto-save of retention data completed successfully.
[1361451512] Auto-save of retention data completed successfully.
[1361455112] Auto-save of retention data completed successfully.
[1361458712] Auto-save of retention data completed successfully.
[1361462312] Auto-save of retention data completed successfully.
[1361465912] Auto-save of retention data completed successfully.
[1361469512] Auto-save of retention data completed successfully.
[1361469974] SERVICE ALERT: localhost;Current Load;WARNING;SOFT;1;WARNING - load average: 5.42, 2.29, 0.95
[1361470034] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load average: 2.03, 1.89, 0.90
[1361473112] Auto-save of retention data completed successfully.
[1361474515] Caught SIGTERM, shutting down...
[1361474515] Successfully shutdown... (PID=7143)
[1361474525] Nagios 3.3.1 starting... (PID=23579)
[1361474525] Local time is Thu Feb 21 14:22:05 EST 2013
[1361474525] LOG VERSION: 2.0
[1361474525] Finished daemonizing... (New PID=23581)


Answer 1b)
I installed the lastest version of Nagios Core (nagios-3.4.4.tar.gz) and Nagios Plugins (nagios-plugins-1.4.16.tar.gz), which is based on upgrading nagios core v3.2.3 and nagios plugins v1.4.16, from the following website:
(http://nagios.sourceforge.net/docs/3_0/ ... nsuse.html)



Answer 2)
I am running NSClient++ version 0.4.1.90 and I am only using IP version 4, not IP version 6. The reference are based on the same recurring NSClient++ log monitor.


Answer 3)
From the Nagios startup page, I am attempting to click on the url links: Documectation, Maps, Host, Process Info or Services; and it seems that the error message are completely non-responsive.
Error Message:
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.

JW21a

Posts: 3
Joined: Mon Feb 18, 2013 1:10 pm
Last edited by slansing on Thu Feb 21, 2013 2:14 pm, edited 1 time in total.
Reason: Please do not double post the same information.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by sreinhardt »

While your configs seem to be fine, your nagios process does not appear to be running at all. You can either issue a service nagios start or /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg.

Again as for the whoops errors, lets get nagios running and see if they continue. I will address nsclient++ errors after as well, as right now nagios is not attempting to connect to it.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by JW21a »

OK, I restarted Nagios serveral times and hard booted the system. Now it seems to be started.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by slansing »

Thanks for letting us know you got it working.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by JW21a »

Thank you. How about the windows agent called NSClient ++?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by slansing »

What issue are you still running into with NSClient++?
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by JW21a »

Both xplaptop and c502 are windows machine. NSClient++ and Nagios are not fully retrieving the information. I review all documentation and it seems that I cannot find the nsc.ini file on both Windows XP and Windows 7, just nsclient.ini
Attachments
xplaptop.jpg
c502.jpg
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CGI Errors and NSClient++ errors on Windows 7 workstatio

Post by slansing »

NSC.ini and nsclient.ini are the same file, just a different name between versions. Which version of nsclient++ do you have installed? We recommend NSclient++ 3.9.x and not the latest versions as they are not fully bug tested yet.

Have you made sure that the windows firewall is allowing both port 12489 and 5666 through? 12489 is used for check_nt checks, and 5666 for NRPE checks. Also, be sure you allow this traffic on your Nagios Core server's firewall as well. I am assuming since you are using the default checks you will be using 12489 right now for configuration purposes.
Locked