question

bruno-7362 avatar image
0 Votes"
bruno-7362 asked tbgangav-MSFT commented

Azure Arc - AZCM0066: Unable to Obtain Agent Status error

When trying to activate Azure arc on a server, I get the following error:

AZCM0066: Unable to Obtain Agent Status error

msg="Get \"http://localhost:40342/agentstatus\": dial tcp [::1]:40342: connectex: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte."

Does anybody have an idea for the problem causing this?

azure-arc
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

tbgangav-MSFT avatar image
1 Vote"
tbgangav-MSFT answered tbgangav-MSFT commented

Hi @bruno-7362,

I understand that you are trying to activate Azure arc on a server but you are getting the error "AZCM0066: Unable to Obtain Agent Status error".

This generally happens when "localhost" is resolved to the "::1" address which is the IP v6 loopback address.

If you are not using IPv6 as a server then you should edit the /etc/hosts file and remove the entry "::1 localhost" then it resolves the error.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @tbgangav-MSFT ,


Great reply!
In the hosts file the commented line for ipv6 loopback address (the line starts with "#" if it is in comment) was altered.
So the # was removed, after adding the line back as in comment (by adding the "#"), the problem was resolved.

Thanks again, was stuck on this for a couple of days.

0 Votes 0 ·

Hi @bruno-7362,

Glad to know that the problem is resolved.

0 Votes 0 ·