Connection Refused Or Timed Out

Connection Refused Or Timed Out errors pop up during configuration of Nagios with Linux server.

With several issues that I have written earlier for Nagios and Linux server configuration, this one took time to resolve on where exactly the issue is. Though we had proper set of values in nrpe config file and also allowed_hosts attribute was also properly defined, but still we got this error. As listed in the NRPE troubleshooting pdf, we added a new attribute and it started working.

We faced this issue on only one linux server and rest of all linux servers didn’t throw this error.

This error is most often experienced when using the remote host as an NRPE proxy server to a network segment. It can also be caused by using an incorrect IP address or hostname in the check_nrpe command. (rare in Nagios XI configurations) If you do use the remote host as an NRPE proxy, you may need to increase the maximum number of concurrent connections through xinetd.

You need to add,

per_source = UNLIMITED to /etc/xinetd.d/nrpe.

Add the following line to the file inside the closing “}”:
per_source=UNLIMITED

Restart xinetd after changing the file: service xinetd restart