[pgpool-general: 8079] Re: ERROR: unable to read data from DB node 0

Bo Peng pengbo at sraoss.co.jp
Tue Apr 12 16:50:41 JST 2022


Hello,

On Mon, 11 Apr 2022 18:29:00 +0300
"Nikolay Mastilo (HM)" <nikm71 at hotmail.com> wrote:

> Hello,
> 
> We use Pgpool as load balancer and connection pool in our application 
> with three database nodes cluster (Patroni as failover manager).
> 
> Previously, we received such messages in the log when starting Pgpool:
> 
> 2021-11-17 13:58:40: pid 19: LOG: find_primary_node_repeatedly: waiting 
> for finding a primary node
> 2021-11-17 13:58:40: pid 19: ERROR: unable to read data from DB node 0
> 2021-11-17 13:58:40: pid 19: DETAIL: EOF encountered with backend
> 2021-11-17 13:58:40: pid 19: LOG: find_primary_node: 
> make_persistent_db_connection_noerror failed on node 0
> 2021-11-17 13:58:40: pid 19: ERROR: unable to read data from DB node 1
> 2021-11-17 13:58:40: pid 19: DETAIL: EOF encountered with backend
> 
> These messages appeared during the first 5 minutes of the Pgpool 
> starting, then stopped appearing.
> 
> When we set the parameter BACKEND_FLAG0 = 
> ALWAYS_PRIMARY|DISALLOW_TO_FAILOVER , such messages no longer appear on 
> startup.
> 
> Could you explain what happened and why such messages stopped after 
> setting the specified parameter value.

At startup, pgpool connects to all PostgreSQL servers
using "sr_check_user" and "sr_check_password" to find the primary node.
The timeout for finding a primary node is defined in the following parameter:

  search_primary_node_timeout = 300

If you specify "ALWAYS_PRIMARY" flag to BACKEND_FLAG0,
Pgpool-II will recognize node0 as the primary and will not connect to PostgreSQL servers.

> 2021-11-17 13:58:40: pid 19: ERROR: unable to read data from DB node 0
> 2021-11-17 13:58:40: pid 19: DETAIL: EOF encountered with backend
> 2021-11-17 13:58:40: pid 19: LOG: find_primary_node: 
> make_persistent_db_connection_noerror failed on node 0
> 2021-11-17 13:58:40: pid 19: ERROR: unable to read data from DB node 1
> 2021-11-17 13:58:40: pid 19: DETAIL: EOF encountered with backend

Pgpool-II fails to connect to all PostgreSQL servers.
Please check if "sr_check_user" and "sr_check_password" are set correctly.

> -- 
> 
> Regards,
> Nikolay
> 


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/


More information about the pgpool-general mailing list