有一天我重起了一次服务器,后来发现客户的zabbix agent就无法启动了,报如下错误
zabbix_agentd [28973]: cannot create PID file [/var/run/zabbix/zabbix_agentd.pid]: [2] No such file or directory
Fresh install of zabbix22-agent fails to start because the agent cannot create its PID file.
$ sudo systemctl start zabbix-agent
$ cat /var/log/zabbix/zabbix_agentd.log
zabbix_agentd [2625]: cannot create PID file [/var/run/zabbix/zabbix_agentd.pid]: [2] No such file or directory
解决办法:
新建一个zabbix目录
$ sudo mkdir /var/run/zabbix
授权用户使用
$ sudo chown root:zabbix /var/run/zabbix
授权
$ sudo chmod 0775 /var/run/zabbix
我也搞不明这句话什么意思= =!
$ sudo chcon -u system_u -t zabbix_var_run_t /var/run/zabbix