Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't connect to Database connection pool server from application server

Raw Main
Contributor
March 11, 2020

We are using Jira Data Center edition now. Using database connection pool for PostgreSQL, named pgBouncer. It's running on a dedicated server.

  • Node1: Jira Data Center Application server
  • Node2: PostgreSQL connection pool - pgBouncer server
  • Node3: PostgreSQL Server

On Node2

The configuration for pbBouncer is:

pgbouncer.ini

[databases]
jiradb = host=[Node3 IP] port=5432 dbname=jiradb

[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 jiradb

On Node1

{JIRA_HOME}/dbconfig.xml

<url>jdbc:postgresql://[Node2 IP]:6432/app_db</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>someuser</username>
<password>somepassword</password>

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?

2 answers

0 votes
Gonchik Tsymzhitov
Community Champion
February 9, 2022

@Raw Main 

Please, adjust next line

listen_addr = 127.0.0.1, ::1
0 votes
Jorge Jerez
Contributor
April 30, 2020

Hi @Raw Main 

Is there any log of pgBouncer or Postgres?

 

May pgBouncer refusing the connection ?

Suggest an answer

Log in or Sign up to answer