[Pgcluster-general] Load Ballancer problems

At.Mitani mitani at sraw.co.jp
Fri Mar 21 02:00:04 UTC 2008


Hi,

If you can connect to ClusterDB from outside (i.e. psql -h node1 -p 5432 -l), load balancer also can connect it.

When you can connect to Cluster DB through load balancer, the status might change to "start use" in pglb.sts.
When you can not connect to Cluster DB through load balancer, the status might change to "error" in pglb.sts

If nothing to change in pglb.sts, it means nothing to come to load balancer...

Please check the hostname and IP address in each servers and client PC.

Regards,

On Wed, 19 Mar 2008 17:48:54 -0400
Sean Brown <sbrown at eaglepress.com> wrote:

> 
> Well, at first I figured I must have sent the wrong postgresql.conf on
> since the nodes were answering and they must have been listening.
> However apperently somehow they were answering even with that setting
> commented out.
>  
>  I have uncommented listen_address and restarted postgresql on the
> nodes, however the load ballancer acts the same. Nothing logged and just
> this in the sts file:
>  
>  
>  Wed Mar 19 09:23:09 2008  port(5432) host:node1 initialize
>  Wed Mar 19 09:23:09 2008  port(5432) host:node2 initialize
>  
>  /usr/local/bin/pglb -D /etc/pg_cluster/ -nvl
>  2008-03-19 09:23:09 [7880]
> DEBUG:PGRset_status_on_cluster_tbl():host:node1 port:5432 max:200 use:0
> status1
>  2008-03-19 09:23:09 [7880]
> DEBUG:PGRset_status_on_cluster_tbl():host:node2 port:5432 max:200 use:0
> status1
>  2008-03-19 09:23:09 [7880] DEBUG:init_pglb():Child_Tbl size is[482400]
>  
>  The load ballancer system runs just the load ballancer, not a
> postgresql cluster.
> 
> On Wed, 2008-03-19 at 03:50 +0100, A. Mitani wrote:
> > Hi Sean,
> > 
> > According to your postgresql.conf, the "listen_addresses" tag is commented out.
> > Please remove '#' from the "listen_addresses" tag.
> > 
> > Regards,
> >  
> > ----- Original Message -----
> > From: "Sean Brown" <sbrown at eaglepress.com>
> > To: pgcluster-general at pgfoundry.org
> > Sent: 2008年3月18日 22時33分49秒 (GMT+0900) Asia/Tokyo
> > Subject: Re: [Pgcluster-general] Load Ballancer problems
> > 
> > Ok, here it is again since it has been a day and it hasn't shown up.
> > Hopefully the first one got lost and I haven't just posted twice.
> > 
> > Node1 cluster.conf:
> >  <Replicate_Server_Info>
> >          <Host_Name> node1 </Host_Name>
> >          <Port> 8001 </Port>
> >          <Recovery_Port> 8101 </Recovery_Port>
> >  </Replicate_Server_Info>
> >  <Replicate_Server_Info>
> >          <Host_Name> node2 </Host_Name>
> >          <Port> 8001 </Port>
> >          <Recovery_Port> 8101 </Recovery_Port>
> >  </Replicate_Server_Info>
> >  #-------------------------------------------------------------
> >  # set Cluster DB Server information
> >  #-------------------------------------------------------------
> >  <Host_Name> node1 </Host_Name>
> >  <Recovery_Port> 7001 </Recovery_Port>
> >  <Rsync_Path> /usr/bin/rsync </Rsync_Path>
> >  <Rsync_Option> ssh -2 </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>
> >  <Error_Log_File>/var/log/postgres/cluster_err.log</Error_Log_File>
> >  
> >  Node2 cluster.conf:
> >  <Replicate_Server_Info>
> >          <Host_Name> node1 </Host_Name>
> >          <Port> 8001 </Port>
> >          <Recovery_Port> 8101 </Recovery_Port>
> >  </Replicate_Server_Info>
> >  <Replicate_Server_Info>
> >          <Host_Name> node2 </Host_Name>
> >          <Port> 8001 </Port>
> >          <Recovery_Port> 8101 </Recovery_Port>
> >  </Replicate_Server_Info>
> >  #-------------------------------------------------------------
> >  # set Cluster DB Server information
> >  #-------------------------------------------------------------
> >  <Host_Name> node2 </Host_Name>
> >  <Recovery_Port> 7001 </Recovery_Port>
> >  <Rsync_Path> /usr/bin/rsync </Rsync_Path>
> >  <Rsync_Option> ssh -2 </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>
> >  <Error_Log_File>/var/log/postgres/cluster_err.log</Error_Log_File>
> >  
> >  pg_hba.conf and postgresql.conf are the same between each node, I'll
> > attach postgres.conf since it is much longer.
> >  
> >  pg_hba.conf:
> >  # "local" is for Unix domain socket connections only
> >  local   all         all                               trust
> >  # IPv4 local connections:
> >  host    all         all         127.0.0.1/32          trust
> >  # IPv6 local connections:
> >  host    all         all         ::1/128               trust
> >  #Trust for PGCluster
> >  host    all         all         192.168.0.0/24        trust
> >  host    all         postgres    10.10.0.47/32         trust
> >  
> >  host    all         all         10.10.0.0/16          md5
> > 
> > 
> > 
> > On Sat, 2008-03-15 at 10:24 +0900, mitani at sraw.co.jp wrote:
> > > Hi,
> > > 
> > > Could you show the setting of each cluster DB (i.e pg_hba.conf, postgresql.conf and cluster.conf).
> > > 
> > > Regards,
> > > 
> > > -- original message --
> > > From: Sean Brown<sbrown at eaglepress.com>
> > > To: <pgcluster-general at pgfoundry.org>
> > > Sent: Fri, 14 Mar 2008 16:25:24 -0400
> > > Subject: [Pgcluster-general] Load Ballancer problems
> > > 
> > > >I have a 2 node cluster DB up and running and replicating between each other. I am now trying to get the Load Ballancer set up. Nothing gets logged. I can log on to each of the postgres databases with psql from the load ballancer system.
> > > >
> > > >It doesn't seem to ever mark the back end as usable:
> > > >/usr/local/bin/pglb -D /etc/pg_cluster/ -nv
> > > >2008-03-14 16:14:04 [26988] DEBUG:PGRset_status_on_cluster_tbl():host:node1.domain.local port:5432 max:200 use:0 status1
> > > >2008-03-14 16:14:04 [26988] DEBUG:PGRset_status_on_cluster_tbl():host:node2.domain.local port:5432 max:200 use:0 status1
> > > >2008-03-14 16:14:04 [26988] DEBUG:init_pglb():Child_Tbl size is[482400]
> > > >
> > > >It just sits there after this.
> > > >
> > > >pglb.conf:
> > > ><Cluster_Server_Info>
> > > >        <Host_Name> node1.domain.local </Host_Name>
> > > >        <Port> 5432 </Port>
> > > >        <Max_Connect> 200 </Max_Connect>
> > > ></Cluster_Server_Info>
> > > >
> > > ><Cluster_Server_Info>
> > > >        <Host_Name> node2.domain.local </Host_Name>
> > > >        <Port> 5432 </Port>
> > > >        <Max_Connect> 200 </Max_Connect>
> > > ></Cluster_Server_Info>
> > > >
> > > >
> > > ><Host_Name> lb.domain.local </Host_Name>
> > > ><Recieve_Port> 5432 </Recieve_Port>
> > > ><Recovery_Port> 6101 </Recovery_Port>
> > > ><Use_Connection_Pooling> no </Use_Connection_Pooling>
> > > ><Max_Cluster_Num> 200 </Max_Cluster_Num>
> > > ><Life_Check_Timeout> 3s <Life_Check_Timeout>
> > > ><Life_Check_Interval> 20s <Life_Check_Interval>
> > > ><Log_File_Info>
> > > >        <File_Name> /var/log/postgres/pglb.log </File_Name>
> > > >        <File_Size> 10M </File_Size>
> > > >        <Rotate> 3 </Rotate>
> > > ></Log_File_Info>
> > > >
> > > >pglb.sts
> > > >Fri Mar 14 16:21:30 2008  port(5432) host:node1.domain.local initialize
> > > >Fri Mar 14 16:21:30 2008  port(5432) host:node2.domain.local initialize
> > > >
> > > >/etc/hosts
> > > >127.0.0.1       localhost.localdomain   localhost
> > > >
> > > >10.10.0.45      node1.domain.local node1
> > > >10.10.0.46      node2.domain.local node2
> > > >
> > > >10.10.0.47      lb.domain.local lb
> > > >
> > > >_______________________________________________
> > > >Pgcluster-general mailing list
> > > >Pgcluster-general at pgfoundry.org
> > > >http://pgfoundry.org/mailman/listinfo/pgcluster-general
> > > >
> > > 
> > > _______________________________________________
> > > Pgcluster-general mailing list
> > > Pgcluster-general at pgfoundry.org
> > > http://pgfoundry.org/mailman/listinfo/pgcluster-general
> > 
> > _______________________________________________
> > Pgcluster-general mailing list
> > Pgcluster-general at pgfoundry.org
> > http://pgfoundry.org/mailman/listinfo/pgcluster-general
> 
> _______________________________________________
> Pgcluster-general mailing list
> Pgcluster-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgcluster-general


-- 
At.Mitani <mitani at sraw.co.jp>


More information about the Pgcluster-general mailing list