[pgcluster: 816] レプリケーションサーバが起動しない
Nobuaki Inamura
inamuran36 @ mahikari.or.jp
2005年 9月 5日 (月) 16:06:14 JST
稲村と申します。お世話になります。
過去に同じ質問があったのですが、解決できなかったので新たに質問をさせていただきました。
よろしくお願いいたします。
まず、現在以下の環境で動作試験をしようとしています。
Debian3.1(Sarge)
PGCluster-1.1.1a
また、下記のページを参考にしつつ、1つのホストで3つのサーバを動かそうとしています。
http://pgcluster.projects.postgresql.org/jp/1_1/pgrp_conf.html
http://pcweb.mycom.co.jp/column/yetanother/034/
コンパイル、インストール、設定ファイルの書き換えと一通りできたのでいざ動かして
外部から接続をすると、接続はできるのですが、なぜかエラーがでてきて、すべてがうまく動いていないようでした。
調べた結果、レプリケーションサーバーのプロセスがないことに気づきました。
で、オプションをつけて起動させてみるとつぎのようなメッセージが出てきました。
---------------------------------------------------
postgres @ prime:~$ pgreplicate -v -n -D /usr/local/pgsql/etc
ERROR:init_server_tbl():fopen failed: (No such file or directory)
ERROR:main():PGRset_Conf_Data error
ok. stop all child processes
---------------------------------------------------
上のエラーになっているところは過去のメーリングリストを参考にすると、普通に起動した場合は
DEBUG(init_server_tbl): /usr/local/pgreplicate.log open ok
DEBUG(init_server_tbl): PGR_Get_Conf_Data ok
となっていました。
LOGファイルは自分で作るものじゃないし、
PGRset_Get_conf_Dataについてはちょっと違う名前なのでなんともいえないのですが、
どちらにしろ何のファイルのことを言っているのかわからずに時間だけが過ぎている状態です。
原因と関係あるかもと思いまして一応pgreplicate.confを最後に貼り付けました。
どうかよろしくお願いいたします。
Nobuaki Inamura : inamuran36 @ mahikari.or.jp
-----------以下pgreplicate.conf--------------------------
#=============================================================
# PGReplicate configuration file
# for PGCluster-1.1.0a
#-------------------------------------------------------------
# file: pgreplicate.conf
#-------------------------------------------------------------
# This file controls:
# o which hosts & port are cluster server
# o which port use for replication request from cluster server
#=============================================================
#
#-------------------------------------------------------------
# A setup of Cluster DB(s)
#
# o Host_Name : The host name of Cluster DB.
# -- please write a host name by FQDN.
# -- do not write IP address.
# o Port : The connection port with postmaster.
# o Recovery_Port : The connection port at the time of
# a recovery sequence .
# o LifeCheck_Port : connection for life check process
#-------------------------------------------------------------
<Cluster_Server_Info>
<Host_Name> localhost.localdomain </Host_Name>
<Port> 5431 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> localhost.localdomain </Host_Name>
<Port> 5433 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
#<Cluster_Server_Info>
# <Host_Name> cluster3.postgres.jp </Host_Name>
# <Port> 5432 </Port>
# <Recovery_Port> 7101 </Recovery_Port>
# <LifeCheck_Port> 7201 </LifeCheck_Port>
#</Cluster_Server_Info>
#
#-------------------------------------------------------------
# A setup of Load Balance Server
#
# o Host_Name : The host name of a load balance server.
# -- please write a host name by FQDN.
# -- do not write IP address.
# o Recovery_Port : The connection port at the time of
# a recovery sequence .
# o LifeCheck_Port : connection for life check process
#-------------------------------------------------------------
<LoadBalance_Server_Info>
<Host_Name> localhost.localdomain </Host_Name>
<Recovery_Port> 6101 </Recovery_Port>
<LifeCheck_Port> 6201 </LifeCheck_Port>
</LoadBalance_Server_Info>
#
#------------------------------------------------------------
# A setup of the upper replication server for cascade connection.
#
# o Host_Name : The host name of Cluster DB.
# -- please write a host name by FQDN.
# -- do not write IP address.
# o Port : The connection port with postmaster.
# o Recovery_Port : The connection port at the time of
# a recovery sequence .
# o LifeCheck_Port : connection for life check process
#------------------------------------------------------------
#<Replicate_Server_Info>
# <Host_Name>localhost</Host_Name>
# <Port> 8001 </Port>
# <Recovery_Port> 8101 </Recovery_Port>
# <LifeCheck_Port> 8201 </LifeCheck_Port>
#</Replicate_Server_Info>
#
#-------------------------------------------------------------
# A setup of a replication server
#
# o Status_Log_File : logging file of cluster db's status
# o Error_Log_File : logging file of error and warning
# o Replicate_Port : connection for reprication
# o Recovery_Port : connection for recovery
# o LifeCheck_Port : connection for life check process
# o Response_mode : timing which returns a response
# normal -- return result of DB which received the query
# reliable -- return result after waiting for response of
# all Cluster DBs.
# o Use_Replication_Log : When this server hangs up without
# being replicated to the end,
# a remote server continues the
# replication using this log.
# yes -- use replication log
# no -- not use replication log
# o Reserved_Connections : The number of reserved connections
# from this replication server
# to each cluster dbs.
# (default is 1).
#-------------------------------------------------------------
<Status_Log_File> /tmp/1/pgreplicate.sts </Status_Log_File>
<Error_Log_File> /tmp/1/pgreplicate.log </Error_Log_File>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<LifeCheck_Port> 8201 </LifeCheck_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> no </Use_Replication_Log>
<Reserved_Connections> 1 </Reserved_Connections>
pgcluster メーリングリストの案内