PDA

View Full Version : problem restarting agents with suse init script


mconigliaro
10-06-2005, 19:33
ive noticed that im unable to restart an agent with the included suse init script. for some reason, zabbix_agentd is unable to bind to port 10050 right away, but if i wait a 30 seconds or so, the agent is able to start up again. is anyone else seeing behavior like this?


db1:/etc/init.d # /etc/init.d/zabbix_agentd restart
Shutting down zabbix_agentd done
Starting zabbix_agentd failed
db1:/etc/init.d # tail -3 /tmp/zabbix_agentd.log
023707:20050610:132531 Got signal. Exiting ...
024038:20050610:132531 zabbix_agentd started
024038:20050610:132531 Cannot bind to port 10050. Another zabbix_agentd already running ?
db1:/etc/init.d # ps -ef | grep zabbix_agentd
root 24042 14857 0 13:26 pts/0 00:00:00 grep zabbix_agentd
db1:/etc/init.d # rm /var/tmp/zabbix_agentd.pid
db1:/etc/init.d # /etc/init.d/zabbix_agentd restart
Shutting down zabbix_agentd- Warning: zabbix_agentd not running! done
Starting zabbix_agentd done
db1:/etc/init.d # ps -ef | grep zabbix_agentd
zabbix 24079 1 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
zabbix 24080 24079 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
zabbix 24081 24079 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
zabbix 24082 24079 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
zabbix 24083 24079 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
zabbix 24084 24079 0 13:28 ? 00:00:00 /opt/zabbix/bin/zabbix_agentd
root 24088 14857 0 13:28 pts/0 00:00:00 grep zabbix_agentd

cadbury
16-06-2005, 15:13
sure, you have to wait for the pending connections to be terminated, even if the process is stopped.

see this :
http://www.zabbix.com/forum/showthread.php?t=859

maybe it can help you, it's for Gentoo linux, but maybe you can adapt it