Page 1 of 1
Connect to address 127.0.0.1 port 5666 connection refused
Posted: Tue Aug 08, 2017 9:37 am
by sirampadu
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
connect to address 127.0.0.1 port 5666: Connection refused
connect to host 127.0.0.1 port 5666: Connection refused
Even though no firewall rules are set on my ubuntu server. I even went ahead and sudo ufw allow 5666/tcp but still no luck.
Help please
Re: Connect to address 127.0.0.1 port 5666 connection refuse
Posted: Tue Aug 08, 2017 9:42 am
by kyang
Hi
@sirampadu,
Which documentation are you following?
Here is the kb article on NRPE Ubuntu specific.
https://support.nagios.com/kb/article.php?id=515#Ubuntu
You can double check to see if you configured the firewall properly and config files.
Let me know if this helps you.
Re: Connect to address 127.0.0.1 port 5666 connection refuse
Posted: Tue Aug 08, 2017 10:46 am
by bolson
The error message "connection refused" typically means that the request is being blocked by a firewall, or more likely. NRPE is not running. Please post the output of the following three commands:
Code: Select all
netstat -at | grep nrpe
service xinetd status
cat /etc/xinted.d/nrpe
Re: Connect to address 127.0.0.1 port 5666 connection refuse
Posted: Tue Aug 08, 2017 7:58 pm
by sheen.lim
Hi sirampadu
From what I have figured out from your initial post, you are trying to check NRPE services from the NRPE client.
Check_NRPE only is available on NRPE Client (NAgios Server or Monitoring Client), To perform a successful check, you must have 2 hosts. 1 NRPE client (which is the Nagios Monitoring Server, where the package "nagios-nrpe-plugin" is installed) and 1 NRPE Server(which is the server to be monitored, where the package "nagios-nrpe-server" is installed).
After the NRPE server package (nagios-nrpe-server) is installed, it will open a open 5666 port.
On the NRPE client, is where the check_nrpe binary is located. You must target the remote host by issuing command from the NRPE client (Nagios Server)
'/usr/lib/nagios3/plugins/check_nrpe -H IPADDRESS_OF_SERVER_TO_BE_MONITORED'
And Yes, from an NRPE standpoint, the server is the server to be monitored, and the client is the Nagios Server.
Re: Connect to address 127.0.0.1 port 5666 connection refuse
Posted: Wed Aug 09, 2017 10:00 am
by bolson
Are you running this command:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
On the host you wish to monitor?