NAGWIN Installation Out of the box failing

15 posts / 0 new
Last post
jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
NAGWIN Installation Out of the box failing

I did a fresh installation of Nagwin_2.3.1_Free_Installer.zip on a windows 7 machine and I am unable to get it working out of the box.  When I connect in the browser to http://localhost and click on hosts it has the following error:

Whoops!

Error: Could not read object configuration data!

I then proceeded to check the configuration with the shortcut to "C:\Program Files (x86)\ICW\bin\CheckNagiosConfig.cmd" and it comes back with the below to say the configuration is fine.  There are no errors in the error logs (in fact they are empty), so I am really struggling to find out what is wrong.  Are there any alternatives?

 

 Check Nagios Configuration 

Wed 18/02/2015 

04:41 PM

 

Nagios Core 4.0.8

Copyright (c) 2009-present Nagios Core Development Team and Community Contributors

Copyright (c) 1999-2009 Ethan Galstad

Last Modified: 08-12-2014

License: GPL

 

Website: http://www.nagios.org

Reading configuration data...

   Read main config file okay...

Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/etc/nagios/nagwin/templates.cfg', starting at line 52)

Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/etc/nagios/nagwin/templates.cfg', starting at line 155)

   Read object config files okay...

 

Running pre-flight check on configuration data...

 

Checking objects...

Checked 10 services.

Checked 1 hosts.

Checked 1 host groups.

Checked 0 service groups.

Checked 1 contacts.

Checked 1 contact groups.

Checked 21 commands.

Checked 5 time periods.

Checked 0 host escalations.

Checked 0 service escalations.

Checking for circular paths...

Checked 1 hosts

Checked 0 service dependencies

Checked 0 host dependencies

Checked 5 timeperiods

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

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
It seems that Nagios

It seems that Nagios processes don't run by some reason. Just make sure that all Nagwin_* services are running. If they already do, try to restart Nagwin_Nagios service and watch for nagios processes - there should be 4-5 of them.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Processes

I can see that the processes are running (see below).  I have tried a restart without any luck.

Process information for SURF64:

Name                Pid Pri Thd  Hnd   Priv        CPU Time    Elapsed Time

nagwin_service     8500   8   5   83  10028     0:00:00.218     1:59:06.883

nagwin_service     8576   8   5   82   9904     0:00:00.234     1:59:06.648

nginx              8692   8   6  157   5588     0:00:00.140     1:59:06.387

nagwin_service     8848   8   5   82   9968     0:00:00.156     1:59:06.363

cgi2fcgi-wrapper   7012   8   1   59   8804     0:00:00.296     1:59:06.124

nagwin_service     8468   8   5   82   9860     0:00:00.187     1:59:06.104

php-cgi            7836   8   3   96   8736     0:00:00.093     1:59:05.907

nginx              8440   8   4  105   5436     0:00:00.109     1:03:41.771

 

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
Try to stop all services,

Try to stop all services, make sure that no nagwin_service process is running (terminate if there are some running), and start services again. There must be some information in the eventlog.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Stopped all services but same error

Apologies for the late reply, your anti-spam system was blocking me.

I restarted all services and the key nagios service has put the following in the event log "Free edition - 1 hosts, 10 services, 1 contact(s)" (see XML extract below).  So the service is just fine.  I ran tcpview to check that nginx was listening on the right port, and I can see it is listening on port 80 (again see below).  When I connect in I use "http://localhost".  I have tried using Chrome and IE and I still get the same error message when I click on the "Hosts" section which is "Error: Could not read object configuration data!".  Not sure where to look next to resolve it.  Is there some form of tracing option for nginx?

TCPView

======

       nginx.exe  3336  TCP  SURF64  http  SURF64  0  LISTENING

 

EventLog XML Extract

==============
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

 

- <System>

  <Provider Name="Nagwin_Nagios" />

  <EventID Qualifiers="16384">2</EventID>

  <Level>4</Level>

  <Task>0</Task>

  <Keywords>0x80000000000000</Keywords>

  <TimeCreated SystemTime="2015-02-23T03:32:54.000000000Z" />

  <EventRecordID>367581</EventRecordID>

  <Channel>Application</Channel>

  <Computer>SURF64.narrabeen.objecttrading.com</Computer>

  <Security />

  </System>

- <EventData>

  <Data>Free edition - 1 hosts, 10 services, 1 contact(s)</Data>

  </EventData>

  </Event>

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
The problem seems to be

The problem seems to be related to the Nagios service. Please stop Nagwin_Nagios service, make sure that there no running nagios processes left and start the service again.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Stopped and restarted Nagwin_Nagios service

I stopped, verified and then restart this server and the same error still appears:

 

"Error: Could not read object configuration data!"

 

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
Do you see any nagios.exe

Do you see any nagios.exe processes running ? Try to start "nagios /etc/nagios/nagios.cfg" from a bash prompt to see if it complains.

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
Do you see any nagios.exe

Do you see any nagios.exe processes running ? Try to start "nagios /etc/nagios/nagios.cfg" from a bash prompt to see if it complains.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Bash Prompt

I started the bash prompt from the shortcut in the menu () and tried the command with the following results:

bash-4.1$ nagios

bash: nagios: command not found

bash-4.1$ nagios /etc/nagios/nagios.cfg

bash: nagios: command not found

bash-4.1$ 

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
Try /bin/nagios

Try /bin/nagios /etc/nagios/nagios.cfg then. If the message is same, I am not sure what happened, but the nagios itself is not installed by some reason. You need to remove the existing installation and reinstall again. Btw, I have now installed Nagwin on my Win7 machine w/o problems.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Works from the prompt

Ok, I shut down the nagios service and started it from the prompt and the web page now works.  So, it is mysteriously failing when I run it as a service.

 

*******************************************************************

Copyright (c) 2009-present Nagios Core Development Team and Community Contributo

rs

Copyright (c) 1999-2009 Ethan Galstad

Last Modified: 08-12-2014

License: GPL

 

Website: http://www.nagios.org

Nagios 4.0.8 starting... (PID=8644)

Local time is Mon Feb 23 16:43:48 AUSEDT 2015

nerd: Channel hostchecks registered successfully

nerd: Channel servicechecks registered successfully

nerd: Channel opathchecks registered successfully

nerd: Fully initialized and ready to rock!

wproc: Successfully registered manager as @wproc with query handler

wproc: Registry request: name=Core Worker 8948;pid=8948

wproc: Registry request: name=Core Worker 6088;pid=6088

wproc: Registry request: name=Core Worker 8400;pid=8400

wproc: Registry request: name=Core Worker 8888;pid=8888

Warning: failure_prediction_enabled is obsoleted and no longer has any effect in

 host type objects (config file '/etc/nagios/nagwin/templates.cfg', starting at

line 52)

Warning: failure_prediction_enabled is obsoleted and no longer has any effect in

 service type objects (config file '/etc/nagios/nagwin/templates.cfg', starting

at line 155)

Successfully launched command file worker with pid 8528

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
It must be related to

It must be related to something specific to your PC - same service program is used by all Nagwin services, I have no idea why three of them works and one of them fails. "nagios /etc/nagios/nagios.cfg" should actually work without specifying the whole path.

jlemetcalf
Offline
Last seen: 8 years 3 months ago
Joined: 18.02.2015 - 05:18
Cygwin already installed

I am wondering if it is because I already have Cygwin installed.  Do you know if both can co-exist since Nagwin uses Cygwin?

itefix
Offline
Last seen: 3 hours 3 min ago
Joined: 01.05.2008 - 21:33
That could be the reason even

That could be the reason even if they should coexist together in theory - Cygwin DLL version mismatches can lead to some problems.

Release news