Could not complete SSL handshake.

问题:

[root@mode objects]# /usr/local/nagios/libexec/check_nrpe -H 172.30.71.238 -c check_load

CHECK_NRPE: Error – Could not complete SSL handshake.

解决方案:

出现此问题原因很多,考虑排差的方面很广

首先:

排查客户端:

第一:vi nrpe.cfg

command[check_load]=/usr/local/nagios/libexec/check_load -w 15.10.5 -c 30.25.20command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -w 10% -c 3%command[check_disk]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%command[check_iostat]=/usr/local/nagios/libexec/check_iostat -w 6 -c 10利用这些命令在客户端监控客户端的信息,能否成功,

如果成功,这说明,客户端配置没有问题,一般来说,不能在这里出问题,,但也不例外,下面两个就是客户端的问题

如果客户端的问题解决了,还没有搞定的话,下一步要排查的地方

在客户端配置文件中包含的与服务端有关的信息

如:vi nrpe.cfg

allowed_hosts=172.30.71.20,172.30.71.238

加入服务端ip,以英文逗号隔开,等号左右不能有空格

还有一点,check_nrpe插件有没有定义导致,当然,如果不定义,nagios服务端语法检查会报错的

检查语法:

/etc/init.d/nagios checkconfig

会发现报错:

Checking services…

Error: Service check command’check_nrpe’specified in service ‘Swap Useage’ for host ‘197-etiantian-1-1’ not

defined anywhere!

省略若干。。

Total Warnings: 0

Total Errors: 5

需要在commands.cfg中加入check_nrpe的插件配置(服务端)

#vi commands.cfg进入后按shift+g切到结尾加入下面内容。

# ‘check_nrpe’ command definition

define command{

command_name check_nrpe

command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

}

此时重新执行检查语法命令:

检查语法:

/etc/init.d/nagios checkconfig

Total Warnings: 0

Total Errors: 0

还有一些排查点

1. 确认check_nrpe 和 nrpe daemon的版本一定要一致。

rpm –qa|grep openssl查看2. 确认 check_nrpe和nrpe deamon端同时启用或者禁用ssl支持。

/usr/local/nagios/bin/nrpe –c /usr/local/nagios/etc/nrpe.cfg –d –n

-n代表不使用ssl。

要启动ssl,两边都启动;要不启动,两边就都关闭;不可以一边启动,一边关闭

就这样

而其实你还爱着他,你一点也不好。

Could not complete SSL handshake.

相关文章:

你感兴趣的文章:

标签云: