"Connection refused by host" means literally what it says. The client (nrpe), attempted to connect to the host (nagios listener) and the host rejected the attempt.
This can happen for 2 primary reasons:
1. There's nothing listening on the host port - the nrpe server isn't running either as a daemon or under the (x)inetd super-server.
2. There's a firewall blocking access to the host port.
Linux firewalls would normally be blocking the nrpe port by default, so if the nrpe server is functioning, it's probably the firewall.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Hi Tim,
Linux firewalls would normally be blocking the nrpe port by default. How would i know that Linux firewall is blocking the nrpe port..?
Is there any way that i will overcome from this issue.
I normally add this iptables predicate to a rule right before the final REJECT/DROP rule in my firewall:
"-j LOG"
That will show all the blocked traffic in the system log, including the nrpe traffic, if it's being blocked.
Most Linux systems will setup their rules to block anything that wasn't specifically approved.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
The first person to drink cow's milk. That started off as a dare from this tiny ad:
a bit of art, as a gift, that will fit in a stocking