Discussion:
[Pgcluster-general] Load balance problem
M. Rodrigo Monteiro
2011-01-24 18:46:32 UTC
Permalink
Hi!

I have this problem when starting lb:

2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg1 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg2 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133] DEBUG:init_pglb():Child_Tbl size is[33024]
ipc_fname[/usr/local/pgsql/share/pglb.ipc]
2011-01-24 15:39:47 [20133]
ERROR:load_balance_main():PGR_Create_Recv_Socket failed


My /usr/local/pgsql/share/pglb.conf

<Cluster_Server_Info>
<Host_Name> pg1 </Host_Name>
<Port> 5432 </Port>
<Max_Connect> 32 </Max_Connect>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> pg2 </Host_Name>
<Port> 5432 </Port>
<Max_Connect> 32 </Max_Connect>
</Cluster_Server_Info>

<Host_Name> pg1 </Host_Name>
<Backend_Socket_Dir> /tmp </Backend_Socket_Dir>
<Receive_Port> 5432 </Receive_Port>
<Recovery_Port> 6001 </Recovery_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>
<Connection_Life_Time> 0s </Connection_Life_Time>

<Log_File_Name> /tmp/pglb.log </Log_File_Name>
<Log_File_Size> 1M </Log_File_Size>
<Log_Rotate> 3 </Log_Rotate>


What's the problem?


Regards,
Rodrigo.
--
M. Rodrigo Monteiro

"Free as in Freedom, not free as in free beer"
"As we are liberated from our own fear, our presence automatically
liberates others"
Linux User # 403730

Pense antes de imprimir. Think before printing.

AVISO LEGAL
Esta mensagem ? destinada exclusivamente para a(s) pessoa(s) a quem ?
dirigida, podendo conter informa??o confidencial e/ou legalmente
privilegiada. Se voc? n?o for destinat?rio desta mensagem, desde j?
fica notificado de abster-se a divulgar, copiar, distribuir, examinar
ou, de qualquer forma, utilizar a informa??o contida nesta mensagem,
por ser ilegal. Caso voc? tenha recebido esta mensagem por engano,
pedimos que nos retorne este E-Mail, promovendo, desde logo, a
elimina??o do seu conte?do em sua base de dados, registros ou sistema
de controle. Fica desprovida de efic?cia e validade a mensagem que
contiver v?nculos obrigacionais, expedida por quem n?o detenha poderes
de representa??o.

LEGAL ADVICE
This message is exclusively destined for the people to whom it is
directed, and it can bear private and/or legally exceptional
information. If you are not addressee of this message, since now you
are advised to not release, copy, distribute, check or, otherwise, use
the information contained in this message, because it is illegal. If
you received this message by mistake, we ask you to return this email,
making possible, as soon as possible, the elimination of its contents
of your database, registrations or controls system. The message that
bears any mandatory links, issued by someone who has no representation
powers, shall be null or void.
Markus Schmidleitner
2011-01-26 10:29:40 UTC
Permalink
hi rodrigo!
what version do you use?
how does your /etc/hosts look like?

you use the same port for cluster-server pg1 and load-balancer.
use different ports for the cluster-servers (eg 5433) and try again.

regards,
markus
Post by M. Rodrigo Monteiro
Hi!
2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg1 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg2 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133] DEBUG:init_pglb():Child_Tbl size is[33024]
ipc_fname[/usr/local/pgsql/share/pglb.ipc]
2011-01-24 15:39:47 [20133]
ERROR:load_balance_main():PGR_Create_Recv_Socket failed
My /usr/local/pgsql/share/pglb.conf
<Cluster_Server_Info>
<Host_Name> pg1 </Host_Name>
<Port> 5432 </Port>
<Max_Connect> 32 </Max_Connect>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> pg2 </Host_Name>
<Port> 5432 </Port>
<Max_Connect> 32 </Max_Connect>
</Cluster_Server_Info>
<Host_Name> pg1 </Host_Name>
<Backend_Socket_Dir> /tmp </Backend_Socket_Dir>
<Receive_Port> 5432 </Receive_Port>
<Recovery_Port> 6001 </Recovery_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>
<Connection_Life_Time> 0s </Connection_Life_Time>
<Log_File_Name> /tmp/pglb.log </Log_File_Name>
<Log_File_Size> 1M </Log_File_Size>
<Log_Rotate> 3 </Log_Rotate>
What's the problem?
Regards,
Rodrigo.
M. Rodrigo Monteiro
2011-01-26 12:00:26 UTC
Permalink
Hi Markus,

I'm using pgcluster-1.9.0rc7.
Is there a good how to or documentation about the configuration?

What I want to do is this scenario:

2 machines. Both with Replicator, Cluster and Load Balance.

