How to fix getaddrinfo ENOTFOUND DNS issue on Node.js Azure Functions App?

Tommi Laukkanen 115 Reputation points
2023-10-18T12:46:13.6666667+00:00

We are trying to call external Azure App Service from our Node.js Azure Functions app. We have these ENOTFOUND errors in couple of environments in North Europe where it can't resolve the address for given URL eventhough it is available and can be used without issues from local laptops or other environments. Are there some known DNS issues with Node.js Azure Functions Apps? Any ideas how to troubleshoot this better if this is caused by App Plan server that is hosting the functions app?

Exception while executing function: Functions.OurFunction Result: Failure
Exception: getaddrinfo ENOTFOUND our-other-site.azurewebsites.net
Stack: Error: getaddrinfo ENOTFOUND our-other-site.azurewebsites.net
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)

Note: we have real site in place of "our-other-site" that actually exists.

If I login to the Function App server with Development Tools > SSH and try e.g. nslookup it does return the IP address etc. without issues.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,929 questions
{count} votes

Accepted answer
  1. Mirosław Jedynak 80 Reputation points
    2023-10-18T18:13:02.7933333+00:00

    Same here. Issues in North Europe but moving instance to West Europe helped

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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