[pgpool-general: 6655] Re: Cluster with 3 nodes

Tatsuo Ishii ishii at sraoss.co.jp
Sun Jul 28 08:58:55 JST 2019


I noticed followings in the log files:

/home/t-ishii/slave log.txt:Jul 25 22:30:53 reserve root[2011]: follow_master.sh: failed_nod_id=1 is not running. skipping follow master command.
/home/t-ishii/slave log.txt:Jul 25 22:30:53 reserve root[2019]: follow_master.sh: failed_nod_id=2 is not running. skipping follow master command.

I don't know which is node 1 and 2 (because you didn't share
pgpool.conf) , but I don't think two nodes were skipped by follow
master command was normal because you have only 3 nodes and just one
of 3 is already down.

I suspect following code in follow_master.sh did not succeed:

ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
    postgres@${FAILED_NODE_HOST} ${PGHOME}/bin/pg_ctl -w -D ${FAILED_NODE_PGDATA} status >/dev/null 2>&1

You would want to remove ">/dev/null" to see what was going on there.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> "slave" -primary
> "master" and "reserve"- standby
> After I shut down "slave", "master" became primary, but "reserve" got
> status down. Configs are same from the documentation (changed just
> hostnames and ip's). Failover config is the same also
> 
> пт, 26 июл. 2019 г. в 12:54, Tatsuo Ishii <ishii at sraoss.co.jp>:
> 
>> Hi,
>>
>> Yes, please provide log and config files.
>>
>> My intuition is that there's something wrong with the follow master
>> command script or related settings (especially ssh), because the
>> script shutdowns standby server to resync with new primary database
>> server.
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>> > Гиа Хурцилава <khurtsilava.g at gmail.com>
>> > чт, 25 июл., 13:56 (21 час назад)
>> > кому: pgpool-general
>> >
>> > Hi there.
>> >
>> > I’ve got 3 machines with pgpool-4.0.5 and postgresql-11. I have done
>> > configuration for pgpool from the official documentations (
>> > http://www.pgpool.net/docs/latest/en/html/example-cluster.html) and
>> > everything works fine, except 1 thing. When I’m shutting down master
>> node,
>> > one of the slaves is correctly promoted, and another one is going down
>> with
>> > master. Just like that:
>> >
>> > node_id | hostname | port | status | lb_weight |  role   | select_cnt |
>> > load_balance_node | replication_delay | last_status_change
>> >
>> >
>> ---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------
>> >
>> >  0       | master   | 5432 | down   | 0.333333  | standby | 0          |
>> > false             | 0                 | 2019-07-25 13:49:22
>> >
>> >  1       | slave      | 5432 | up         | 0.333333  | primary | 0
>> >   | true              | 0                | 2019-07-25 13:49:22
>> >
>> >  2       | reserve  | 5432 | down   | 0.333333  | standby | 0          |
>> > false             | 0                 | 2019-07-25 13:49:22
>> >
>> >
>> >
>> > What reason can be of this behavior? How can I fix it?
>> >
>> > If you’ll need logs or config files-let me know. Thanks.
>>


More information about the pgpool-general mailing list