JIRA Unable to connect to database with 'Ident authentication failed' error

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptom

When starting a JIRA application instance, a database connection pool can't be created with the following error thrown in the application log:

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)
...

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

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.