[pgpool-general: 6474] FATAL: unable to read data from DB node 0 Detail: EOF encountered with backend.

Benjamin Suqui bsuqui at yahoo.com
Mon Mar 25 20:54:53 JST 2019


Hi all,

I have two servers PostgresSQL Master/Slave - Slot Replication
I also have a scenario PostgreSQL HA with pgpool-II

All Server [Virtual Maschine] are running on:
Ubuntu 16.04.5 LTS
postgresql-9-5-pgpool2  version 3.4.3-1
pgpool2 version 3.4.3-1
Tomcat7
psql (9.5.14)

Server PgpoolII : Tomcat7 + pgpool_master(primary)IP: x.x.x.x
Server PgpoolII : tomcat7 + pgpool_slave (standby)IP: x.x.x.x

Server Master   : PGsql Backend (primary - node 0)IP: x.x.x.x
Server Slave    : PGsql Backend (standby - node 1)IP: x.x.x.x


Use Case:
What happens if the Master Server [PGsql Backend - (node 0)] is completely turned off?

1. Standby Server is automatically converted to Master Server (using the failover_command of the pgpool process).

Before turning off the server:
root at j325464:~# su - postgres
postgres at j325464:~$ psql -h localhost -p 5433 -c "show pool_nodes" postgres
 node_id |   hostname    | port | status | lb_weight |  role   
---------+---------------+------+--------+-----------+---------
 0         | x.x.x.x        | 5432 | 2        | 0.500000  | primary
 1         | x.x.x.x        | 5432 | 2        | 0.500000  | standby
(2 rows)


After turning off the server:
root at j325464:~# su - postgres
postgres at j325464:~$ psql -h localhost -p 5433 -c "show pool_nodes" postgres
 node_id |   hostname    | port | status | lb_weight |  role   
---------+---------------+------+--------+-----------+---------
 0         | x.x.x.x        | 5432 | 3        | 0.500000  | standby
 1         | x.x.x.x        | 5432 | 2        | 0.500000  | primary
(2 rows)


2. The Web Application (from Tomcat7 - pgpool_master) no longer has any connection to the database.

 From Firefox: 

Internal Error
org.hibernate.exception.JDBCConnectionException: could not inspect JDBC autocommit mode
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not inspect JDBC autocommit mode at 


3. The following error is received: 

Pgpool LOG: 
org.postgresql.util.PSQLException: FATAL: unable to read data from DB node 0 Detail: EOF encountered with backend.


4. The two Tomcat7-Pgpool2-Server show, that there is no connection with the database. 

postgres at j325464:~$ psql -h x.x.x.x -p 5433 -c "show pool_nodes" postgres
psql: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
postgres at j325464:~$


Is this normal, is there a solution for this version of pgpool2 (3.4.3), so that pgpool can recognize the new Master_Server automatically?

Best regards, a help in advance is appreciated.

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20190325/9ef9118f/attachment.html>


More information about the pgpool-general mailing list