In some occasions after installing Zabbix server, the following message gets displayed at the home screen:

Zabbix server is not running: the information displayed may not be currentwKioL1NaEqOhKm0AAABbAIjIN1A223.jpg


This issue is related to the Linux Security Module (SELinux) which is a mandatory access control (MAC) security mechanism implemented in the kernel.

To clear the alert, follow the steps outlined below:

- First confirm that SELinux is causing this by running the following command from within Linux console:

tail -f /var/log/audit/audit.log |grep -i avc

- You should see the following lines:

type=AVC msg=audit(1383850274.731:32113): avc:  denied  { name_connect } for  pid=2060 comm=”httpd” dest=10051 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket

The best and recommended option to fixing this is to add a policy to allow the connection

- Run the command “getsebool -a“. Locate the following line which should give you a value ‘–> off

httpd_can_network_connect --> off

- Run the command to turn it on

setsebool httpd_can_network_connect on

- Now run the command “getsebool httpd_can_network_connect“. The result should now indicate that the policy is now set to ON

setsebool -P httpd_can_network_connect on

Now the Zabbix alert message should disappear and also the “Zabbix server is running” value should now show ‘Yes

wKiom1NaEsyDSsOWAAGwhZOYHjE182.jpg

做完以上配置后,重启HTTPD服务后测试,如果仍不可发送SMTP,追加setsebool -P httpd_can_sendmail=1命令,然后重启HTTPD服务后即可。


Assuming that agent dropped connection because of access permission

zabbix_agent.conf 和 zabbix_agentd.conf 原来不一样啊。。。。。
妹的,配了半天,原来是配置文件搞错了。。

  重新配置ZABBIX_AGENTD.conf  将 server 配置有客户端IP  172.16.1.13

UnsafeUserParameters=1

Hostname=172.16.1.13

等配置好后  正常

       centos7 Zabbix Server is not running: the information displayed may not be current 

出现这问题 首先想到的是selinux  照上面依旧没反应于是只能重新审视问题了

1.netstat -tnulp 查看zabbix server 是否启动。发现没有启动

2.于是启动zabbix_server  service zabbix_server 看似也没有任何问题。

于是进到 /usr/local/zabbix/sbin  重新  执行 ./zabbix_server --help  重新添加一下服务

/usr/local/zabbix/sbin 目录下执行  ./ zabbix_server -c /usr/local/zabbix/etc/zabbix_server.conf

再来看端口  发现启动了。