Why Jira can't connect database with pgBouncer? pgbouncer.ini

[databases]
jiradb = host=127.0.0.1 port=5432 dbname=jiradb

[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = md5
auth_file = userlist.txt
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = postgres


userlist.txt

"postgres" "postgres1"


It can be connected by psql:

psql -p 6432 -h 127.0.0.1 -U postgres jiradb
(Prompt password: postgres1)


But try connect from application:

Jira dbconfig.xml:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;jira-database-config&gt;
  &lt;name&gt;defaultDS&lt;/name&gt;
  &lt;delegator-name&gt;default&lt;/delegator-name&gt;
  &lt;database-type&gt;postgres72&lt;/database-type&gt;
  &lt;schema-name&gt;public&lt;/schema-name&gt;
  &lt;jdbc-datasource&gt;
    &lt;url&gt;jdbc:postgresql://127.0.0.1:6432/jiradb&lt;/url&gt;
    &lt;driver-class&gt;org.postgresql.Driver&lt;/driver-class&gt;
    &lt;username&gt;postgres&lt;/username&gt;
    &lt;password&gt;postgres1&lt;/password&gt;
    &lt;pool-min-size&gt;20&lt;/pool-min-size&gt;
    &lt;pool-max-size&gt;20&lt;/pool-max-size&gt;
    &lt;pool-max-wait&gt;30000&lt;/pool-max-wait&gt;
    &lt;validation-query&gt;select 1&lt;/validation-query&gt;
    &lt;min-evictable-idle-time-millis&gt;60000&lt;/min-evictable-idle-time-millis&gt;
    &lt;time-between-eviction-runs-millis&gt;300000&lt;/time-between-eviction-runs-millis&gt;
    &lt;pool-max-idle&gt;20&lt;/pool-max-idle&gt;
    &lt;pool-remove-abandoned&gt;true&lt;/pool-remove-abandoned&gt;
    &lt;pool-remove-abandoned-timeout&gt;300&lt;/pool-remove-abandoned-timeout&gt;
    &lt;pool-test-on-borrow&gt;false&lt;/pool-test-on-borrow&gt;
    &lt;pool-test-while-idle&gt;true&lt;/pool-test-while-idle&gt;
  &lt;/jdbc-datasource&gt;
&lt;/jira-database-config&gt;


When restart Jira, the database can't be connected again:

Database: JIRA couldn't connect to your database

JIRA failed to establish a connection to your database.
This could be because:

    Your database isn't running
    The configuration of your dbconfig.xml file is incorrect (user, password, or database URL etc.)
    There is a network issue between JIRA and your database (e.g. firewall, database doesn't allow remote access etc.)


I am testing it in one server. Jira is installed at jira user. pgBouncer is running under postgres user.
This works:

&lt;url&gt;jdbc:postgresql://127.0.0.1:5432/jiradb&lt;/url&gt;