Page 2 of 2

Re: UNKNOWN:failed to connect:connection refused

Posted: Tue May 02, 2017 2:08 am
by Kevin.c
and I also delete some of configuration command about !!!! , still some problem , we had several days do not had monitoring about our service ,
we try to restart the server the status change to Critical , and after some minutes they are all go to unknown again , it is important , please help , thank you !

Re: UNKNOWN:failed to connect:connection refused

Posted: Tue May 02, 2017 10:45 am
by tgriep
Can you post the name of the host and the name of the service check that you are getting the error for?
Also, can you post the error were as well so we can view it?

Re: UNKNOWN:failed to connect:connection refused

Posted: Wed May 03, 2017 2:25 am
by Kevin.c
I changed the Nagios server name in nagios system from Localhost to another company name some days ago , but no problem during that time , but after server down , we got many service unknown , I do not know is there any related or not , but looks after I change the server name back to localhost , the service monitoring ok now .

Re: UNKNOWN:failed to connect:connection refused

Posted: Wed May 03, 2017 9:33 am
by tgriep
Some plugins use the localhost settings to run the commands locally and those commands connect to the remote hosts.
If you make sure the localhost entry is still in the /etc/hosts file, you should be able to rename the system.
Try adding the example below to the /etc/hosts file and see if it works. Replace nagiosserver with the actual name.

Code: Select all

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 nagiosserver

Re: UNKNOWN:failed to connect:connection refused

Posted: Sun May 14, 2017 9:14 pm
by Kevin.c
Hi Nagios,
I just found all of those service alert were from the JMX application service we monitoring , maybe there is command issue there , do you know how we can monitoring the JMX , do we have a document , please advice , thank you !

Re: UNKNOWN:failed to connect:connection refused

Posted: Mon May 15, 2017 3:02 am
by Kevin.c
seem like there are error log with proxy service, is this the root cause ?
what is the address for 169.254.252.241 working , we do not know . it is not the nagios server address , and please check the picture I attached !
any idea about it !

all of the service working ok , expect the JMX service we define by ourself !

Re: UNKNOWN:failed to connect:connection refused

Posted: Mon May 15, 2017 4:37 am
by Kevin.c
anything wrong from system info ?

Re: UNKNOWN:failed to connect:connection refused

Posted: Mon May 15, 2017 9:39 am
by tgriep
That IP address is usually defined when the network card tries to receive an IP address from a DHCP server but it cannot connect to it so it defaults to that IP range.
That IP address is probably not routing through your network and that needs to be fixed before the check will function.
https://en.wikipedia.org/wiki/Reserved_IP_addresses

If your system has to use a proxy server to monitor your hosts, you may want to see if you can configure it so it will bypass the proxy server for your Nagios server and see if that helps out in the issue.

The link below are the instructions for monitoring JMX, take a look at it if needed.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: UNKNOWN:failed to connect:connection refused

Posted: Tue May 16, 2017 4:47 am
by Kevin.c
Hi
could I get on line support from you , I can call you when you are at work , then you can remote our server , and check what is wrong ,thank you !

Re: UNKNOWN:failed to connect:connection refused

Posted: Tue May 16, 2017 10:09 am
by tgriep
If all of the custom JMX plugins are failing with the same error, see if you can get the author to look at them and see if they see why it is failing.
Without access to those plugins and what they are doing, there isn't much we can do.

When you renamed the server, and put it back, was there any other changes done to the system?
Was the name changed in DNS?

It does seem that it could be a routing issue, can you or someone else reset the routing tables on the equipment between the Nagios server and the remote sites?