What should I look for when troubleshooting a "Connection refused or timed out" when checking via NRPE to a Linux machine?<br><br>I'm having this problem on two targets.  So far, I've installed NRPE on 5 machines, and 3 worked without a hitch, and these two are giving me headaches.   Some info about the targets.<br>
<br>10.5.10.50 is my Nagios server, dfslit1<br>10.5.10.90 is the target client, dfslrdb01. The second problem machine produces identical output to this one, aside from a different CentOS version.<br><br>Both (well, all 5) are running this version of NRPE:<br>
<br>NRPE - Nagios Remote Plugin Executor<br>Copyright (c) 1999-2008 Ethan Galstad (<a href="mailto:nagios@nagios.org">nagios@nagios.org</a>)<br>Version: 2.12<br clear="all"><br>Client OS versions are:<br>CentOS release 5.3 (Final)<br>
CentOS release 5.2 (Final)<br><br>From /var/log/messages when I restart the NRPE:<br><br>Aug 19 13:51:08 dfslrdb01 nrpe[13249]: Starting up daemon<br>Aug 19 13:51:08 dfslrdb01 nrpe[13249]: Listening for connections on port 5666 <br>
Aug 19 13:51:08 dfslrdb01 nrpe[13249]: Allowing connections from: 127.0.0.1,10.5.10.50 <br>Aug 19 13:51:53 dfslrdb01 nrpe[13249]: Caught SIGTERM - shutting down... <br>Aug 19 13:51:53 dfslrdb01 nrpe[13249]: Cannot remove pidfile '/var/run/nrpe.pid' - check your privileges.<br>
Aug 19 13:51:53 dfslrdb01 nrpe[13249]: Daemon shutdown <br>Aug 19 13:51:53 dfslrdb01 nrpe[13266]: Starting up daemon<br>Aug 19 13:51:53 dfslrdb01 nrpe[13266]: Listening for connections on port 5666 <br>Aug 19 13:51:53 dfslrdb01 nrpe[13266]: Allowing connections from: 127.0.0.1,10.5.10.50 <br>
<br>(10.5.10.50 is my Nagios server)<br>I look in /var/run/nrpe.pid and the file is gone when NRPE stops, and is re-created when it starts.  When it's running, permissions are:<br><br>[root@dfslrdb01 ~]# ll /var/run/nrpe.pid<br>
-rw-r--r-- 1 root root 6 Aug 19 14:09 /var/run/nrpe.pid<br><br>Checking to see if the port's open:<br><br> [mikes@dfslrdb01 ~]$ netstat -l | grep 5666<br>tcp        0      0 *:5666                      *:*                         LISTEN      <br>
<br>Command definition from /etc/nagios/nrpe.cfg:<br><br>command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1<br><br>Running the command on the target machine:<br><br>[mikes@dfslrdb01 ~]$ sudo su - nagios<br>
-sh-3.2$ /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1<br>DISK OK - free space: / 294574 MB (45% inode=99%);| /=358494MB;550890;619751;0;688613<br><br><br>Running it at the command line from the server; result is the same with or without -n:<br>
<br>nagios@dfslit1:~$ /usr/lib/nagios/plugins/check_nrpe -H 10.5.10.90 -c check_disk<br>Connection refused or timed out<br><br>nagios@dfslit1:~$ tcptraceroute 10.5.10.90 5666<br>Selected device eth0, address 10.5.10.50, port 36013 for outgoing packets<br>
Tracing the path to 10.5.10.90 on TCP port 5666, 30 hops max<br> 1  10.5.10.90  2.965 ms !C  0.841 ms !C  0.744 ms !C<br><br>nagios@dfslit1:~$ telnet 10.5.10.90 5666<br>Trying 10.5.10.90...<br>telnet: Unable to connect to remote host: No route to host<br>
<br>I installed from Dag's repository:<br><a href="http://dag.wieers.com/rpm/FAQ.php#B">http://dag.wieers.com/rpm/FAQ.php#B</a><br><br>[root@dfslrdb01 ~]# iptables -L<br>Chain INPUT (policy ACCEPT)<br>target     prot opt source               destination         <br>
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            <br><br>Chain FORWARD (policy ACCEPT)<br>target     prot opt source               destination         <br>RH-Firewall-1-INPUT  all  --  anywhere             anywhere            <br>
<br>Chain OUTPUT (policy ACCEPT)<br>target     prot opt source               destination         <br><br>Chain RH-Firewall-1-INPUT (2 references)<br>target     prot opt source               destination         <br>ACCEPT     all  --  anywhere             anywhere            <br>
ACCEPT     icmp --  anywhere             anywhere            icmp any <br>ACCEPT     esp  --  anywhere             anywhere            <br>ACCEPT     ah   --  anywhere             anywhere            <br>ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns <br>
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp <br>ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp <br>ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED <br>
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:nfs <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh <br>
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:sunrpc <br>
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:terabase <br>ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:terabase <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:newoak <br>
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:newoak <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pxc-spvr-ft <br>ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:pxc-spvr-ft <br>
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:rquotad <br>ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:rquotad <br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:mysql <br>
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited <br><br>My problem seems similar to this, but neither my nor Google Translate's German is good enough to figure out what fixed the problem.  Perhaps it's in suiss-allemagne, but high school French is doing me no good today.<br>
<a href="http://www.nagios-portal.org/wbb/index.php?page=Thread&threadID=12885">http://www.nagios-portal.org/wbb/index.php?page=Thread&threadID=12885</a><br><br>What should I look at next?<br><br>Thanks,<br>-Mike<br>