I don't be able to get this to work. When having more than 1
Replicator and Load Balance, the Cluster update (option -U) don't
work. It gets "unkown packet recieved".
The only configuration that worked for me is: 1 machine with the 3
services, and the other with only the Cluster.

Regards,
Rodrigo.

On Wed, Jan 26, 2011 at 07:29, Markus Schmidleitner
Post by Markus Schmidleitner
hi rodrigo!
what version do you use?
how does your /etc/hosts look like?
you use the same port for cluster-server pg1 and load-balancer.
use different ports for the cluster-servers (eg 5433) and try again.
regards,
markus
Post by M. Rodrigo Monteiro
Hi!
2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg1 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133]
DEBUG:PGRset_status_on_cluster_tbl():host:pg2 port:5432 max:32 use:0
status1
2011-01-24 15:39:47 [20133] DEBUG:init_pglb():Child_Tbl size is[33024]
ipc_fname[/usr/local/pgsql/share/pglb.ipc]
2011-01-24 15:39:47 [20133]
ERROR:load_balance_main():PGR_Create_Recv_Socket failed
My /usr/local/pgsql/share/pglb.conf
<Cluster_Server_Info>
? ? <Host_Name> ? ? ? ? pg1 ? ? </Host_Name>
? ? <Port> ? ? ? ? ? ? ? ? ? ? ?5432 ? ? ? ? ? ? ? ? ? ?</Port>
? ? <Max_Connect> ? ? ? ? ? ? ? 32 ? ? ? ? ? ? ? ? ? ? ?</Max_Connect>
</Cluster_Server_Info>
<Cluster_Server_Info>
? ? <Host_Name> ? ? ? ? ? ? ? ? pg2 ? ? </Host_Name>
? ? <Port> ? ? ? ? ? ? ? ? ? ? ?5432 ? ? ? ? ? ? ? ? ? ?</Port>
? ? <Max_Connect> ? ? ? ? ? ? ? 32 ? ? ? ? ? ? ? ? ? ? ?</Max_Connect>
</Cluster_Server_Info>
<Host_Name> ? ? ? ? ? ? ? ? ? ? pg1 ? ? </Host_Name>
<Backend_Socket_Dir> ? ? ? ? ? ?/tmp ? ? ? ? ? ?</Backend_Socket_Dir>
<Receive_Port> ? ? ? ? ? ? ? ? ? ? ? ? ?5432 ? ? ? ? ? ?</Receive_Port>
<Recovery_Port> ? ? ? ? ? ? ? ? ? ? ? ? 6001 ? ? ? ? ? ?</Recovery_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>
<Connection_Life_Time> ? ? ? ? ?0s ? ? ? ? ? ? ? ? ? ? ?</Connection_Life_Time>
<Log_File_Name> ? ? ? ? /tmp/pglb.log ? </Log_File_Name>
<Log_File_Size> ? ? ? ? ? ? ? ? 1M ? ? ? ? ? ? ? ? ? ? ?</Log_File_Size>
<Log_Rotate> ? ? ? ? ? ? ? ? ? ?3 ? ? ? ? ? ? ? ? ? ? ? </Log_Rotate>
What's the problem?
Regards,
Rodrigo.
_______________________________________________
Pgcluster-general mailing list
Pgcluster-general at pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pgcluster-general
--
M. Rodrigo Monteiro

"Free as in Freedom, not free as in free beer"
"As we are liberated from our own fear, our presence automatically
liberates others"
Linux User # 403730

Pense antes de imprimir. Think before printing.

AVISO LEGAL
Esta mensagem ? destinada exclusivamente para a(s) pessoa(s) a quem ?
dirigida, podendo conter informa??o confidencial e/ou legalmente
privilegiada. Se voc? n?o for destinat?rio desta mensagem, desde j?
fica notificado de abster-se a divulgar, copiar, distribuir, examinar
ou, de qualquer forma, utilizar a informa??o contida nesta mensagem,
por ser ilegal. Caso voc? tenha recebido esta mensagem por engano,
pedimos que nos retorne este E-Mail, promovendo, desde logo, a
elimina??o do seu conte?do em sua base de dados, registros ou sistema
de controle. Fica desprovida de efic?cia e validade a mensagem que
contiver v?nculos obrigacionais, expedida por quem n?o detenha poderes
de representa??o.

LEGAL ADVICE
This message is exclusively destined for the people to whom it is
directed, and it can bear private and/or legally exceptional
information. If you are not addressee of this message, since now you
are advised to not release, copy, distribute, check or, otherwise, use
the information contained in this message, because it is illegal. If
you received this message by mistake, we ask you to return this email,
making possible, as soon as possible, the elimination of its contents
of your database, registrations or controls system. The message that
bears any mandatory links, issued by someone who has no representation
powers, shall be null or void.
Loading...