FATAL: Ident authentication failed for user when installing Confluence
Asked by vstokarev:

Sorry, I gave up after almost three hours of trying..

I've installed Confluence 5.3 on CentOS 6.4 server by downloading and launching .bin file.

I've installed PostgreSQL 9.0.14.

Now I'm trying to finish Confluence installation. I use this doc: <https://confluence.atlassian.com/display/DOC/Database+Setup+for+PostgreSQL>

When I specify login and password and try to connect to the database I get this error: "org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "confluence". I'm stuck here and dispite all my attempts to solve this I always get this error. Now I want to switch to MySQL, because this DB is more familiar to me, but after so much time spent trying to find the solution I decided to ask the community first.

Any suggestions are appreciated.


Answers:
author: Deividi Luvison
body: You can try the resolution on below guide:

[https://confluence.atlassian.com/display/JIRAKB/JIRA+Unable+to+Connect+to+Database+with+'Ident+authentication+failed'+Error](https://confluence.atlassian.com/display/JIRAKB/JIRA+Unable+to+Connect+to+Database+with+)

In there we have a explanation to why this is happening :smile:.  
Thanks and Regards,  
David\|Confluence Support Engineer

comments: author: Ray Foulk
body: The above suggestion worked for me when faced with the same problem. I also changed the localhost IPv6 line to 'trust'. Neither 'peer' nor 'md5' modes worked for me.


author: jerome.comouth
body: I am at the same point. Installation of JIRA under debian 8.4 and postgresql 9.4.6.

Can log in easly under command line on my db server, but the JIRA connection screen says:  
Error connecting to database

FATAL: password authentication failed for user "jiradbuser"

UPDATE:

I finaly solved it by changing the password to the same value again:

ALTER USER jiradbuser WITH PASSWORD 'thesamepassword';

You can check if your connection works by typing:

psql -h localhost -p 5432 -U dbuser dbname

(take the same values from the JIRA installation screen, copy the password when prompted).


author: bill salvucci
body: I have the same experience with confluence 5.4.4 and postgresql 9.2.7. postgresql and confluence are on the same server.

I've verified that /var/lib/pgsql9/data/pg_hba.conf contains

local all all ident

Also verified that confluence is running as my confluence linux user

-bash-4.1$ id -u confluence  
501  
-bash-4.1$ ps -ef \| grep confluence  
501 6033 1 10 20:16 ? 00:00:34 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Xms256m -Xmx512m -XX:MaxPermSize=256m -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/confluence/endorsed -classpath /opt/atlassian/confluence/bin/bootstrap.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start

I can successfully connect to postgres using

psql -U confluence confluence

When I setup the db connection in the confluence webapp, I use Direct JDBC and specify the username to be "confluence" with no password (I also tried setting the password to be the linux password), I get "org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "confluence""

I even went as far as changing the postgres authentication method to "trust" (and restarted postgresql). That gives the same error.

What else can I try?


Tags: confluence-administration