check_nrpe socket timeout after n seconds
-
manish2tiwari
- Posts: 31
- Joined: Thu Sep 13, 2012 12:48 pm
check_nrpe socket timeout after n seconds
Hi All,
We are facing check_nrpe socket timeout after 10 seconds error whenever we are trying to use check_nrpe command for one of our Unix server.
We are using Red Hat Enterprise Linux Server release 5.6 (Tikanga) as the target server and virtual machine as the Source Nagios server.
We are able to use the same command for our windows server.
We have done the configuration settings as required in all the configuration file but not able to run the command on target server. local host in unix server is working fine and giving below output
Command: /usr/local/nagios/libexec/check_nrpe -H localhost
Output: NRPE v2.12
Please let us know if we are missing anything here.
Thanks in advance,
Manish
+004917687766033
We are facing check_nrpe socket timeout after 10 seconds error whenever we are trying to use check_nrpe command for one of our Unix server.
We are using Red Hat Enterprise Linux Server release 5.6 (Tikanga) as the target server and virtual machine as the Source Nagios server.
We are able to use the same command for our windows server.
We have done the configuration settings as required in all the configuration file but not able to run the command on target server. local host in unix server is working fine and giving below output
Command: /usr/local/nagios/libexec/check_nrpe -H localhost
Output: NRPE v2.12
Please let us know if we are missing anything here.
Thanks in advance,
Manish
+004917687766033
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe socket timeout after n seconds
Are you using this check to see if they can communicate?:
Or a custom check? Just making sure you are trying the same thing. Do you have the NRPE standard port 5666 opened on the RHEL server?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H host.ip.address.here-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe socket timeout after n seconds
Also, for some background also, did you use the our Linux agent installer?
And, on the machine with the agent installed can you see it listening on port 5666
Finally you may need to verify you don't have a firewall blocking port 5666
And, on the machine with the agent installed can you see it listening on port 5666
Code: Select all
netstat -lnp |grep 5666-
manish2tiwari
- Posts: 31
- Joined: Thu Sep 13, 2012 12:48 pm
Re: check_nrpe socket timeout after n seconds
Hi Scott,
The command (netstat -lnp |grep 5666) is giving below reply:
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 19004/nrpe
Hi Slansing,
Yes i am using that check on the Nagios hosting server and getting socket timeout error there.
Thanks,
Manish
The command (netstat -lnp |grep 5666) is giving below reply:
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 19004/nrpe
Hi Slansing,
Yes i am using that check on the Nagios hosting server and getting socket timeout error there.
Thanks,
Manish
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe socket timeout after n seconds
Can you check your nrpe.cfg file and make sure that you have your XI server listed as an allowed host?:
Code: Select all
vi /usr/local/nagios/etc/nrpe.cfg-
manish2tiwari
- Posts: 31
- Joined: Thu Sep 13, 2012 12:48 pm
Re: check_nrpe socket timeout after n seconds
yes /usr/local/nagios/etc/nrpe.cfg contains below line:
allowed_hosts=10.123.4.21
10.123.4.21 is our Nagios XI server.
Thanks,
Manish
allowed_hosts=10.123.4.21
10.123.4.21 is our Nagios XI server.
Thanks,
Manish
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe socket timeout after n seconds
Did you restart the NRPE service after editing the nrpe.cfg?
Are you running any custom firewalls?
Code: Select all
service nrpe restartRe: check_nrpe socket timeout after n seconds
Can you also run the following command and the output of it?
Code: Select all
iptables -L -n | grep 5666Be sure to check out our Knowledgebase for helpful articles and solutions!
-
manish2tiwari
- Posts: 31
- Joined: Thu Sep 13, 2012 12:48 pm
Re: check_nrpe socket timeout after n seconds
@Slansing: service restart nrpe is giving command cannot found error, is there any specific path where i have to run it.
@limiltchev: iptables -L -n | grep 5666 command in my Nagios XI server giving below output:
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
Thanks,
Manish
@limiltchev: iptables -L -n | grep 5666 command in my Nagios XI server giving below output:
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
ACCEPT - tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666
Thanks,
Manish
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe socket timeout after n seconds
Not sure why you have so many extra lines in there, also you have a single line without ACCEPT in front of it
Here is what I would recommend, edit /etc/sysconfig/iptables-config and change the following to yes
IPTABLES_SAVE_ON_STOP
IPTABLES_SAVE_ON_RESTART
Then stop iptables, and edit /etc/sysconfig/iptables to have a line like
Then start iptables
also to restart nrpe you may need to run
Code: Select all
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5666IPTABLES_SAVE_ON_STOP
IPTABLES_SAVE_ON_RESTART
Then stop iptables, and edit /etc/sysconfig/iptables to have a line like
Code: Select all
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPTalso to restart nrpe you may need to run
Code: Select all
/etc/init.d/nrpe restart