大家好,又见面了,我是你们的朋友全栈君。
一开始按照这篇博客来配置zabbix
https://blog.csdn.net/rujianxuezha/article/details/79842998
启动zabbix时出现以下提示
[root@www ~]# systemctl start zabbix-server
Job for zabbix-server.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
按照提示运行systemctl status zabbix-server.service命令查看状态,发现是失败的
[root@www ~]# systemctl status zabbix-server.service
● zabbix-server.service - Zabbix Server
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: resources) since 四 2018-05-10 22:34:30 CST; 691ms ago
Process: 3915 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
5月 10 22:34:30 www.aa.com systemd[1]: zabbix-server.service never wrote its PID ...g.
5月 10 22:34:30 www.aa.com systemd[1]: Failed to start Zabbix Server.
5月 10 22:34:30 www.aa.com systemd[1]: Unit zabbix-server.service entered failed ...e.
5月 10 22:34:30 www.aa.com systemd[1]: zabbix-server.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
然后运行第二个提示的命令journalctl -xe,发现有点有效的提示
[root@www ~]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-server.service has failed.
--
-- The result is failed.
5月 10 22:35:13 www.aa.com systemd[1]: Unit zabbix-server.service entered failed state.
5月 10 22:35:13 www.aa.com systemd[1]: zabbix-server.service failed.
5月 10 22:35:13 www.aa.com polkitd[681]: Unregistered Authentication Agent for unix-pro
5月 10 22:35:16 www.aa.com dbus[694]: [system] Activating service name='org.fedoraproje
5月 10 22:35:16 www.aa.com dbus-daemon[694]: dbus[694]: [system] Activating service nam
5月 10 22:35:17 www.aa.com dbus[694]: [system] Successfully activated service 'org.fedo
5月 10 22:35:17 www.aa.com dbus-daemon[694]: dbus[694]: [system] Successfully activated
5月 10 22:35:17 www.aa.com setroubleshoot[3997]: SELinux is preventing zabbix_server fr
5月 10 22:35:17 www.aa.com python[3997]: SELinux is preventing zabbix_server from using
***** Plugin catchall (100. confidence) sugg
If you believe that zabbix_server should be a
Then you should report this as a bug.
You can generate a local policy module to all
Do
allow this access for now by executing:
# ausearch -c 'zabbix_server' --raw | audit2a
# semodule -i my-zabbixserver.pp
看到这个提示,果断运行注释掉的两个命令试试,结果运行第一个 ausearch -c ‘zabbix_server’ –raw | audit2a 并没有成功。
然后运行第二个命令semodule -i my-zabbixserver.pp 等待执行完毕后,再次启动,得到解决
[root@www ~]# semodule -i my-zabbixserver.pp
[root@www ~]# systemctl start zabbix-server
[root@www ~]# netstat -anpt | grep zabbix
[root@www ~]# netstat -anpt | grep 10051
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 4546/zabbix_server
tcp6 0 0 :::10051 :::* LISTEN 4546/zabbix_server
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/149818.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...