zabbix-agent无法启动

重新安装zabbix-agent后发现zabbix-agent无法启动


[root@gt-jmdockerallinone log]# systemctl restart zabbix-agent.service
Job for zabbix-agent.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details.
[root@gt-jmdockerallinone log]# journalctl -xe
--
-- Unit zabbix-agent.service has failed.
--
-- The result is failed.
Jul 03 15:37:58 gt-jmdockerallinone systemd[1]: Unit zabbix-agent.service entered failed state.
Jul 03 15:37:58 gt-jmdockerallinone systemd[1]: zabbix-agent.service failed.
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: zabbix-agent.service holdoff time over, scheduling restart.
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: Stopped Zabbix Agent.
-- Subject: Unit zabbix-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has finished shutting down.
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: Starting Zabbix Agent...
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has begun starting up.
Jul 03 15:38:09 gt-jmdockerallinone zabbix_agentd[14250]: zabbix_agentd [14252]: cannot open "/var/log/zabbix/zabbix_agentd.log": [13] Permission denied
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start.
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
Jul 03 15:38:09 gt-jmdockerallinone systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has failed.
--
-- The result is failed.

查看日志发现是没有

[root@gt-jmdockerallinone log]# /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
[root@gt-jmdockerallinone log]# zabbix_agentd [15383]: cannot open "/var/log/zabbix/zabbix_agentd.log": [13] Permission denied

找到问题,是log目录和文件不存在

[root@gt-jmdockerallinone log]# mkdir /var/log/zabbix/
[root@gt-jmdockerallinone log]# touch /var/log/zabbix/zabbix_agentd.log
[root@gt-jmdockerallinone log]# chown zabbix.zabbix /var/log/zabbix/zabbix_agentd.log

 

你可能感兴趣的:(LINUX,zabbix运维)