Confluence Randomly Not Connecting To Database

Richard King October 25, 2018

Hi Everyone,

An hour ago I tried to access our Confluence site and received this error message:

"Could not open Hibernate Session for transaction; nested exception is net.sf.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection"

I tried restarting Confluence and PostgreSQL but now the connection to the Confluence site just times out.

Looking at the "atlassian-confluence" log, I can see: 

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.30.211", user "confluenceuser", database "confluence", SSL off

No configuration changes were made to Confluence or PostgreSQL, I did disable some unused network interfaces that didn't have cables plugged into them on the server.

I've reset the "confluenceuser" password and updated it in "confluence.cfg", restarted Confluence and PostgreSQL.

I also tried multiple variations in "pg_hba.conf" to allow the connection.
Latest attempt:
host confluence confluenceuser 192.0.0.0/8 md5
hostnossl confluence confluenceuser 192.0.0.0/8 md5

How exactly should the entry look?

1 answer

1 accepted

0 votes
Answer accepted
Richard King October 29, 2018

This eventually solved it:

"hostnossl    confluence          confluenceuser            0.0.0.0/0  md5"

 

Any other range except "0.0.0.0/0" would not allow login to the database.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events