zabbix-agent服务无法启动故障处理
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zabbix-agent服务无法启动故障处理相关的知识,希望对你有一定的参考价值。
20180627_15:31:07[[email protected] ~]# systemctl restart zabbix-agent #重启Zabbix-agent服务。
[[email protected] ~]# systemctl status zabbix-agent #查看服务状态。
● zabbix-agent.service - LSB: Start and stop Zabbix agent
Loaded: loaded (/etc/rc.d/init.d/zabbix-agent; bad; vendor preset: disabled)
Active: active (exited) since 三 2018-06-27 15:31:07 CST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 26022 ExecStop=/etc/rc.d/init.d/zabbix-agent stop (code=exited, status=0/SUCCESS)
Process: 26038 ExecStart=/etc/rc.d/init.d/zabbix-agent start (code=exited, status=0/SUCCESS)
6月 27 15:31:07 localhost systemd[1]: Starting LSB: Start and stop Zabbix agent...
6月 27 15:31:07 localhost zabbix-agent[26038]: Starting Zabbix agent: [ 确定 ]
6月 27 15:31:07 localhost systemd[1]: Started LSB: Start and stop Zabbix agent.
[[email protected] ~]# more /var/log/zabbix/zabbix_agentd.log #查看服务日志。
6478:20180627:142902.769 Got signal [signal:15(SIGTERM),sender_pid:3944,sender_uid:0,reason:0]. Exiting ...
6478:20180627:142902.773 Zabbix Agent stopped. Zabbix 3.0.15 (revision 78010).
zabbix_agentd [1274]: cannot create PID file [/var/run/zabbix/zabbix_agentd.pid]: [2] No such file or directory
zabbix_agentd [26050]: cannot create PID file [/var/run/zabbix/zabbix_agentd.pid]: [2] No such file or directory #缺少PID文件。
[[email protected] ~]# cd /var/run/
[[email protected] run]# mkdir zabbix #创建zabbix目录。
[[email protected] run]# cd zabbix/
[[email protected] zabbix]# touch zabbix_agentd.pid #创建PID文件。
[[email protected] run]# systemctl restart zabbix-agent #重启Zabbix-agent服务。
[[email protected] run]# systemctl status zabbix-agent #查看服务状态,服务已经起来了。
● zabbix-agent.service - LSB: Start and stop Zabbix agent
Loaded: loaded (/etc/rc.d/init.d/zabbix-agent; bad; vendor preset: disabled)
Active: active (running) since 三 2018-06-27 15:32:53 CST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 26254 ExecStop=/etc/rc.d/init.d/zabbix-agent stop (code=exited, status=0/SUCCESS)
Process: 26270 ExecStart=/etc/rc.d/init.d/zabbix-agent start (code=exited, status=0/SUCCESS)
Memory: 2.2M
CGroup: /system.slice/zabbix-agent.service
├─26282 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
├─26284 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
├─26285 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
├─26286 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
├─26287 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
└─26288 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
6月 27 15:32:53 localhost systemd[1]: Starting LSB: Start and stop Zabbix agent...
6月 27 15:32:53 localhost zabbix-agent[26270]: Starting Zabbix agent: [ 确定 ]
6月 27 15:32:53 localhost systemd[1]: Started LSB: Start and stop Zabbix agent.
[[email protected] run]# netstat -ant | grep 10050 #查看监听端口,已经监听了。
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN
以上是关于zabbix-agent服务无法启动故障处理的主要内容,如果未能解决你的问题,请参考以下文章