nagios Connection refused by host
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nagios Connection refused by host相关的知识,希望对你有一定的参考价值。
服务端(192.168.2.110)无法访问客户端的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
客户端(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)#只在本地有效,所有外部的IP无法访问
[[email protected] etc]# vim nrpe.conf +44
将以下内容注释掉:
#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)
这个就可以正常访问了
服务端访问:
[[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%;;
本文出自 “阮胜昌的技术博客” 博客,谢绝转载!
以上是关于nagios Connection refused by host的主要内容,如果未能解决你的问题,请参考以下文章
mac mysql8 代码连接数据库报错 Connection refused (Connection refused)
eureka报错 Connection refused: connect
离子 4 网络::ERR_CONNECTION_REFUSED(http://localhost/)