zabbix-agent服务无法启动故障处理

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  


猜你喜欢

转载自blog.51cto.com/4270119/2133283