We are using confluence Data Center edition now. Using database connection pool for PostgreSQL, named pgBouncer. It's running on a dedicated server.
On Node2
The configuration for pbBouncer is:
pgbouncer.ini
[databases]
confluence = host=[Node3 IP] port=5432 dbname=confluence
[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1, ::1
auth_type = md5
auth_file = userlist.txt
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = someuser
userlist.txt
"someuser" "somepassword"
It can be connected on the server itself:
psql -p 6432 -h localhost -U postgres confluence
On Node1
{confluence_HOME}/confluence.cfg.xml
<property name="hibernate.connection.password">somepassword</property>
<property name="hibernate.connection.url">jdbc:postgresql://[Node2 IP]:6432/confluence</property>
<property name="hibernate.connection.username">someuser</property>
Can't connect to Node2's pgbouncer server. So can't connect to database. Both netstat checking on Node2 and telnet checking on Node1, and iptables checking didn't find any problem.
If connect to Node3 directly, it will work.
Is it something JDBC's issue? Or what's reason for that?