체라치에
체라치에

Reputation: 177

Failed to start Zabbix Agent for every 10 seconds

I am using centos 7.

How did I check the log.

journalctl -xe

What I got from the log.(I saw the same log every 10 seconds.)

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.

So I checked "/var/log/zabbix/zabbix_agentd.log" file first.

ll /var/log/zabbix/zabbix_agentd.log

But it said No such file or directory.

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

and then I checked "/run/zabbix/zabbix_agentd.pid" file.

ll /run/zabbix/zabbix_agentd.pid

It also said No such file or directory.

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

I checked if Selinux is running.

getenforce

and it said Selinux is Disabled..

My questions are

  1. How can I start zabbix?
  2. If I can't start zabbix, can I stop zabbix from starting-failing every 10 seconds?

Thank you.

Upvotes: 1

Views: 4232

Answers (1)

mine delos
mine delos

Reputation: 26

add permission to the directory - /var/log/zabbix/ & /var/log/zabbix-agent/

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

or

change owner of the directory?

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

And then, would stop service zabbix?

systemctl stop zabbix-agent

Upvotes: 1

Related Questions