[pgpool-general: 2429] Re: watchdog: different statuses on different pgpool nodes.

Yugo Nagata nagata at sraoss.co.jp
Thu Jan 16 09:47:30 JST 2014


Hi,

On Wed, 15 Jan 2014 23:16:56 +0400
Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:

> I edited pgpool init script so that it starts pgpool with -D option now. 
> But the problem seems to remain :(
> 
> 
> pgpool-node1:~# ps uax |grep -i 'pgpool -n '
> postgres  2253  0.0  0.5 170860  5312 pts/0    S    19:08   0:00 /usr/sbin/pgpool -n -D
> 
> pgpool-node1:~# psql -U postgres -h localhost -p 9999
> Password for user postgres:
> psql (9.3.2)
> Type "help" for help.
> 
> postgres=# show pool_nodes;
>  node_id |   hostname    | port | status | lb_weight |  role
> ---------+---------------+------+--------+-----------+---------
>  0       | db-node1.site | 5432 | 2      | 0.500000  | primary
>  1       | db-node2.site | 5432 | 2      | 0.500000  | standby
> (2 rows)
> 
> 
> pgpool-node2:~# ps uax |grep -i 'pgpool -n '
> postgres  3528  0.0  0.5 103188  5236 pts/0    S    19:05   0:00 /usr/sbin/pgpool -n -D
> 
> 
> pgpool-node2:~# psql -U postgres -h watchdog.mutual-ip -p 9999
> Password for user postgres:
> psql (9.3.2)
> Type "help" for help.
> 
> postgres=# show pool_nodes;
>  node_id |   hostname    | port | status | lb_weight |  role
> ---------+---------------+------+--------+-----------+---------
>  0       | db-node1.site | 5432 | 3      | 0.500000  | standby
>  1       | db-node2.site | 5432 | 2      | 0.500000  | primary
> (2 rows)

On pgpool-node2, failover have occured and backend #1 was promoted to primary.
There may be some network problem (e.g. firewall) around pgpool-node2.

Could you provide pgpool.log and pgpool.conf on both pgpools, 
and what the version of pgpool?

> 
> 
> pgpool-node2 is primary at the moment. I started pgpool on pgpool-node1 after pgpool-node2. 
> 
> Both pgpools are running with -D option (as I showed above). But pgpool-node1 hasn't synchronised its status with pgpool-node2 after start. 
> 
> 
> 
> 
> 
> On Jan 15, 2014, at 5:28 PM, Lazaro Ruben Garcia Martinez <lgarciam at vnz.uci.cu> wrote:
> 
> > Try to start pgpool with -D option. The purpose of this option is discard pgpool_status file and do not restore previous status. May be possible that some time ago the server 1 was stopped and this result was stored in pgpool_status file.
> > 
> > Regards.
> > ________________________________________
> > De: pgpool-general-bounces at pgpool.net [pgpool-general-bounces at pgpool.net] En nombre de Yugo Nagata [nagata at sraoss.co.jp]
> > Enviado el: miércoles, 15 de enero de 2014 5:26
> > Para: Sergey Arlashin
> > CC: pgpool-general at pgpool.net
> > Asunto: [pgpool-general: 2413] Re: watchdog: different statuses on different pgpool nodes.
> > 
> > Hi,
> > 
> > On Wed, 15 Jan 2014 12:44:40 +0400
> > Sergey Arlashin <sergeyarl.maillist at gmail.com> wrote:
> > 
> >> Hi!
> >> 
> >> I'm trying set up watchdog and cannot figure out why sometimes I get different statuses on different pgpool nodes. It looks like this:
> >> 
> >> Two nodes : pgpool-node1and pgpool-node2. Watchdog mutual IP address is currently assigned to pgpool-node1.
> >> 
> >> pgpool-node1:~# psql -U postgres -h watchdog.mutual-ip -p 9999
> >> 
> >> Password for user postgres:
> >> psql (9.3.2)
> >> Type "help" for help.
> >> 
> >> postgres=# show pool_nodes;
> >> node_id |   hostname    | port | status | lb_weight |  role
> >> ---------+---------------+------+--------+-----------+---------
> >> 0       | db-node1.site | 5432 | 2      | 0.500000  | primary
> >> 1       | db-node2.site | 5432 | 2      | 0.500000  | standby
> >> (2 rows)
> >> 
> >> 
> >> 
> >> pgpool-node2:~# psql -U postgres -h localhost -p 9999
> >> Password for user postgres:
> >> psql (9.3.2)
> >> Type "help" for help.
> >> 
> >> postgres=# show pool_nodes;
> >> node_id |   hostname    | port | status | lb_weight |  role
> >> ---------+---------------+------+--------+-----------+---------
> >> 0       | db-node1.site | 5432 | 2      | 0.500000  | primary
> >> 1       | db-node2.site | 5432 | 3      | 0.500000  | standby
> >> (2 rows)
> > 
> > This means that pgpool on pgpool-node2 regards backend node #1 as down.
> > If there are no messages about failover in the log, this might be because
> > pgpool read old pgpool_status at startup for lack of -D option.
> > 
> >> 
> >> I cannot see any problems in pgpool logs. Or any other indication that something goes wrong.
> >> 
> >> Could you please tell me why this could happen?
> >> 
> >> 
> >> Thanks in advance.
> >> 
> >> --
> >> Best regards,
> >> Sergey Arlashin
> >> 
> >> 
> >> _______________________________________________
> >> pgpool-general mailing list
> >> pgpool-general at pgpool.net
> >> http://www.pgpool.net/mailman/listinfo/pgpool-general
> > 
> > 
> > --
> > Yugo Nagata <nagata at sraoss.co.jp>
> > _______________________________________________
> > pgpool-general mailing list
> > pgpool-general at pgpool.net
> > http://www.pgpool.net/mailman/listinfo/pgpool-general
> > 
> > Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> > http://www.antiterroristas.cu
> > http://justiciaparaloscinco.wordpress.com
> > 
> > Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> > http://www.antiterroristas.cu
> > http://justiciaparaloscinco.wordpress.com
> 


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-general mailing list