Windows Host giving the Error Connection refused

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Windows Host giving the Error Connection refused

Post 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.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Windows 2012-- Invalid Drive and Return code 139

Post 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.
Attachments
Error for the Drive Space and Memory usage.
Error for the Drive Space and Memory usage.
Last edited by scottwilkerson on Tue Sep 12, 2017 9:03 am, edited 1 time in total.
Reason: I merged these posts together as they are the same topic
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Windows Host giving the Error Connection refused

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Windows Host giving the Error Connection refused

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Windows Host giving the Error Connection refused

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Windows Host giving the Error Connection refused

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Windows Host giving the Error Connection refused

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Windows Host giving the Error Connection refused

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Windows Host giving the Error Connection refused

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked