每10秒启动Zabbix Agent失败



我使用的是centos 7。

我是如何检查日志的。

journalctl -xe

我从日志中得到的。(我每隔10秒就会看到相同的日志)

Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service holdoff time over, scheduling restart.
Oct 02 10:19:51 lp01.localdomain 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.
Oct 02 10:19:51 lp01.localdomain zabbix_agentd[8985]: zabbix_agentd [8987]: cannot open "/var/log/zabbix/zabbix_agentd.log": [13] Permission denied
Oct 02 10:19:51 lp01.localdomain systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start.
Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
Oct 02 10:19:51 lp01.localdomain 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.
Oct 02 10:19:51 lp01.localdomain systemd[1]: Unit zabbix-agent.service entered failed state.
Oct 02 10:19:51 lp01.localdomain systemd[1]: zabbix-agent.service failed.

所以我检查了"/var/log/zabbix/zabbix_agentd.log"文件第一次。

ll /var/log/zabbix/zabbix_agentd.log

但是显示没有这样的文件或目录

ls: cannot access /var/log/zabbix/zabbix_agentd.log: No such file or directory

然后我检查了"/run/zabbix/zabbix_agentd.pid"文件。

ll /run/zabbix/zabbix_agentd.pid

它还说没有这样的文件或目录。

ls: cannot access /run/zabbix/zabbix_agentd.pid: No such file or directory
You have new mail in /var/spool/mail/root

我检查了Selinux是否正在运行

getenforce

显示Selinux是Disabled.

我的问题是

  1. 如何启动zabbix?
  2. 如果我不能启动zabbix,我能阻止zabbix每10秒启动失败吗?

谢谢。

为目录添加权限-/var/log/zabbix/&/var/log/zabbix-agent/

chmod 707 /var/log/zabbix/
chmod 707 /var/log/zabbix-agent/

改变目录的所有者?

chown zabbix:zabbix /var/log/zabbix/
chown zabbix:zabbix /var/log/zabbix-agent/

然后,会停止服务zabbix吗?

systemctl stop zabbix-agent

最新更新