SQLState - 08001 org.postgresql.util.PSQLException: The connection attempt failed.
Asked by adam_zhou@vanguard.com.cn:

SQLState - 08001  
org.postgresql.util.PSQLException: The connection attempt failed.

when we were installing confluence, we found the issue.

i'm using the postgres paas service on Azure cloud.

there is no problem for my jira, bitbucket jira service desk to connect the postgres.


Answers:
author: Daniel Ebers
body: Hi [adam_zhou@vanguard.com.cn](/t5/user/viewprofilepage/user-id/3932602)

the error message is quite generic but from your explanation I only could guess the connection is not possible as for a problem with firewalling, user credentials, user permissions or some other setting preventing Confluence to onboard.

When you say other services just connect fine could you please compare what is different with them?

There must be a difference why the connection is not possible.  

Please be advised that the database from the looks is not supported as per this Suggestion:  
<https://jira.atlassian.com/browse/CONFSERVER-55123>

In case this is the database type you are using (managed PostgreSQL on Azure) it might be the source why it is not working. If it is working and that type applies to your installation it would mean the installation is unsupported (not receiving support from Atlassian).

On the other hand this might probably not apply at all because throughout the internet installation guides are to be found how Confluence can be installed on a Azure PostgreSQL hosting.

Please in first step compare settings.

Cheers,  
Daniel

comments: author: adam_zhou@vanguard.com.cn
body: is this the correct answer?

<https://community.atlassian.com/t5/Confluence-questions/postgresql-setup-connection-error/qaq-p/845498>

i'm asking Azure support team to change the settings for us.


author: Daniel Ebers
body: These are mostly the settings for PostgreSQL. Here is some documentation on PostgreSQL setup for Jira:  

<https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-postgresql-938846851.html>


author: adam_zhou@vanguard.com.cn
body: we have no problem on installing jira connected to own db.

we have problem on installing confluence connected to Azure postgres sql paas service.


author: Daniel Ebers
body: The link was intended as "further reading" or an extended reference on configuration - to work out from there but I understand this did not help.  

Without having all the details of the configuration you see on Azure it will nearly be impossible to state from the outside what the problem might be.  
I see you posted in the Suggestion which is good.

Apart from that I found information for Confluence Data Center which references PostgreSQL in Azure as backend - so the information seem to be contradict each other at the moment.  
<https://confluence.atlassian.com/enterprise/running-confluence-on-an-azure-cluster-969535580.html>  

In case you have a support entitlement, which is basically a valid Confluence license, you could ask support what the exactly state is.  
<https://support.atlassian.com/>  

This is because the current state is not clearly - there are contrary assumptions as to this DB type.


author: adam_zhou@vanguard.com.cn
body: We checked with team experts, Azure experts...no result...it's your product bug! we fixed it by a wild guess... you'd better pay for our effort to fix the issue ... //cry


author: Daniel Ebers
body: Glad you fixed it. In case you would like to share what you found out this would surely help others users facing the same issue.

Thanks in advance!


author: adam_zhou@vanguard.com.cn
body: replace java postgres jdbc driver.


Tags: confluence-server

server