JIRA unable to connect to Postgres with 'Ident authentication failed' error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptom

When starting a JIRA application instance, a database connection pool can't be created with the following errors thrown in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 There was a SQL exception checking for database driver correctness. Skipping. org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: Ident authentication failed for user "jirauser") at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.ofbiz.core.entity.transaction.JNDIFactory.getJndiConnection(JNDIFactory.java:168) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:140) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:99) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:53) at com.atlassian.jira.appconsistency.db.OfbizConnectionFactory.getConnection(OfbizConnectionFactory.java:27) ...
1 2 JIRA-Bootstrap ERROR [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "jirauser"

Cause

The JDBC client login uses 'Ident-based authentication' method instead of 'password authentication' mode.

Resolution

By default PostgreSQL uses IDENT-based authentication and this will never allow you to login via -U and -W options. Allow username and password based authentication from your application by appling 'trust' as the authentication method for the JIRA application database user. You can do this by modifying the pg_hba.conf file. This file controls:

  1. Which hosts are allowed to connect

  2. How clients are authenticated

  3. Which PostgreSQL user names they can use

  4. Which databases they can access

For example:

local all all trust host all 127.0.0.1/32 trust

Don't forget to restart PostgreSQL after saving your changes to the file.

# service postgresql restart

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.