zabbix通过yum安装,启动报错zabbix-agent.service never wrote its PID file. Failing.

在cenots7安装zabbix,选择好需要的版本,根据手册执行:
zabbix官网安装说明
在这里插入图片描述
查看状态:

[root@localhost ~]# systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: resources) since 六 2021-05-08 10:20:40 CST; 6s ago
  Process: 35969 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)

508 10:20:40 localhost.localdomain systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
508 10:20:40 localhost.localdomain systemd[1]: Failed to start Zabbix Agent.
508 10:20:40 localhost.localdomain systemd[1]: Unit zabbix-agent.service entered failed state.
508 10:20:40 localhost.localdomain systemd[1]: zabbix-agent.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

解决办法,执行以下命令:

[root@localhost ~]# getenforce 
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce 
Permissive

执行完毕后,再次查看状态:

[root@localhost ~]# systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled)
   Active: active (running) since 六 2021-05-08 10:23:14 CST; 7s ago
  Process: 38354 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 38356 (zabbix_agentd)
   CGroup: /system.slice/zabbix-agent.service
           ├─38356 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值