Hi all, I wish someone can help me to solve a problem.

I tried with VMs with CentOS 5.3 and Ubuntu 9.04 both with 32bit and 64bit and got the same problem. I installed PGcluster to have 6 VMs with 3 cluster, 2 replicator and a load balancer, following this schema
http://pgcluster.projects.postgresql.org/1_3/configuration.html

When i try to connect with, example, PGadmin, i have a PGRreplication error. In the console I see ERROR: PGRreplication failed on each cluster I try to connect to, but no errors in replicators, either if I see debug-verbose mode. If I try to create a database, error is that query is not permitted with all replicators down.
Maybe I have some problem with rsync, but for restoring I'll use pg_dump.
/etc/hosts file is correct on each machine.
Once this worked, only when I put 2 cluster and 2 replicator, running a cluster and a replicator together in the same VM. But I had problem with loadbalacer, since i want to connect to LB and LB will provide to control which cluster should work. Or else I'm not understanding the job of LB and, please, explain this to me.

Following config files:

Cluster 1 (PGNODE1)
#pg_hba.conf
local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust
host    all        all        192.168.1.0/24          trust

#postgresql.conf
listen_addresses = '*'
port = 5432                # (change requires restart)
max_connections = 100            # (change requires restart)
shared_buffers = 32MB            # min 128kB or max_connections*16kB
max_fsm_pages = 204800            # min max_fsm_relations*16, 6 bytes each
datestyle = 'iso, dmy'
lc_messages = 'it_IT.UTF-8' # locale for system error message strings
lc_monetary = 'it_IT.UTF-8'            # locale for monetary formatting
lc_numeric = 'it_IT.UTF-8'            # locale for number formatting
lc_time = 'it_IT.UTF-8'                # locale for time formatting
default_text_search_config = 'pg_catalog.italian'

#cluster.conf
<Replicate_Server_Info>
   <Host_Name>         PGREP1                </Host_Name>
   <Port>             8001                </Port>
   <Recovery_Port>     8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
   <Host_Name>        PGREP2                </Host_Name>
   <Port>            8001                </Port>
   <Recovery_Port>        8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Host_Name>            PGNODE1                </Host_Name>
<Recovery_Port>            7101                </Recovery_Port>
<LifeCheck_Port>        7201                </LifeCheck_Port>
<Rsync_Path>            /usr/bin/rsync            </Rsync_Path>
<Rsync_Option>            ssh -1                </Rsync_Option>
<Rsync_Compress>        yes                </Rsync_Compress>
<Pg_Dump_Path>            /usr/local/pgsql/bin/pg_dump    </Pg_Dump_Path>
<When_Stand_Alone>        read_only            </When_Stand_Alone>
<Replication_Timeout>        1min                </Replication_Timeout>
<LifeCheck_Timeout>        3s                </LifeCheck_Timeout>
<LifeCheck_Interval>        11s                </LifeCheck_Interval>

Cluster 2 (PGNODE2)
#pg_hba.conf
local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust
host    all        all        192.168.1.0/24          trust

#postgresql.conf
listen_addresses = '*'
port = 5432                # (change requires restart)
max_connections = 100            # (change requires restart)
shared_buffers = 32MB            # min 128kB or max_connections*16kB
max_fsm_pages = 204800            # min max_fsm_relations*16, 6 bytes each
datestyle = 'iso, dmy'
lc_messages = 'it_IT.UTF-8' # locale for system error message strings
lc_monetary = 'it_IT.UTF-8'            # locale for monetary formatting
lc_numeric = 'it_IT.UTF-8'            # locale for number formatting
lc_time = 'it_IT.UTF-8'                # locale for time formatting
default_text_search_config = 'pg_catalog.italian'

#cluster.conf
<Replicate_Server_Info>
   <Host_Name>         PGREP1                </Host_Name>
   <Port>             8001                </Port>
   <Recovery_Port>     8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
   <Host_Name>        PGREP2                </Host_Name>
   <Port>            8001                </Port>
   <Recovery_Port>        8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Host_Name>            PGNODE2                </Host_Name>
<Recovery_Port>            7101                </Recovery_Port>
<LifeCheck_Port>        7201                </LifeCheck_Port>
<Rsync_Path>            /usr/bin/rsync            </Rsync_Path>
<Rsync_Option>            ssh -1                </Rsync_Option>
<Rsync_Compress>        yes                </Rsync_Compress>
<Pg_Dump_Path>            /usr/local/pgsql/bin/pg_dump    </Pg_Dump_Path>
<When_Stand_Alone>        read_only            </When_Stand_Alone>
<Replication_Timeout>        1min                </Replication_Timeout>
<LifeCheck_Timeout>        3s                </LifeCheck_Timeout>
<LifeCheck_Interval>        11s                </LifeCheck_Interval>

Cluster 3 (PGNODE3)
#pg_hba.conf
local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust
host    all        all        192.168.1.0/24          trust

#postgresql.conf
listen_addresses = '*'
port = 5432                # (change requires restart)
max_connections = 100            # (change requires restart)
shared_buffers = 32MB            # min 128kB or max_connections*16kB
max_fsm_pages = 204800            # min max_fsm_relations*16, 6 bytes each
datestyle = 'iso, dmy'
lc_messages = 'it_IT.UTF-8' # locale for system error message strings
lc_monetary = 'it_IT.UTF-8'            # locale for monetary formatting
lc_numeric = 'it_IT.UTF-8'            # locale for number formatting
lc_time = 'it_IT.UTF-8'                # locale for time formatting
default_text_search_config = 'pg_catalog.italian'

