@App Service Plan - DNS Host Name Resolution Issue ,
Thanks for the follow-up and update. As I understand you have mentioned DNS is working fine and got successful responses on the API port.
Just to clarify, you mention “the app service plan will not resolve the hostname for the API VM”. Then “the browser cannot resolve the domain name into the IP address”. Are both the browser and API not resolving IPs for the respective domain name?
You may try these to validate/dig into this more:
DNS – What is the hostname or custom domain you are trying to access? If you are simply using an IP you can skip this step. First validate is the correct hostname resolving to the expected IP.
- Under Kudu Console -> Debugging Console -> CMD use the command nameresolver to validate that the hostname is returning the correct IP against the expected DNS server. If it’s not try using nameresolver domain IPofDNSServer as described earlier in case for some reason the app is not targeting the expected DNS server.
- Lastly if it’s still failing, make sure any other domain that should be working is resolving. If this is failing: – Confirm what DNS server the app is using, if you aren’t sure use the nameresolver domain IPofDNSServer
– Try step #2 below and tcpping IPofDNSServer:53 to validate the app has connectivity to the DNS server.
– If that is failing try targeting another well known DNS server to see if something like www.microsoft.com is resolving.
– If this is failing check the network path and the DNS servers. If you have a secondary try that DNS server as well.
2.Nameresolver.exe : This command is similar to nslookup where it will do a DNS lookup against the DNS server that is configured for the web app. By default, a standard app service will use Azure DNS. If the App Service is configured with VNET integration ( includes both ASE types ), it will use your custom DNS servers configured for the VNET.
To specify a different DNS server to complete the lookup on, add the IP address of the server after the hostname separated by a space, ie “hostname <DNS Server IP>”.
Please check out the detailed suggestions outlined by one of my colleague, in his personal blog: https://blog.brooksjc.com/2021/09/17/app-service-network-debugging/