home «前の日記(2006-08-02) 最新 次の日記(2006-08-07)»

いろいろ
Seize the day.

2004|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|07|09|10|

2006-08-03 [長年日記]

[comp] PostgreSQL が動かない時

久しぶりに PostgreSQL に query を投げてみたら…
psql: could not connect to server: Connection refused
        Is the server running on host hostname and accepting
        TCP/IP connections on port 5432?
…あれ?
# /etc/init.d/postgresql restart
PostgreSQL starting.
/usr/local/pgsql/bin/pg_ctl: kill: permission denied
waiting for postmaster to shut down................................................................ failed
pg_ctl: postmaster does not shut down
がーんん.
pg_ctl status -D で調べると postmaster は走ってると言うのだが,ps で見てもそんなプロセスは走ってない.
ぐぐると,以下のスレッド にそっくりな事例があった.
たぶんすでに postmaster がいないのでしょう。 ps で確認してみました? pg_ctl status って ${PGDATA}/postmaster.pid と ${PGDATA}/postmaster.opts を見てるだけみたいなので 正常終了せずに、ファイルが残っていただけなのではないでしょうか?
調べると,確かに ${PGDATA}/postmaster.pid が残っていて,日付が前回のサーバ障害と一致.PID ファイルだけが残っちゃったんだな.
というわけで,PID ファイルをリネームして postgresql restart したらおk.
このエントリーをはてなブックマークに追加 はてなブックマーク数 はてなブックマークコメント   このエントリーを livedoor クリップに追加 livedoor クリップ数 このエントリーを del.ici.ous に追加 このエントリーを buzzurl に追加 buzzurl クリップ数   (counting bookmarks for the date, the each section and the mirror)

お名前:
E-mail:
コメント:
[TrackBack URL: http://nao.s164.xrea.com/td/tb.rb/20060803]
[(注) スパム対策のため,言及リンクのないトラックバックは受け付けていません.]
本日のリンク元
検索

以下の広告はサーバによって自動的に挿入されています.


Copyright © 2004-2006, nao. All rights reserved.