環境:CentOS 6.4,源碼安裝nrpe-2.15
安裝nrpe已經幾十次了,沒想到今天又遇到這個錯誤,用以前的方法無法解決,現記錄如下。
# /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
解決方法:
因為測試的時候 127.0.0.1並不報錯
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.15
所以試着在/etc/xinetd.d/nrpe 的 "only_from" 選項后面增加 localhost,發現測試結果正確了。
# cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 localhost
}
# /etc/init.d/xinetd restart
# /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.15