nsclient service terminated unexpectedly

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.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

nsclient service terminated unexpectedly

Post by RDMaroto »

Good morning,
In my windows machine Windows 2008 R2, Nsclient service stops with the following error:
The NSClient++ (x64) service terminated unexpectedly. It has done this 1 time(s).

In the nsclient.log
2014-09-08 04:50:30: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for reload (\LogicalDisk(L:\MCLMSANJ001-L10)\% Free Space|\LogicalDisk(L:\MCLMSANJ001-L10)\% Free Space)
2014-09-08 04:50:31: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for reload (\LogicalDisk(L:\MCLMSANJ001-L11)\% Free Space|\LogicalDisk(L:\MCLMSANJ001-L11)\% Free Space)
2014-09-08 04:50:33: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhCollectQueryData (\LogicalDisk(M:\MCLMSANJ001-DB02)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB02)\% Free Space)
2014-09-08 04:51:08: error:modules\CheckSystem\PDHCollector.cpp:215: Failed to query performance counters: \Processor(_total)\% Processor Time: PdhGetFormattedCounterValue failed: A counter with a negative denominator value was detected. (800007D6)
2014-09-08 05:53:34: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB01)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB01)\% Free Space)
2014-09-08 05:53:41: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB06)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB06)\% Free Space)
2014-09-08 05:53:41: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB09)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB09)\% Free Space)
2014-09-08 05:53:41: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB16)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB16)\% Free Space)
2014-09-08 05:53:41: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB17)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB17)\% Free Space)
2014-09-08 05:53:42: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\LogicalDisk(M:\MCLMSANJ001-DB20)\% Free Space|\LogicalDisk(M:\MCLMSANJ001-DB20)\% Free Space)


Why is agent nsclient stopped?
My nsclient version is NSClient++ - 0.3.9.328
Thanks for your time.
Regards.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: nsclient service terminated unexpectedly

Post by RDMaroto »

The WinHTTP Web Proxy Auto-Discovery Service has been idle for 15 minutes, it will be shut down.

Does this service influence NSCLIENT?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient service terminated unexpectedly

Post by lmiltchev »

It's possible that this error is associated with the windows performance counters. You can try rebuilding them by running on the windows box at the command prompt:

Code: Select all

cd\windows\system32
lodctr /R
http://support.microsoft.com/kb/300956

then restarting the nsclient++ service. If the issue doesn't go away, check the log again for new errors.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: nsclient service terminated unexpectedly

Post by RDMaroto »

I've restored the counters but the problem persists
In the nsc.ini i have:

; Restart service if a crash is detected

restart=1

But when nsclient down, does not start automatically.

What is this restart?

Thanks.
Regards
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: nsclient service terminated unexpectedly

Post by RDMaroto »

I have this error in the event view.

"Faulting application nsclient++.exe, version 0.0.0.0, faulting module CheckSystem.dll, version 0.0.0.0, fault address"

Where is the problem?

Thanks for your time.

Regards
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient service terminated unexpectedly

Post by lmiltchev »

Does this service influence NSCLIENT?
Not really. I believe the issue is elsewhere.

Can you turn on debugging, so that we get more info in the nsclient.log? I believe in the [/settings/logfile] section, you can set:

Code: Select all

debug = true
and restart the NSClient++ service. See if you are going to get some extra info in the log that can point us to the right direction.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: nsclient service terminated unexpectedly

Post by RDMaroto »

Good morning,

In my nsclient.log appears all night:

2014-09-10 01:42:02: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhAddCounter (\MSExchangeIS Mailbox(MEXMSANJ001-S08-MEXMSANJ001-DB08)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S08-MEXMSANJ001-DB08)\Client Logons)
2014-09-10 01:42:02: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhAddCounter (\MSExchangeIS Mailbox(MEXMSANJ001-S07-MEXMSANJ001-DB07)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S07-MEXMSANJ001-DB07)\Client Logons)
2014-09-10 01:42:02: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhAddCounter (\MSExchangeIS Mailbox(MEXMSANJ001-S10-MEXMSANJ001-DB10)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S10-MEXMSANJ001-DB10)\Client Logons)
2014-09-10 02:10:43: error:modules\CheckSystem\PDHCollector.cpp:215: Failed to query performance counters: \Processor(_total)\% Processor Time: PdhGetFormattedCounterValue failed: A counter with a negative denominator value was detected. (800007D6)
2014-09-10 02:13:55: error:modules\CheckSystem\PDHCollector.cpp:215: Failed to query performance counters: Failed to get mutex for PdhCollectQueryData
2014-09-10 02:13:55: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeIS Mailbox(MEXMSANJ001-S08-MEXMSANJ001-DB08)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S08-MEXMSANJ001-DB08)\Client Logons)
2014-09-10 02:13:56: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeIS Mailbox(MEXMSANJ001-S02-MEXMSANJ001-DB02)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S02-MEXMSANJ001-DB02)\Client Logons)
2014-09-10 02:14:00: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeIS Mailbox(MEXMSANJ001-S21-MEXMSANJ001-DB21)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S21-MEXMSANJ001-DB21)\Client Logons)
2014-09-10 02:14:00: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeIS Mailbox(MEXMSANJ001-S05-MEXMSANJ001-DB05)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S05-MEXMSANJ001-DB05)\Client Logons)
2014-09-10 02:14:00: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeIS Mailbox(MEXMSANJ001-S12-MEXMSANJ001-DB12)\Client Logons|\MSExchangeIS Mailbox(MEXMSANJ001-S12-MEXMSANJ001-DB12)\Client


I execute:

$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s N4g105s -v COUNTER -d SHOWALL -w $ARG1$ -c $ARG2$ -l $ARG3$

ARG3 is:
"\\\\MSExchangeIS Mailbox(MEXMATOC001-S01-MEXMATOC001-DB01)\\Client Logons","DB01 Logons: %.f"

Whats is the problema??

Edit: And only fails in the evening.

Thanks for your time.
Regards
Last edited by slansing on Fri Sep 19, 2014 11:33 am, edited 1 time in total.
Reason: Combined your post with the previous one.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nsclient service terminated unexpectedly

Post by abrist »

Is the box doing something really resource intensive "in the evening", like backups, etc?
Former 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.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: nsclient service terminated unexpectedly

Post by RDMaroto »

Good morning,
The evening runs a backup in the windows machine.
Thanks
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nsclient service terminated unexpectedly

Post by Box293 »

My suggestion is to upgrade to NSClient++ 4.x
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked