Debian Nagios NRPE 连接被拒绝

问题描述

我已经从这里检查了一些文档,但仍然找不到解决方案。 我有一个 nagios 服务器和一个要监控的网络服务器(RAM)。 Debian 两个 服务器和插件安装正确。端口 5666 在两者中都打开。 正如我们在下面看到的,网络服务器允许来自 192.168.0.119 的连接,因为我配置允许它。
nrpe.cfg 日志输出

Apr 12 13:34:14 webserver2 systemd[1]: Started Nagios Remote Plugin Executor.
Apr 12 13:34:14 webserver2 nrpe[903]: parse_allowed_hosts: parsing the allowed host string >192.168.0.119< to add to ACL list
Apr 12 13:34:14 webserver2 nrpe[903]: parse_allowed_hosts: ADDING this record (192.168.0.119) to ACL list!
Apr 12 13:34:14 webserver2 nrpe[903]: add_ipv4_to_acl: checking ip-address >192.168.0.119<
Apr 12 13:34:14 webserver2 nrpe[903]: add_ipv4_to_acl: ip-address >192.168.0.119< correct,adding.
Apr 12 13:34:14 webserver2 nrpe[903]: parse_allowed_hosts: Record added to ACL list!
Apr 12 13:34:14 webserver2 nrpe[903]: Showing ACL lists for both IP and DOMAIN acl's:
Apr 12 13:34:14 webserver2 nrpe[903]: IP ACL: 192.168.0.119/32 1996531904
Apr 12 13:34:14 webserver2 nrpe[903]: Added command[check_mem]=/usr/lib/nagios/plugins/check_mem -f -w 20 -c 10
Apr 12 13:34:14 webserver2 nrpe[903]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Apr 12 13:34:14 webserver2 nrpe[903]: Starting up daemon
Apr 12 13:34:14 webserver2 nrpe[903]: SETUP_WAIT_CONN FOR: IPv4 address: 127.0.0.1 ((null))
Apr 12 13:34:14 webserver2 nrpe[903]: Server listening on 127.0.0.1 port 5666.
Apr 12 13:34:14 webserver2 nrpe[903]: Listening for connections on port 5666
Apr 12 13:34:14 webserver2 nrpe[903]: Allowing connections from: 192.168.0.119

但是当我从 nagios 下面运行时,出现连接被拒绝的错误

nagios@nagios:/usr/local/nagios/etc/objects$ /usr/lib/nagios/plugins/check_nrpe -H 192.168.0.166 –c check_mem
connect to address 192.168.0.166 port 5666: Connection refused
connect to host 192.168.0.166 port 5666: Connection refused

当然从网络服务器(192.168.0.166)本地运行可以正常工作
root@webserver2:/usr/lib/nagios/plugins# ./check_mem -f -w 20 -c 10
OK - 91.5% (1870592 kB) free.|TOTAL=2043252KB;;;; USED=172660KB;1634601;1838926;; FREE=1870592KB;;;; CACHES=83440KB;;;;

谁能帮我解决这个问题?非常感谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)