Network connectivity issue between the Azure function and the external web service.

Ratan Agarwal 6 Reputation points
2022-10-04T06:12:17.237+00:00

One or more errors occurred. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (domain:port))

We executed the command tcpping endpoint-url:port and got time out.

How do we resolve access restriction to external domain from Azure function app (Consumption plan)? It is working fine from another azure account having same plan (Consumption plan).

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,253 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 41,916 Reputation points
    2022-10-04T08:05:03.083+00:00

    Hi Ratan,

    Check this thread with similar issue and resolution was to create a NAT gateway. httptrigger-function-app-can39t-access-external-ur.html

    Hope this helps.

    ==
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


  2. MuthuKumaranMurugaachari-MSFT 22,141 Reputation points
    2022-10-05T15:31:31.657+00:00

    @Ratan Agarwal Thank you for reaching out to Microsoft Q&A. Based on your statement, I assume that dev Function app (Consumption plan) and test Function app (Consumption plan) were pointing to same external web service i.e., URL/port, but test Function App seems to be having the issue. Please correct if test is pointing to different URL.

    You are correct that there are no Outbound IP restrictionss in Consumption plan and cannot create NAT gateway. Since tcpping got timed out, I suspect the connection is being blocked on external webservice/firewall and it might be due to IP restrictions on their end. Please note, function app outbound IP addresses may change during scaling that could cause the connections being blocked and hence we recommend adding entire data center to allowlist-list as described below: https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?tabs=portal#find-outbound-ip-addresses

    247842-image.png

    You can try the recommendation and let us know if you still face the issue. We can then determine the next steps to investigate otherwise, please confirm if it resolves the issue.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.