系统可打开最大文件数过小,导致CHECK_NRPE: Error - Could not complete SSL handshake

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenglian1987/article/details/78464951

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下文件限制

[root@xxx abrt]# cat /proc/sys/fs/file-max
10240
[root@xxx abrt]# ulimit -n
65535

其中,

ulimit其实就是对单一程序的限制,进程级别的

file-max是所有进程最大的文件数

nr_open是单个进程可分配的最大文件数

所以,file-max过小

4.设置file-max

echo 655350 >  /proc/sys/fs/file-max



猜你喜欢

转载自blog.csdn.net/chenglian1987/article/details/78464951