NSClient++ returns 'Connection Refused'

49,819

Solution 1

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.

Solution 2

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

Share:
49,819

Related videos on Youtube

Jim R
Author by

Jim R

Updated on September 18, 2022

Comments

  • Jim R
    Jim R almost 2 years

    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
    
  • Jim R
    Jim R over 12 years
    also... NSC.ini is the correct configuration file. NOT nsclient.ini! Why the installer puts that in the directory I will never figure out.
  • Ynhockey
    Ynhockey over 11 years
    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.
  • Alan M
    Alan M almost 10 years
    #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.
  • uSlackr
    uSlackr over 7 years
    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.