Azure Arc connected machine agent fails to connect with error: wsarecv: An existing connection was forcibly closed by the remote host.

Maya Butt 45 Reputation points
2023-02-15T23:54:34.78+00:00

When attempting to connect an onprem server to Azure ARC the process fails with an error:

(removed private info for security reasons)

ERROR Get "https://agentserviceapi.guestconfiguration.azure.com": read tcp <privateIP>:10091->13.66.149.68:443: wsarecv: An existing connection was forcibly closed by the remote host.

INFO Exit Code: AZCM0026: Network Error

INFO For troubleshooting, see https://aka.ms/arc/azcmerror

FATAL required endpoints unavailable: https://westus2-gas.guestconfiguration.azure.com,https://agentserviceapi.guestconfiguration.azure.com

Thinking this was a firewall issue, we had our network team investigate, however they are seeing the traffic going through to the internet from this machines IP, and being refused by the endpoint. There are multiple other servers on the same subnet that are able to connect with no issues. Network team assures me there is no special routing or rules for this particular client machine.

I ran the install again with the verbose logging and have the full output in a text file, but there isn't much more info that indicates what the problem might be. (attached in plaintext file)
I have also checked and made sure the service principal is correct and that the secret is not expired, and the other options such as resource group, tenant ID and subscription ID are all correct. Here is the command options I am using (again removed all the private information):

& "$env:ProgramFiles\AzureConnectedMachineAgent\azcmagent.exe" connect --resource-group "resource-group" --tenant-id "<tenant-id>" --location "westus2" --subscription-id "<subscription-id>" --cloud "AzureCloud" --tags "Datacenter=**" --correlation-id "correlation-id" --verbose

Called remotely via powershell, also tried running locally on the server, same result)

Additional Info:

Client is Windows Server 2019 VM running on VMware ESXi, 7.0.3
Azure connected machine agent is 1.25.02203.713

Any help or some clues where to look next would be greatly appreciated.

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
525 questions
{count} votes

Accepted answer
  1. Peter Jensen (Insight Global, Inc) 80 Reputation points
    2023-06-08T14:14:10.23+00:00

    I wonder, do you do any packet inspection?

    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.