1. 程式人生 > >zabbix-agent服務無法啟動故障處理

zabbix-agent服務無法啟動故障處理

disable 服務無法啟動 localhost touch star starting active system 狀態

20180627_15:31:07[root@localhost ~]# systemctl restart zabbix-agent #重啟Zabbix-agent服務。

[root@localhost ~]# 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.

[root@localhost ~]# 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文件。

[root@localhost ~]# cd /var/run/

[root@localhost run]# mkdir zabbix #創建zabbix目錄。

[root@localhost run]# cd zabbix/

[root@localhost zabbix]# touch zabbix_agentd.pid #創建PID文件。

[root@localhost run]# systemctl restart zabbix-agent #重啟Zabbix-agent服務。

[root@localhost 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.

[root@localhost run]# netstat -ant | grep 10050 #查看監聽端口,已經監聽了。

tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN


zabbix-agent服務無法啟動故障處理