nc_net startup fails if nsclient not uninstalled correctly

I have quite a few Windows boxes that need monitoring from Nagios and mostly everything is pretty straightforward.  I used to use the old nsclient utility until I started to need to run custom scripts on my machines at which point I shifted to nc_net which is a lot more advanced and currently under active development (always a healthy thing for an open-source project).

The other day I rebooted one of my Windows machines to find that nc_net would not start up correctly.  I kept getting the the following error in the good old event viewer:-


Event Type:    Warning
Event Source:    NC_Net
Event Category:    None
Event ID:    1005

Description:
TCP Listener Failed to Start Service will stop. active checks will be disabled. :Only one usage of each socket address (protocol/network address/port) is normally permitted

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Unsurprisingly, clicking on the help link will not yield anything useful.  However, it was fairly obvious that something was holding the port open (in my case I was using the old Nagios 2 standard active check port of 1248).

As I had switched from nsclient it was obvious that something had gone wrong in the uninstall, so doing a bit of RTFM fixed it!!  The upshot is that to uninstall nsclient correctly you need to make sure you close the eventvwr and service mmc windows BEFORE you uninstall, so I’m guessing that I had one these open while uninstalling.  In short:-

1)  In a command prompt, browse to your nsclient directory:-


cd "c:\Program Files\nsclient\"

2)  Close all EVENTVWR and SERVICES MMC windows

3) Uninstall nsclient:-


pnsclient /uninstall

If you restart nc_net it should now work without any problems, if it still fails then uninstall and reinstall of nc_net should resolve the problem.

Tags: ,

Leave a Reply