View Issue Details

IDProjectCategoryView StatusLast Update
0000335Pgpool-II[All Projects] Generalpublic2017-09-06 14:35
ReportervishnuduttpvAssigned Topengbo 
PriorityurgentSeveritycrashReproducibilityalways
Status resolvedResolutionopen 
Product Version3.6.5 
Target Version3.6.6Fixed in Version3.6.6 
Summary0000335: PgPool II not connecting with the application!
DescriptionI have configured pgpool II 3.6.5 and postgresql 9.6.4 as backend nodes. I am having connection from pgpool and the postgresql nodes. My postgres port is 5433 and pgpool is maintained as 9999 itself. Following is my tomcat context.xml,

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/ExamSystem-nbp">
        <Resource name="jdbc/exam" auth="Container"
                type="javax.sql.DataSource" driverClassName="org.postgresql.Dri$
                 url="jdbc:postgresql://localhost:9999/testDB"
                username="postgres" password="password"
                />
</Context>

While I am directly connecting with the postgres DB in 5433, Its working fine.But When I connect with th pgpool in port 9999 its getting hanged and the tomcat is not getting any hits.
Iam using the sample conf file for replication in the pgpool,with just the backend node port changed.
The application is getting hanged!
Additional Information[root@localhost ~]# psql -U postgres -p 9999
psql (9.6.4)
Type "help" for help.

postgres=# show pool_nodes;
 node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay
---------+-----------+------+--------+-----------+--------+------------+-------------------+-------------------
 0 | localhost | 5433 | up | 1.000000 | master | 2 | true | 0
(1 row)


postgres=# show pool_processes;
 pool_pid | start_time | database | username | create_time | pool_counter
----------+---------------------+----------+----------+---------------------+--------------
 4198 | 2017-08-28 10:54:04 | | | |
 4199 | 2017-08-28 10:54:04 | | | |
 4200 | 2017-08-28 10:54:04 | | | |
 4201 | 2017-08-28 10:54:04 | | | |
 4202 | 2017-08-28 10:54:04 | | | |
 4203 | 2017-08-28 10:54:04 | | | |
 4204 | 2017-08-28 10:54:04 | | | |
 4205 | 2017-08-28 10:54:04 | | | |
 4206 | 2017-08-28 10:54:04 | | | |
 4207 | 2017-08-28 10:54:04 | | | |
 4208 | 2017-08-28 10:54:04 | | | |
 4209 | 2017-08-28 10:54:04 | | | |
 4210 | 2017-08-28 10:54:04 | | | |
 4211 | 2017-08-28 10:54:04 | | | |
 4212 | 2017-08-28 10:54:04 | | | |
 4213 | 2017-08-28 10:54:04 | | | |
 4214 | 2017-08-28 10:54:04 | | | |
 4215 | 2017-08-28 10:54:04 | | | |
 4216 | 2017-08-28 10:54:04 | | | |
 4217 | 2017-08-28 10:54:04 | | | |
 4218 | 2017-08-28 10:54:04 | | | |
 4219 | 2017-08-28 10:54:04 | | | |
 4220 | 2017-08-28 10:54:04 | | | |
 4221 | 2017-08-28 10:54:04 | | | |
 4222 | 2017-08-28 10:54:04 | | | |
 4223 | 2017-08-28 10:54:04 | | | |
 4224 | 2017-08-28 10:54:04 | | | |
 4225 | 2017-08-28 10:54:04 | | | |
 4459 | 2017-08-28 10:59:47 | | | |
 4227 | 2017-08-28 10:54:04 | postgres | postgres | 2017-08-28 11:12:30 | 1
 4228 | 2017-08-28 10:54:04 | | | |
 4229 | 2017-08-28 10:54:04 | | | |
(32 rows)

postgres=# PGPOOL SHOW backend;
          item | value | description
-------------------------+--------------------------+-----------------------------------------------
 backend_hostname0 | localhost | hostname or IP address of PostgreSQL backend.
 backend_port0 | 5433 | port number of PostgreSQL backend.
 backend_weight0 | 1 | load balance weight of backend.
 backend_data_directory0 | /var/lib/pgsql/9.6/data/ | data directory of the backend.
 backend_flag0 | ALLOW_TO_FAILOVER | Controls various backend behavior.
(5 rows)


postgres=# PGPOOL show port;
 port
------
 9999
(1 row)
TagsNo tags attached.

Activities

pengbo

2017-08-29 08:34

developer   ~0001686

What is the error message?
Can you connect pgpool by the following command?

"psql -h localhost -U postgres -p 9999 testDB"

vishnuduttpv

2017-08-29 16:21

reporter   ~0001688

When Iam changing the tomcat conf url="jdbc:postgresql://localhost:9999/testDB" , Iam not getting any hit logs in catalina or any other tomcat logs.
psql -h localhost -U postgres -p 9999 testDB
Yes.
I am having access to the DB through the pgpool.

vishnuduttpv

2017-08-30 13:40

reporter   ~0001694

[root@localhost ~]# psql -U postgres -h localhost -p 9999 testdb
psql (9.6.4)
Type "help" for help.

testdb=#

pengbo

2017-08-31 08:49

developer   ~0001696

I will look into it.

pengbo

2017-08-31 11:24

developer   ~0001697

Last edited: 2017-08-31 11:28

View 2 revisions

Could you try to set to streaming replication mode, and restart Pgpool-II?

===
master_slave_mode = on
master_slave_sub_mode = 'stream'
===

pengbo

2017-08-31 14:08

developer   ~0001698

Sorry for the last comment at 2017-08-31 11:24.

This is a bug in Pgpool-II 3.6.5. This bug is already fixed and will be released in 3.6.6.
You can try the head source code in 3.6 stable branch or wait for the next release.

Issue History

Date Modified Username Field Change
2017-08-28 14:53 vishnuduttpv New Issue
2017-08-29 08:34 pengbo Note Added: 0001686
2017-08-29 16:21 vishnuduttpv Note Added: 0001688
2017-08-30 13:40 vishnuduttpv Note Added: 0001694
2017-08-31 08:49 pengbo Note Added: 0001696
2017-08-31 11:24 pengbo Note Added: 0001697
2017-08-31 11:28 pengbo Note Edited: 0001697 View Revisions
2017-08-31 14:08 pengbo Note Added: 0001698
2017-08-31 16:45 pengbo Assigned To => pengbo
2017-08-31 16:45 pengbo Status new => resolved
2017-08-31 16:45 pengbo Fixed in Version => 3.6.6
2017-08-31 16:45 pengbo Steps to Reproduce Updated View Revisions
2017-08-31 17:02 administrator Fixed in Version 3.6.6 =>
2017-08-31 17:02 administrator Target Version => 3.6.6
2017-09-06 14:35 administrator Fixed in Version => 3.6.6