Share via

Logic App (Standard)/Azure Database for PostgreSQL flexible server -'No such host is known'

Panji Satrio 40 Reputation points
2025-07-09T04:51:26.3466667+00:00

Hi everyone,

I got an error when creating a connection to Azure Database for PotgreSQL flexible server in Logic Apps:

Failed to create connection: { 
	"status": 400, 
	"message": "An error happened while reading data from the provider: 'No such host is known'\r\n inner exception: An error happened while reading data from the provider: 'No such host is known'\r\nclientRequestId: 51e6f60c-a6ba-41ac-8df5-6a2f2b7cbe10", 
	"error": { 
		"message": "An error happened while reading data from the provider: 'No such host is known'\r\n inner exception: An error happened while reading data from the provider: 'No such host is known'" 
	}, 
	"source": "postgresql-sea.azconn-sea-001.p.azurewebsites.net" 
}

My Azure Database for PotgreSQL flexible server has the same virtual network with the Logic Apps but different subnet, based on official documentation i've found, if it's in the same virtual network, it can directly access the resource:
Diagram that shows how peering works between virtual networks, one of which includes an Azure Database for PostgreSQL flexible server.

Thank you,
Panji Satrio

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2025-07-24T10:51:09.8666667+00:00

    @Panji Satrio Thanks for your patience on this. Even If you try using Private DNS for creating a new connection to Azure Database for PotgreSQL flexible server as suggested by @Obinna Ejidike it fails to connect.

    Try to setup VNet (Virtual Network) Integration through Azure Portal:

    In the Azure portal, on the logic app resource menu, under Settings, select Networking.

    On the Networking page, in the Outbound traffic configuration section, select the link next to Virtual network integration.

    On the Virtual network integration page, select Add virtual network integration.

    On the Add virtual network integration pane, select the subscription, the virtual network that connects to your internal service, and the subnet where to add the logic app. When you finish, select Connect.

    On the Virtual Network Integration page, by default, the Outbound internet traffic setting is selected, which routes all outbound traffic through the virtual network. In this scenario, the app setting named WEBSITE_VNET_ROUTE_ALL is ignored.

    To find this app setting, on the logic app resource menu, under Settings, select Environment variables.

    If you use your own domain name server (DNS) with your virtual network, add the WEBSITE_DNS_SERVER app setting, if none exists, and set the value to the IP address for your DNS. If you have a secondary DNS, add another app setting named WEBSITE_DNS_ALT_SERVER, and set the value to the IP for your secondary DNS.

    After Azure successfully provisions the virtual network integration, try to run the workflow again.

    The HTTP action now runs successfully.

    Was this answer helpful?

    0 comments No comments

  2. Obinna Ejidike 2,870 Reputation points Volunteer Moderator
    2025-07-09T07:55:23.77+00:00

    Hi Panji Satrio

    Thanks for using the Q&A platform.

    When you deploy PostgreSQL Flexible Server in VNet injection mode, Azure doesn’t automatically register its hostname in your private DNS unless you’re using the built‑in Azure DNS or you’ve linked the Azure provided Private DNS zone for PostgreSQL. If you point your Logic App at that VNet but your DNS can’t resolve the server’s *.postgres.database.azure.com name, you’ll get exactly “No such host is known.”

    From a VM in the same VNet/subnet setup exactly as your Logic App host, run:

    nslookup yourserver.postgres.database.azure.com
    

    You should see the private IP of your Flexible Server. Once your DNS is correctly resolving the yourserver.postgres.database.azure.com name to the private IP, your Logic App will be able to open the connection; however, if this fails, you will need to create Private DNS zones.
    User's image

    Find Use a Private DNS zone

    If the response was helpful, please feel free to mark it as “Accepted Answer” and consider giving it an upvote. This also benefits others in the community.

    Regards,

    Obinna.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.