搜索得知是因为selinux开着,日志路径在cat /var/log/zabbix/zabbix_server.log
日志里搜error没显示,搜not显示无法启动服务,无法绑定socket,拒绝访问
cannot start preprocessing service: Cannot bind socket to "/var/run/zabbix/zabbix_server_preprocessing.sock": [13] Permission denied.
可以用setenforce 0解决,如果不想关闭selinux,需要创建并导入semodule
————下面是原blog————
问题四
Zabbix server is running No
Cannot bind socket to "/var/run/zabbix/zabbix_server_preprocessing.sock": [98] Address already in use.
cannot start alert manager service: Cannot bind socket to "/var/run/zabbix/zabbix_server_alerter.sock": [98] Address already in use.
原因及解决办法
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl start zabbix-server zabbix-agent httpd
再看控制面板已经改为了yes,但是关闭selinux并不是上策。
不关闭selinux解决方法
生成semodule
[root@localhost ~]# cat /var/log/audit/audit.log | grep zabbix_server | grep denied | audit2allow -M zabbix-server_setrlimit
******************** IMPORTANT ***********************
To make this policy package active, execute:
semodule -i zabbix-server_setrlimit.pp
导入semodule
[root@localhost ~]# semodule -i zabbix-server_setrlimit.pp
查看semodule
[root@localhost ~]# semodule -l
作者:我已不是少年郎
链接:https://www.jianshu.com/p/d866fc56fbc6
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。