#cluster.conf
<Replicate_Server_Info>
   <Host_Name>         PGREP1                </Host_Name>
   <Port>             8001                </Port>
   <Recovery_Port>     8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
   <Host_Name>        PGREP2                </Host_Name>
   <Port>            8001                </Port>
   <Recovery_Port>        8101                </Recovery_Port>
   <LifeCheck_Port>    8201                </LifeCheck_Port>
</Replicate_Server_Info>
<Host_Name>            PGNODE3                </Host_Name>
<Recovery_Port>            7101                </Recovery_Port>
<LifeCheck_Port>        7201                </LifeCheck_Port>
<Rsync_Path>            /usr/bin/rsync            </Rsync_Path>
<Rsync_Option>            ssh -1                </Rsync_Option>
<Rsync_Compress>        yes                </Rsync_Compress>
<Pg_Dump_Path>            /usr/local/pgsql/bin/pg_dump    </Pg_Dump_Path>
<When_Stand_Alone>        read_only            </When_Stand_Alone>
<Replication_Timeout>        1min                </Replication_Timeout>
<LifeCheck_Timeout>        3s                </LifeCheck_Timeout>
<LifeCheck_Interval>        11s                </LifeCheck_Interval>

Replicator 1 (PGREP1)
#pgreplicate.conf
<Cluster_Server_Info>
       <Host_Name>        PGNODE1                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>         PGNODE2                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>        PGNODE3                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<LoadBalance_Server_Info>
   <Host_Name>        PGBAL1                </Host_Name>
   <Recovery_Port>        6101                </Recovery_Port>
   <LifeCheck_Port>    6201                </LifeCheck_Port>
</LoadBalance_Server_Info>
<Host_Name>            PGREP1            </Host_Name>
<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>
<Replication_Timeout>        1min            </Replication_Timeout>
<LifeCheck_Timeout>        3s            </LifeCheck_Timeout>
<LifeCheck_Interval>        15s            </LifeCheck_Interval>
<Log_File_Info>
   <File_Name>        /tmp/pgreplicate.log    </File_Name>
   <File_Size>        1M            </File_Size>
   <Rotate>        3            </Rotate>
</Log_File_Info>

Replicator 2 (PGREP2)
#pgreplicate.conf
<Cluster_Server_Info>
       <Host_Name>        PGNODE1                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>         PGNODE2                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>        PGNODE3                </Host_Name>
       <Port>            5432                </Port>
       <Recovery_Port>        7101                </Recovery_Port>
   <LifeCheck_Port>    7201                </LifeCheck_Port>
</Cluster_Server_Info>
<LoadBalance_Server_Info>
   <Host_Name>        PGBAL1                </Host_Name>
   <Recovery_Port>        6101                </Recovery_Port>
   <LifeCheck_Port>    6201                </LifeCheck_Port>
</LoadBalance_Server_Info>
<Host_Name>            PGREP2            </Host_Name>
<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>
<Replication_Timeout>        1min            </Replication_Timeout>
<LifeCheck_Timeout>        3s            </LifeCheck_Timeout>
<LifeCheck_Interval>        15s            </LifeCheck_Interval>
<Log_File_Info>
   <File_Name>        /tmp/pgreplicate.log    </File_Name>
   <File_Size>        1M            </File_Size>
   <Rotate>        3            </Rotate>
</Log_File_Info>

Load Balancer (PGBAL1)
#pglb.conf
<Cluster_Server_Info>
       <Host_Name>        PGNODE1            </Host_Name>
       <Port>            5432            </Port>
       <Max_Connect>        32            </Max_Connect>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>         PGNODE2            </Host_Name>
       <Port>            5432            </Port>
       <Max_Connect>        32            </Max_Connect>
</Cluster_Server_Info>
<Cluster_Server_Info>
       <Host_Name>        PGNODE3            </Host_Name>
       <Port>            5432            </Port>
       <Max_Connect>        32            </Max_Connect>
</Cluster_Server_Info>
<Host_Name>            PGBAL1             </Host_Name>
<Backend_Socket_Dir>        /tmp            </Backend_Socket_Dir>
<Receive_Port>            5432            </Receive_Port>
<Recovery_Port>            6101            </Recovery_Port>
<LifeCheck_Port>        6201            </LifeCheck_Port>
<Max_Cluster_Num>        128            </Max_Cluster_Num>
<Use_Connection_Pooling>     no            </Use_Connection_Pooling>
<LifeCheck_Timeout>        3s            </LifeCheck_Timeout>
<LifeCheck_Interval>        15s            </LifeCheck_Interval>
<Log_File_Info>
   <File_Name>        /tmp/pglb.log    </File_Name>
   <File_Size>        1M        </File_Size>
   <Rotate>        3        </Rotate>
</Log_File_Info>


Thanks in advice.

--
Mario Biagioni

begin:vcard
fn:Mario Biagioni
n:Biagioni;Mario
adr:;;via Ginna Marcelli, 7;Sansepolcro;AR;52037;Italia
email;internet:[email protected]
version:2.1
end:vcard

_______________________________________________
Pgcluster-general mailing list
[email protected]
http://pgfoundry.org/mailman/listinfo/pgcluster-general

Reply via email to