Reputation: 143
I followed the documentation guide here to configure an Azure DNS zone for a virtual network.
I then created a virtual machine on that virtual network and provisioned a virtual network gateway to allow my Azure web apps to communicate with the virtual machine using VNet integration. My web apps are then able to resolve against the virtual machines private IP as expected.
I then created an 'A' type record set within the DNS zone resolving a service name against the private IP of the virtual machine just like here.
However, when I then attempt to access the DNS configured service name that should resolve against the private IP address of the virtual machine, I get the following error:
curl: (6) Could not resolve host: xxxx.local
Am I missing something obvious here?
Upvotes: 0
Views: 2837
Reputation: 28304
I can not reproduce this error following your steps:
private.test.com
.My web apps are able to resolve against the virtual machines private IP as expected. This could verify the Azure private DNS zone should work. Then I also create an A
record for a custom name against the VM private IP address. Both scenarios work.
You could check if an A
record is something like below picture in the private DNS zone.
Then you could verify if
curl
with http://
or without that, or without the specific port 9200, the error is still the same.
I suggest using SET WEBSITE_DNS_
command. This command will output the current DNS server that is being used by the web app. If the error Environment variable WEBSITE_DNS_ not defined is received
, no custom DNS servers are configured for the web app. See more details about networking Related Commands for Azure App Services.
Upvotes: 0