<html><head></head><body><div class="ydpa328182eyahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 10px;"><div><div><span><font size="2" face="verdana, helvetica, sans-serif"><span>Hi all,<br><br>I have two servers PostgresSQL Master/Slave - Slot Replication<br>I also have a scenario PostgreSQL HA with pgpool-II<br><br>All Server [Virtual Maschine] are running on:<br>Ubuntu 16.04.5 LTS<br>postgresql-9-5-pgpool2&nbsp; version 3.4.3-1<br>pgpool2 version 3.4.3-1<br>Tomcat7<br>psql (9.5.14)<br><br>Server PgpoolII : Tomcat7 + pgpool_master(primary)IP: x.x.x.x<br>Server PgpoolII : tomcat7 + pgpool_slave (standby)IP: x.x.x.x<br><br>Server Master&nbsp;&nbsp; : PGsql Backend (primary - node 0)IP: x.x.x.x<br>Server Slave&nbsp;&nbsp;&nbsp; : PGsql Backend (standby - node 1)IP: x.x.x.x<br><br><br><b>Use Case:</b><br>What happens if the Master Server [PGsql Backend - (node 0)] is completely turned off?<br><br><b>1. Standby Server is automatically converted to Master Server (using the failover_command of the pgpool process).<br></b><br><b>Before turning off the server:</b><br>root@j325464:~# su - postgres<br>postgres@j325464:~$ psql -h localhost -p 5433 -c "show pool_nodes" postgres<br>&nbsp;node_id |&nbsp;&nbsp; hostname&nbsp;&nbsp;&nbsp; | port | status | lb_weight |&nbsp; role&nbsp; &nbsp;<br>---------+---------------+------+--------+-----------+---------<br>&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 5432 | 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | primary<br>&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 5432 | 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | standby<br>(2 rows)<br><br><br><b>After <span><span><font size="2" face="verdana, helvetica, sans-serif"><span>turning off the server</span></font></span></span>:</b><br>root@j325464:~# su - postgres<br>postgres@j325464:~$ psql -h localhost -p 5433 -c "show pool_nodes" postgres<br>&nbsp;node_id |&nbsp;&nbsp; hostname&nbsp;&nbsp;&nbsp; | port | status | lb_weight |&nbsp; role&nbsp; &nbsp;<br>---------+---------------+------+--------+-----------+---------<br>&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 5432 | 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | standby<br>&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | x.x.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 5432 | 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | primary<br>(2 rows)<br><br><br><b>2. The Web Application (from Tomcat7 - pgpool_master) no longer has any connection to the database.<br></b><br> <span>From Firefox: <br><br>Internal Error<br>org.hibernate.exception.JDBCConnectionException: could not inspect JDBC autocommit mode<br>javax.persistence.PersistenceException:
 org.hibernate.exception.JDBCConnectionException: could not inspect JDBC
 autocommit mode at <br></span><br><br><b>3. The following error is received: <br></b><br>Pgpool LOG: <br>org.postgresql.util.PSQLException: FATAL: unable to read data from DB node 0 Detail: EOF encountered with backend.<br><br><br><b>4. The two Tomcat7-Pgpool2-Server show, that there is no connection with the database. <br></b><br>postgres@j325464:~$ psql -h x.x.x.x -p 5433 -c "show pool_nodes" postgres<br>psql: server closed the connection unexpectedly<br>&nbsp;&nbsp; &nbsp;This probably means the server terminated abnormally<br>&nbsp;&nbsp; &nbsp;before or while processing the request.<br>postgres@j325464:~$<br><br><br><b>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?</b><br></span></font><div><font size="2" face="verdana, helvetica, sans-serif"><span><br></span></font></div><div><font size="2" face="verdana, helvetica, sans-serif"><span>Best regards, a help in advance is appreciated.</span><br></font></div><div><font size="2" face="verdana, helvetica, sans-serif"><br></font></div><div><font size="2" face="verdana, helvetica, sans-serif">Ben</font></div></span></div></div></div></body></html>