Connect to address 127.0.0.1 port 5666 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
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Connect to address 127.0.0.1 port 5666 connection refused

Post 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
kyang

Re: Connect to address 127.0.0.1 port 5666 connection refuse

Post 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.
bolson

Re: Connect to address 127.0.0.1 port 5666 connection refuse

Post 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
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Connect to address 127.0.0.1 port 5666 connection refuse

Post 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.
bolson

Re: Connect to address 127.0.0.1 port 5666 connection refuse

Post 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?
Locked