系統可開啟最大檔案數過小,導致CHECK_NRPE: Error - Could not complete SSL handshake
阿新 • • 發佈:2019-01-03
1.nagio伺服器發出報警日誌,客戶端ssl handshake失敗:
***** Nagios ***** Notification Type: PROBLEM Service: Check Zombie Procs Host: xxx Address: xxx State: CRITICAL Date/Time: Tue Nov 7 02:25:03 CST 2017 Additional Info: CHECK_NRPE: Error - Could not complete SSL handshake.2.檢視客戶端日誌(cat /proc/sys/fs/file-max):
56700 Nov 6 23:51:02 xxx nrpe[21537]: Config file '/usr/local/nagios/etc/nrpe.cfg' contained errors, aborting...
56701 Nov 6 23:51:02 xxx xinetd[21538]: warning: cannot open /etc/hosts.allow: Too many open files in system
56702 Nov 6 23:51:02 xxx xinetd[21538]: warning: cannot open /etc/hosts.deny: Too many open files in system
系統開啟檔案過多!
3.檢視Linux下檔案限制
[[email protected] abrt]# cat /proc/sys/fs/file-max
10240
[[email protected] abrt]# ulimit -n
65535
其中,
ulimit其實就是對單一程式的限制,程序級別的
file-max是所有程序最大的檔案數
nr_open是單個程序可分配的最大檔案數
所以,file-max過小4.設定file-max
echo 655350 > /proc/sys/fs/file-max