0

I have Python application in Azure Container Instance, which tries establish connection to Azure DB for PostgreSQL, but failing. Azure DB firewall is open for Azure services. Connection works fine, when application is connecting from local machine docker.

I wonder what is the problem?

psql: error: FATAL:  password authentication failed for user "myuser"
'sales.Customers' table is unavailable - sleeping
* Could not resolve host: hslotp
* Closing connection 0
OTP is unavailable - sleeping
2

1 Answer 1

1

Have you checked the ports match, here is something you can verify from Troubleshoot connection issues to Azure Database for PostgreSQL

make sure you have the latest of psycopg2 release or atleast above 2.8.0

Also, the connection string should looks like below. Make sure you get Server name and login details from Azure portal.

postgresql://user:password@container_name:5432?sslmode=disable

Refer: thon to connect and query data in Azure Database for PostgreSQL

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.