Service Side (192.168.2.110) Unable to access client's Nrpe:
[Email protected] ~]#/usr/local/nagios/libexec/check_nrpe-h 127.0.0.1
NRPE v2.12
[Email protected] ~]#/usr/local/nagios/libexec/check_nrpe-h 192.168.2.120
Connection refused by host
Client (192.168.2.120):
[[email protected] etc]# lsof-i: 5666
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Nrpe 18703 Nagios 4u IPv4 85766 0t0 TCP localhost : 5666 (LISTEN) #只在本地有效, all external IPs cannot be accessed
[Email protected] etc]# vim nrpe.conf +44
Comment out the following:
#server_address =127.0.0.1
[Email protected] etc]# Pkill Nrpe
[Email protected] etc]#/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d
[[email protected] etc]# lsof-i: 5666
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Nrpe 18766 Nagios 4u IPv4 89670 0t0 TCP *:5666 (LISTEN)
This is going to be a normal visit.
Service-Side access:
[Email protected] etc]#/usr/local/nagios/libexec/check_nrpe-h 192.168.2.120-c check_iostat
IOSTAT ok-user 0.28 Nice 0.00 sys 0.30 iowait 0.31 idle 0.00 | iowait=0.31%;; idle=0.00%;; user=0.28%;; nice=0.00%;; sys=0.30%;;
This article from "Nanshengchang Technology blog" blog, declined reprint!
Nagios Connection refused by host