[pgcluster: 732] Re: リカバリーに失敗する
山本 翔
yamamoto_90jp @ yahoo.co.jp
2005年 3月 12日 (土) 18:37:50 JST
はじめまして、三谷さん、さっそくのご返答ありがとうござい
ます。
>> LOG: could not bind IPv4 socket: Address already in
use
>> HINT: Is another postmaster already running on port
5432?
>これは既に別のpostmasterが動いていると言っていますが、5432
ポートをbind出来な
>かった場合にこのエラーメッセージが出ますので、必ずしも
他のpostmasterとは限り
>ません。
>netstatコマンドで5432ポートを使っているものが無いか,確
認してみてください。
さっそく確認しましたが、最初の起動時には 5432 ポートを使
っているものは
ありませんでした。しかし、最終的には、5432 ポートを開い
ていることになっていますが、
/tmp/.PGSQL.5432 ファイルが存在していなく、postmaster が
途中で停止状態にある
のではないかと思っております。
また、最終的に、rsync のコマンドプロセスが終了した時点で
、プロセスの状態が以下の
とおりです。
具体的に、どの時点で ポートが bind できないのか分かりま
せん。
ご教授をお願いいたします。
2446 ttyp1 postgres 5852 S postgres: stats buffer
process
2447 ttyp1 postgres 4900 S postgres: stats
collector process
2449 ttyp1 postgres 15052 S
/usr/local/pgsql/bin/postmaster -R -D
/usr/local/pgsql/data
2450 ttyp1 postgres 15052 S
/usr/local/pgsql/bin/postmaster -R -D
/usr/local/pgsql/data
以上、よろしくお願いします。
----(netstat コマンド結果)----(netstat
コマンド結果)----(netstat
コマンド結果)
clusterdb2$ /usr/local/pgsql/bin/pg_ctl start -o "-R" -D
/usr/local/pgsql/data
Start in recovery mode!
Please wait until a data synchronization finishes from
Master DB...
postmaster successfully started
clusterdb2:$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign
Address State
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:*
LISTEN
tcp 0 0 clusterdb2:1185 replicate1:8101
ESTABLISHED
tcp 0 0 clusterdb2:1183 replicate1:8001
ESTABLISHED
tcp 0 0 clusterdb2:1184 replicate2:8001
ESTABLISHED
tcp 0 0 clusterdb2:23 monitor:32769
ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
Path
unix 2 [ ] DGRAM 13216
/dev/log
unix 2 [ ] DGRAM 4687
1st recovery step of [global] directory...OK
1st recovery step of [base] directory...OK
1st recovery step of [pg_clog] directory...OK
1st recovery step of [pg_xlog] directory...OK
clusterdb2:/msdos/wwwroot$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign
Address State
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:*
LISTEN
tcp 0 0 clusterdb2:1185
192.168.1.64:8101 ESTABLISHED
tcp 0 140 clusterdb2:1187 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1186 clusterdb1:22
TIME_WAIT
tcp 0 0 clusterdb2:1189 clusterdb1:22
ESTABLISHED
tcp 0 148 clusterdb2:1188 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1183
replicate1:8001 ESTABLISHED
tcp 0 0 clusterdb2:1184
replicate2:8001 ESTABLISHED
tcp 0 82 clusterdb2:23 monitor:32769
ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
Path
unix 2 [ ] DGRAM 13216
/dev/log
unix 3 [ ] STREAM CONNECTED 17709
unix 3 [ ] STREAM CONNECTED 17708
unix 3 [ ] STREAM CONNECTED 17688
unix 3 [ ] STREAM CONNECTED 17687
unix 3 [ ] STREAM CONNECTED 17686
unix 3 [ ] STREAM CONNECTED 17685
unix 3 [ ] STREAM CONNECTED 17684
unix 3 [ ] STREAM CONNECTED 17683
unix 3 [ ] STREAM CONNECTED 17682
unix 3 [ ] STREAM CONNECTED 17681
unix 3 [ ] STREAM CONNECTED 17679
unix 3 [ ] STREAM CONNECTED 17678
unix 3 [ ] STREAM CONNECTED 17677
unix 3 [ ] STREAM CONNECTED 17676
unix 2 [ ] DGRAM 4687
2nd recovery step of [global] directory...OK
2nd recovery step of [base] directory...OK
2nd recovery step of [pg_clog] directory...OK
2nd recovery step of [pg_xlog] directory...OK
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432?
If not, wait a few seconds and retry.
LOG: database system was interrupted at 2005-03-12
17:33:27 JST
LOG: could not open file
"/usr/local/pgsql/data/pg_xlog/0000000000000001" (log file
0, segment 1): No such file or directory
LOG: invalid primary checkpoint record
LOG: could not open file
"/usr/local/pgsql/data/pg_xlog/0000000000000001" (log file
0, segment 1): No such file or directory
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
LOG: startup process (PID 2448) was terminated by signal
6
LOG: aborting startup due to startup process failure
rename "/usr/local/pgsql/data/base/1/.16614.ltszuO" ->
"base/1/16614": No such file or directory
clusterdb2:$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign
Address State
tcp 0 0 0.0.0.0:7201 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:7101 0.0.0.0:*
LISTEN
tcp 0 0 clusterdb2:1194 replicate1:8101
TIME_WAIT
tcp 1 0 clusterdb2:1185 replicate1:8101
CLOSE_WAIT
tcp 0 0 clusterdb2:1187 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1186 clusterdb1:22
TIME_WAIT
tcp 0 0 clusterdb2:1191 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1190 clusterdb1:22
TIME_WAIT
tcp 0 0 clusterdb2:1189 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1188 clusterdb1:22
TIME_WAIT
tcp 0 0 clusterdb2:1193 clusterdb1:22
TIME_WAIT
tcp 0 0 clusterdb2:1192 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1183 replicate1:8001
ESTABLISHED
tcp 0 0 clusterdb2:1184 replicate2:8001
ESTABLISHED
tcp 0 82 clusterdb2:23 monitor:32769
ESTABLISHED
udp 0 0 127.0.0.1:1034 127.0.0.1:1034
ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
Path
unix 2 [ ACC ] STREAM LISTENING 17825
/tmp/.s.PGSQL.5432
unix 2 [ ] DGRAM 13216
/dev/log
unix 3 [ ] STREAM CONNECTED 17865
unix 3 [ ] STREAM CONNECTED 17864
unix 3 [ ] STREAM CONNECTED 17852
unix 3 [ ] STREAM CONNECTED 17851
unix 3 [ ] STREAM CONNECTED 17811
unix 3 [ ] STREAM CONNECTED 17810
unix 3 [ ] STREAM CONNECTED 17809
unix 3 [ ] STREAM CONNECTED 17808
unix 3 [ ] STREAM CONNECTED 17792
unix 3 [ ] STREAM CONNECTED 17791
unix 3 [ ] STREAM CONNECTED 17790
unix 3 [ ] STREAM CONNECTED 17789
unix 3 [ ] STREAM CONNECTED 17719
unix 3 [ ] STREAM CONNECTED 17718
unix 3 [ ] STREAM CONNECTED 17709
unix 3 [ ] STREAM CONNECTED 17708
unix 3 [ ] STREAM CONNECTED 17688
unix 3 [ ] STREAM CONNECTED 17687
unix 3 [ ] STREAM CONNECTED 17686
unix 3 [ ] STREAM CONNECTED 17685
unix 3 [ ] STREAM CONNECTED 17679
unix 3 [ ] STREAM CONNECTED 17678
unix 3 [ ] STREAM CONNECTED 17677
unix 3 [ ] STREAM CONNECTED 17676
unix 2 [ ] DGRAM 4687
rename
"/usr/local/pgsql/data/pg_xlog/.0000000000000001.0L7Auc"
-> "pg_xlog/0000000000000001": No such file or directory
rsync error: some files could not be transferred (code 23)
at main.c(1048)
clusterdb2:$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign
Address State
tcp 0 0 0.0.0.0:7201 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:7101 0.0.0.0:*
LISTEN
tcp 1 0 clusterdb2:1185 replicate1:8101
CLOSE_WAIT
tcp 0 0 clusterdb2:1189 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1192 clusterdb1:22
ESTABLISHED
tcp 0 0 clusterdb2:1183 replicate1:8001
ESTABLISHED
tcp 0 0 clusterdb2:1184 replicate2:8001
ESTABLISHED
tcp 0 82 clusterdb2:23 monitor:32769
ESTABLISHED
udp 0 0 127.0.0.1:1034 127.0.0.1:1034
ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
Path
unix 2 [ ACC ] STREAM LISTENING 17825
/tmp/.s.PGSQL.5432
unix 2 [ ] DGRAM 13216
/dev/log
unix 3 [ ] STREAM CONNECTED 17865
unix 3 [ ] STREAM CONNECTED 17864
unix 3 [ ] STREAM CONNECTED 17811
unix 3 [ ] STREAM CONNECTED 17810
unix 3 [ ] STREAM CONNECTED 17809
unix 3 [ ] STREAM CONNECTED 17808
unix 3 [ ] STREAM CONNECTED 17709
unix 3 [ ] STREAM CONNECTED 17708
unix 3 [ ] STREAM CONNECTED 17688
unix 3 [ ] STREAM CONNECTED 17687
unix 3 [ ] STREAM CONNECTED 17686
unix 3 [ ] STREAM CONNECTED 17685
unix 2 [ ] DGRAM 4687
rsync error: some files could not be transferred (code 23)
at main.c(1048)
__________________________________
Let's Celebrate Together!
Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/so2005/
pgcluster メーリングリストの案内