簡體   English   中英

Nagios CHECK_NRPE無法完成SSL握手

[英]Nagios CHECK_NRPE Could not complete SSL handshake

我檢查了一下,這個問題有很多答案,但是沒有一個有效。 我正在關注本教程: https : //www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-16-04

Nagios主機為ubuntu 16.04,客戶端為ubuntu 18.04Nagios®Core™4.3.4

Nagios服務器和Web運行正常,我可以在儀表板上看到本地狀態“我們”。

很奇怪:我在主機和客戶端上都安裝了NRPE 3.2.1,但是由於某種原因,主機上是2.15

主辦:

root@nagios-1:/tmp/nrpe-nrpe-3.2.1# /usr/local/nagios/libexec/check_nrpe -H 10.142.0.50
NRPE v2.15

客戶:

$  /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v3.2.1

只是為了確保,當從客戶端到服務器運行check_nrpe時,我使用'-2'選項來強制v2數據包,但是我仍然遇到錯誤

我將客戶端IP添加到了nrpe.cnf(在服務器上),並且還要確保將服務器IP添加到客戶端nrpe.cfg文件。

我啟用了調試以查看系統日志中的消息。 這是響應:

Dec  4 00:35:47 nagios-1 check_nrpe: Remote 10.142.0.50 accepted a Version 2 Packet
Dec  4 00:35:51 nagios-1 nrpe[9953]: Connection from 10.142.0.11 port 49889
Dec  4 00:35:51 nagios-1 nrpe[9953]: Host address is in allowed_hosts
Dec  4 00:35:51 nagios-1 nrpe[9953]: Handling the connection...
Dec  4 00:35:51 nagios-1 nrpe[9953]: Error: Could not complete SSL handshake. 1
Dec  4 00:35:51 nagios-1 nrpe[9953]: Connection from  closed.

在主機上,端口5666已打開並正在偵聽

# netstat -at | grep nrpe
tcp        0      0 *:nrpe                  *:*                     LISTEN
tcp6       0      0 [::]:nrpe               [::]:*                  LISTEN

我用-不使用xinetd編譯了nrpe。 我使用守護程序

# ps aux | grep nrpe
nagios    9866  0.0  0.1  23960  2680 ?        Ss   00:35   0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d

主機nrpe conf文件:

# grep -o '^[^#]*'  /etc/nagios/nrpe.cfg
log_facility=daemon
pid_file=/var/run/nagios/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1, 10.142.0.50, 10.142.0.0/20,10.142.0.11
dont_blame_nrpe=1
allow_bash_command_substitution=0
debug=1
command_timeout=60
connection_timeout=300
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
include=/etc/nagios/nrpe_local.cfg
include_dir=/etc/nagios/nrpe.d/

如果您需要更多信息,請告訴我,我會添加它。

我找到了答案! 我在主機上有兩個版本的NRPE。 惡魔運行2.15。 我必須終止該版本,然后從其他位置手動運行3.2.1版本

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f

之后,我能夠在客戶端中得到響應

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM