I have been unsuccessfully trying to get NSClient to work on my 64 bit Windows 7 machine with Windows Firewall turned off.

I have tried with the service started and also tried running 'NSClient++ /test'. No difference. I have run Microsoft Network Monitor 3.4 and did a capture on port 12489. Each time I run the check_nt command from the Nagios computer, I get a "connection refused" "could not fetch information from server" response on the command line.

The network monitor shows a packed received on the NSClient machine that was sent from the Nagios machine. There is also a repsonse packet returned. Unfortunately, I do not know how to interpret the response.

For those so inclined, here are the contents of the return packet:

 0000 00 27 0E 0D 41 BF 14 DA E9 15 36 7C 08 00 45 00
 0010 00 28 0A DB 40 00 80 06 58 18 C0 A8 0B 16 C0 A8
 0020 0B 76 30 C9 83 A4 00 00 00 00 59 FE 4B C0 50 14
 0030 00 00 97 F7 00 00
  • 3
    In your nsc.ini file on your Windows 7 machine have you guaranteed that your nagios server's IP address is listed under # ALLOWED HOST ADDRESS?
    – user89350
    Feb 27 '12 at 18:39
  • I am not personally familiar with Microsoft Network Monitor 3.4, but if you want a graphical tool, you might want to look at the same packet exchange in WireShark.
    – Skyhawk
    Feb 27 '12 at 18:43
  • @Miles - thanks, I am familiar with WireShark, NetworkMonitor is pretty much an equivalent. Except that it is only for windows. Is a graphical tool, has similar filtering, etc..
    – Jim R
    Feb 27 '12 at 23:47

look at the following:
- verify what port NSClient is listening on by looking at the port parameter in the [NSClient] section of NSC.ini.
- Ensure nsclientlistener.dll is not commented out in the modules section
- Ensure netstat -an shows windows is listening on the port listed above.

  • also... NSC.ini is the correct configuration file. NOT nsclient.ini! Why the installer puts that in the directory I will never figure out.
    – Jim R
    Feb 28 '12 at 13:50
  • Adding to this: in case NSClient++ is not listening on port 12489, even though it should be, before you go about debugging just restart the NSClient++ service, it often helps.
    – Ynhockey
    Feb 12 '13 at 12:36
  • #Jim R; in my case at least, it was necessary to to mod nsc.ini AND nsclient.ini. This was for a W2k8R2 server, fwiw. Cannot say specifically why modding both worked, but it did make the pain stop.
    – Alan M
    Jul 7 '14 at 19:14
  • Circling back to a prior comment - nsc.ini or nsclient.ini are both possible based on the configuration in boot.ini. Sorry for any confusion.
    – uSlackr
    Oct 19 '16 at 19:01

in my case I installed NSclient but forgot to start the service in services.msc (not done automatically unless you restart the server)


Add below line to C:\Program Files\NSClient++\ nsclient.ini section


Note this is for windows client system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.