报错信息
1369:20220513:131906.230 cannot initialize alert manager: Cannot bind socket to "/var/run/zabbix/zabbix_server_alerter.sock": [98] Address already in use.
原因
selinux的安全限制
解决
方法1
关闭selinux
临时
setenforce 0
永久
修改配置文件
方法二
不关闭selinux如何做呢?
1、安装selinux相关工具
yum install policycoreutils-python -y
2、执行命令
2.1 Server端
cat /var/log/audit/audit.log | grep zabbix_server | grep denied | audit2allow -M zabbix_server_setrlimit
2.2 Agent端
cat /var/log/audit/audit.log | grep zabbix_agentd | grep denied | audit2allow -M zabbix_agent_setrlimit
2.3 Proxy端
cat /var/log/audit/audit.log | grep zabbix_proxy | grep denied | audit2allow -M zabbix_proxy_setrlimit
命令执行完会在当前目录生成一个zabbix_server_setrlimit.pp或者zabbix_agent_setrlimit.pp文件
3、不同端执行对应的文件
semodule -i zabbix_server_setrlimit.pp
semodule -i zabbix_proxy_setrlimit.pp
semodule -i zabbix_agent_setrlimit.pp