Page 1 of 2

NCPA Listener - Windows Service Failure

Posted: Mon Nov 10, 2014 9:19 am
by jbouvier
Hello,

Historically, we had issues with SNMP checks working correctly on Windows, and have just switched over to using NCPA for our CPU/Disk/Memory checks. We are running in to an issue with the NCPA Listener service failing to start on boot on our Windows machines. The service gets stuck in a Starting state and never actually starts. I was able to get around this by setting the service to a delayed start, but we still have some older (Windows 2003 and 2000) machines where delayed start is not available. Setting a dependency on one of the last services to start (like Spooler) may work, but I think best course of action is to find and set the correct service dependencies for the NCPA Listener service. Can you help by providing a list of dependent Windows services?

Thanks,
Jonathan

Re: NCPA Listener - Windows Service Failure

Posted: Mon Nov 10, 2014 12:00 pm
by lmiltchev
You can view the dependencies here:

https://github.com/NagiosEnterprises/ncpabuild

and post your issue here:

https://github.com/NagiosEnterprises/nc ... is%3Aissue

Nte: This is probably going to be the fastest way to get a response from the NCPA developer. I could post the issue for you, but I was not able to reproduce it.
What is the version of NCPA that you are currently using?

Re: NCPA Listener - Windows Service Failure

Posted: Mon Nov 10, 2014 3:13 pm
by jbouvier
I am using NCPA v1.7.2. The NCPA Listener Service gets stuck in a Starting state on nearly all of our Windows Machines (Server 2012, 2008, 2003, and 2000) on reboot. Once the machine is booted, killing the NCPA Listener process, and restarting the service will successfully start it. It seems like maybe the NCPA Listener Service might be dependent on some other Windows Services starting up first, since putting it in a delayed start seems to resolve the issue on machines that are capable of that feature.

The dependencies listed on the NCPA github page look to be those needed to build the package, not services it depends on in the boot order. I can open an issue over there though. Thanks.

Re: NCPA Listener - Windows Service Failure

Posted: Mon Nov 10, 2014 3:52 pm
by abrist
That would be great. Please post a link to the issue here once you have submitted it over on github.

Re: NCPA Listener - Windows Service Failure

Posted: Mon Nov 10, 2014 3:53 pm
by sreinhardt
I would completely agree, that sounds like a bug with start order. I will do some testing on my systems and see if I can replicate the issue on a couple windows server variants. If I can, I will post a bug on github and link back here!

Re: NCPA Listener - Windows Service Failure

Posted: Fri Nov 14, 2014 11:53 am
by paul.jobb
Hi;

I'm having the same issue, setting the service to automatic(delayed start) works, but it would be nice to have it start on boot however and not have to wait the couple minutes.

Just posting to this thread so I can get the notification when a patch is released though, as it sounds like your working on it.

Thanks,
Paul

Re: NCPA Listener - Windows Service Failure

Posted: Fri Nov 14, 2014 12:45 pm
by lmiltchev
paul.jobb, are you also having this issue on Windows Server 2012, 2008, 2003, and 2000? 32- or 64-bit?

Re: NCPA Listener - Windows Service Failure

Posted: Fri Nov 14, 2014 12:56 pm
by paul.jobb
I only have it installed on one server at the moment
Capture.PNG
This was the contents of ncpa-listener.log

[01760] 2014/11/13 17:08:36.552 starting logging at level ERROR
[01760] 2014/11/13 17:08:37.318 Python exception encountered:
[01760] 2014/11/13 17:08:37.318 Internal Message: cannot import service module
[01760] 2014/11/13 17:08:37.318 Type => <type 'exceptions.RuntimeError'>
[01760] 2014/11/13 17:08:37.318 Value => couldn't find any physical disk
[01760] 2014/11/13 17:08:37.318 Traceback (most recent call last):

[01760] 2014/11/13 17:08:37.318 File "C:\ncpa\agent\ncpa_windows.py", line 20, in <module>

[01760] 2014/11/13 17:08:37.318 File "D:\Program Files (x86)\Nagios\NCPA\passive\nrds.py", line 4, in <module>
from passive.nagioshandler import NagiosHandler

[01760] 2014/11/13 17:08:37.318 File "D:\Program Files (x86)\Nagios\NCPA\passive\nagioshandler.py", line 3, in <module>
import ncpacheck

[01760] 2014/11/13 17:08:37.318 File "D:\Program Files (x86)\Nagios\NCPA\passive\ncpacheck.py", line 5, in <module>
import listener.server

[01760] 2014/11/13 17:08:37.318 File "C:\ncpa\agent\listener\server.py", line 8, in <module>

[01760] 2014/11/13 17:08:37.318 File "C:\ncpa\agent\listener\psapi.py", line 156, in <module>

[01760] 2014/11/13 17:08:37.318 File "C:\ncpa\agent\listener\psapi.py", line 129, in get_root_node

[01760] 2014/11/13 17:08:37.318 File "C:\ncpa\agent\listener\psapi.py", line 96, in get_disk_node

[01760] 2014/11/13 17:08:37.318 File "C:\Python27\lib\site-packages\psutil\__init__.py", line 1726, in disk_io_counters

[01760] 2014/11/13 17:08:37.318 RuntimeError: couldn't find any physical disk

Re: NCPA Listener - Windows Service Failure

Posted: Fri Nov 14, 2014 3:16 pm
by lmiltchev
Can you post the issue on the GitHub here?

https://github.com/NagiosEnterprises/nc ... is%3Aissue

I've seen the "RuntimeError: couldn't find any physical disk" error before. I know that some users were able to fix it by running the "diskperf -y" command on the Windows box and/or by installing Python 2.7 on the client:

https://www.python.org/download/releases/2.7.8/

Re: NCPA Listener - Windows Service Failure

Posted: Tue Nov 18, 2014 6:22 pm
by paul.jobb
Hi;
'diskperf -y' seemed to address the issue on the server I am testing with. Ran the command, put services back to start automatically and restarted. Services appeared to start