Azure Postgres: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on Azure Postgres: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on postgresql postgresql

Azure Postgres: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on


I had the same problem. Added firewall rule 0.0.0.0 - 255.255.255.255


I resolved it the following way:

1: Close all ports inyour psql firewall rules2: Try connecting(it will fail, of course)3: From Azure console, open your last postgres server logs file.

Here you should say something like this:

2017-11-17 08:12:03 UTC-5a0e99d3.713c-LOG:  connection received: host=xxx.xxx.xxx.xxx port=02017-11-17 08:12:04 UTC-5a0e99d3.713c-FATAL:  no pg_hba.conf entry for host "0.0.0.0", user "smile", database "smiledb", SSL on

Now you can create a rule for the xxx.xxx.xxx.xxx address you saw in the logs, and things should work...Hope it helps!


You can set up a VNet rule for the VNet that you application nodes are running in.

This VNet has to have a subnet with service endpoint Microsoft.SQL.

Yes also for the Postgres DB. This is some sort of all SQL databases service endpoint. When the VNet is setup with the service endpoint, then you can add this VNet in connection security section of Azure portal Postgres view, and your application nodes will be able to talk to the Postgres.

https://docs.microsoft.com/en-us/azure/postgresql/howto-manage-vnet-using-portal

I think the key problem here is to know about the service endpoints in VNets.