VNET intermittent connection problem between Function App and Docker Instance - "No connection could be made because the target machine actively refused it"

Rob 111 Reputation points
2020-10-15T17:09:02.45+00:00

I'm running an Azure dot net function app and a docker instance in an Azure VNET.

The docker instance has a private IP of 10.1.0.4 and is running AVclam on 3310 but the function app fails 9 times out of 10 with the following error,
"No connection could be made because the target machine actively refused it".

I've changed the function app to use

  var clam = new TcpClient(AddressFamily.InterNetwork);

but this has had no effect. I'm running out of things to try, any suggestions on how to discover the problem and make this connection reliable?

Thanks

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
706 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,005 questions
0 comments No comments
{count} vote

Accepted answer
  1. Rob 111 Reputation points
    2020-11-18T17:21:48.133+00:00

    After clutching at straws and trying a number of things I managed to get this working successfully in the VNET. It turned out to be a problem with the docker image. While it seemed to work pretty reliably outside the VNET it did not work reliably inside the VNET. After replacing the docker image with a smaller AVClam image its now working reliably, without fail inside the VNET.

    2 people 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.