DB再起動によるプロセスのコネクション自動接続について
お世話になっております。
Zabbixサーバが起動している状態で、バックエンドのDB(PostgreSQL)を再起動した場合のZabbixサーバプロセスの挙動として、自動的に再接続するのでしょうか?
以下のコマンドを実行して5432ポートに接続しているプロセスを確認してみたところ、DB再起動後のプロセスとして「CLOSE_WAIT」と「ESTABLISHED」が混在しているように見えました。
何かご存知でしたら教えてください。
■環境
-------------------------------
CentOS 5.5
Zabbix 1.8.5
PostgreSQL 8.1.21
-------------------------------
■起動プロセス(ログ抜粋)
5808:20110518:131027.077 server #1 started [configuration syncer]
5811:20110518:131027.133 server #3 started [poller]
5810:20110518:131027.189 server #2 started [poller]
5821:20110518:131027.202 server #8 started [timer]
5812:20110518:131027.207 server #4 started [poller]
5813:20110518:131027.245 server #5 started [poller]
5814:20110518:131027.285 server #6 started [poller]
5815:20110518:131027.328 server #7 started [alerter]
5828:20110518:131027.353 server #9 started [history syncer]
5830:20110518:131027.366 server #10 started [escalator]
5832:20110518:131027.381 server #11 started [proxy poller]
5833:20110518:131027.385 server #12 started [self-monitoring]
5804:20110518:131027.386 server #0 started [db watchdog]
■起動直後の状態
# lsof -i:5432 | grep zabbix
zabbix_se 5808 zabbix 4u IPv4 264655 TCP (PostgreSQLサーバ):41996->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5810 zabbix 4r IPv4 264810 TCP (PostgreSQLサーバ):41998->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5811 zabbix 4u IPv4 264658 TCP (PostgreSQLサーバ):41997->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5812 zabbix 4r IPv4 264814 TCP (PostgreSQLサーバ):42000->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5813 zabbix 4u IPv4 264816 TCP (PostgreSQLサーバ):42001->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5814 zabbix 4u IPv4 264819 TCP (PostgreSQLサーバ):42002->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5815 zabbix 4u IPv4 264931 TCP (PostgreSQLサーバ):42003->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5821 zabbix 4u IPv4 264812 TCP (PostgreSQLサーバ):41999->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5828 zabbix 4u IPv4 264933 TCP (PostgreSQLサーバ):42004->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5830 zabbix 4u IPv4 264935 TCP (PostgreSQLサーバ):42005->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5832 zabbix 4u IPv4 264937 TCP (PostgreSQLサーバ):42006->(PostgreSQLサーバ):postgres (ESTABLISHED)
■再起動後の状態
# lsof -i:5432 | grep zabbix
zabbix_se 5808 zabbix 47u IPv4 362630 TCP (PostgreSQLサーバ):39452->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5810 zabbix 4r IPv4 264810 TCP (PostgreSQLサーバ):41998->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
zabbix_se 5811 zabbix 4u IPv4 363558 TCP (PostgreSQLサーバ):35309->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5812 zabbix 4r IPv4 264814 TCP (PostgreSQLサーバ):42000->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
zabbix_se 5813 zabbix 4u IPv4 264816 TCP (PostgreSQLサーバ):42001->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
zabbix_se 5814 zabbix 4u IPv4 264819 TCP (PostgreSQLサーバ):42002->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
zabbix_se 5815 zabbix 50u IPv4 362632 TCP (PostgreSQLサーバ):39453->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5821 zabbix 50u IPv4 362635 TCP (PostgreSQLサーバ):39454->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5828 zabbix 4u IPv4 264933 TCP (PostgreSQLサーバ):42004->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
zabbix_se 5830 zabbix 51u IPv4 362626 TCP (PostgreSQLサーバ):39451->(PostgreSQLサーバ):postgres (ESTABLISHED)
zabbix_se 5832 zabbix 4u IPv4 264937 TCP (PostgreSQLサーバ):42006->(PostgreSQLサーバ):postgres (CLOSE_WAIT)
TNK - 投稿数: 4755
自動的に再接続します。
ただし、接続できない時間が長すぎるとDBに接続できないと判断し
て、zabbix_serverプロセスが終了する場合があります。
CLOSE_WAITになっているのは、恐らくまだ一度DBサーバが停止され
てTCPのコネクションが切れたことをプロセスが検知しておらず、
TCPのコネクションが正常にクローズできていないままのものであ
ると思われます。
もうしばらく放置してから状態を再確認してみて下さい。