Ad Widget

Collapse

Linux run script start zabbix agent hang

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stevenfoo
    Member
    • Mar 2008
    • 46

    #1

    Linux run script start zabbix agent hang

    Platform.
    OS: CentOS 7 (installed)
    Mysql: 5.6 (installed)
    PHP: 2.4.10 (installed)
    Zabbix: 2.4.3 (installed)

    We current setting up the run level script to start the zabbix agent automatically.

    service zabbix_agentd start

    ... will only prompt the following and then hang there

    Starting zabbix_agentd (via systemctl):

    We have to ctrl+c to exist the prompt.

    While query the process the zabbix agent is started.

    zabbix 5145 1 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd
    zabbix 5146 5145 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd: collector [idle 1 sec]
    zabbix 5147 5145 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd: listener #1 [waiting for connection]
    zabbix 5148 5145 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd: listener #2 [waiting for connection]
    zabbix 5149 5145 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd: listener #3 [waiting for connection]
    zabbix 5150 5145 0 11:59 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

    However if we issue: service mysql stop

    Stopping zabbix_agentd: [ OK ]

    ... nothing was stopped.

    We have to issue the manual command /etc/init.d/zabbix_agentd stop

    Did we miss something ? Manually starting/stopping using the /etc/init.d/zabbix_agentd works, however using service start/stop command does not work.

    Attached is the script of zabbix_agentd.

    Any help is appreciated.
    Attached Files
  • gzy
    Junior Member
    • Jan 2015
    • 3

    #2
    I edit a start script, it will unzip the install package, and then edit /etc/profile to add $zabbix_home/sbin into $PATH.
    After that, I can start zabbix using zabbix_agentd and using
    kill `cat /tmp/zabbix_agentd.pid` to stop zabbix

    Comment

    • coreychristian
      Senior Member
      Zabbix Certified Specialist
      • Jun 2012
      • 159

      #3
      Try changing your pid file location, I had a similar situation a while back.

      Check the startup script and the zabbix_agentd.conf.

      It should be '/var/run/zabbix/zabbix_agentd.pid' I believe.

      Comment

      Working...