Confluence PostgreSQL JDBC direct connection refused Edited

Hi all, 

When I try to test the database connection, I have the following error :

Can't reach database server or port

SQLState - 08001
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

The postgresql.conf file looks like :

# - Connection Settings -

listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)

The pg_hba.conf file looks like :


# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all trust
# IPv6 local connections:
host all all ::1/128 ident
host all all localhost/24 trust


The PostgreSQL service is running.

I tried also to disable the firewall and the antivirus.....without success.

What should I try more ?


Thanks in advance for your precious help

Windows 7 / confluence installed on the same computer as PostgreSQL 10

Windows 7 / Confluence installed on the same computer as PostgreSQL10

2 answers

1 accepted

0 votes
Accepted answer
Ann Worley Atlassian Team Oct 09, 2017

It sounds like you saw Confluence PostgreSQL JDBC direct connection refused. Please double check that PostgreSQL was restarted after the authentication was set to trust instead of ident.

On a side note, I don't think this is the cause of the issue but PostgreSQL ver. 10 is not a supported platform for Confluence 6.4.x: Supported Platforms

I just had to change the port. The default port was 5434.

Everything works fine right now.

Thank you for your help :-)

Please, how can I close the questions ?

Mark an answer as "correct".  There's a tick mark (and voting box) next to every answer.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

473 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you