Page 1 of 1

Windows Host giving the Error Connection refused

Posted: Tue Sep 12, 2017 5:39 am
by amitgupta19
I am trying to monitor a windows 2012 server using the nagios Core.

But i am getting the below Error for all the Services is "Connection Refused"

Please suggest what could be the problem.

Windows 2012-- Invalid Drive and Return code 139

Posted: Tue Sep 12, 2017 5:46 am
by amitgupta19
I am trying to monitor the Windows 2012 host using the Nagios Core.

I have installed the NSClient on the Server.

For the Drive Space i am getting the Error Invalid Drive.

For Memory usage i am getting the Error " Return code of 139 is out of Bounds"

It seems that it is not able to fetch other data as well, please have a look at the screenshot attached.

Re: Windows Host giving the Error Connection refused

Posted: Tue Sep 12, 2017 8:11 am
by scottwilkerson
amitgupta19 wrote:I am trying to monitor a windows 2012 server using the nagios Core.

But i am getting the below Error for all the Services is "Connection Refused"

Please suggest what could be the problem.
How are you trying to monitor the server?
What checks are you performing?

Are you running an agent of the server? If so, it looks like a firewall is blocking access.

Re: Windows Host giving the Error Connection refused

Posted: Tue Sep 12, 2017 8:57 am
by amitgupta19
I have installed the NSClient on the Server.

I am trying to monitor the following parameters.

1) CPU
2) Memory
3) Hard Disk
4) Up Time

Re: Windows Host giving the Error Connection refused

Posted: Tue Sep 12, 2017 9:01 am
by scottwilkerson
If you are getting connection refused, it sounds like the firewall may be active and you don't have an exception for port 12489 OR the NSClient service isn't running.

Re: Windows Host giving the Error Connection refused

Posted: Wed Sep 13, 2017 8:47 am
by amitgupta19
Hi scottwilkerson

Port 12489 has been unblocked.
out of the 2 servers, i am able to get connected to the one server.

For 1 server i am still not able to get the data.
Following Error:
For C Drive--- Invalid Drive
For Memory usage--- Return code of 139 is out of bounds
UP time --- it is showing 0 days but server is up since long time

Re: Windows Host giving the Error Connection refused

Posted: Wed Sep 13, 2017 9:01 am
by scottwilkerson
Can you compare the following between the server that is working and the the one that is not to make sure they match

nsclient.ini

check_command directive in each of the services

Re: Windows Host giving the Error Connection refused

Posted: Wed Sep 13, 2017 12:16 pm
by amitgupta19
nclient.ini file is not same on both the servers.

Do let me know is it ok to replace the nsclient.ini file from the working server to the non working server.

If yes do i need to restart the services of the Nagios after the file replace.

Re: Windows Host giving the Error Connection refused

Posted: Wed Sep 13, 2017 1:20 pm
by scottwilkerson
amitgupta19 wrote:nclient.ini file is not same on both the servers.

Do let me know is it ok to replace the nsclient.ini file from the working server to the non working server.
Yes, this shouldn't be a problem, but you may want a backup of the file just in case.
amitgupta19 wrote:If yes do i need to restart the services of the Nagios after the file replace.
Yes, you will need to restart the services for the changes to take affect.