Azure-cli: failure on az login --identity

Created on 31 May 2019  路  3Comments  路  Source: Azure/azure-cli

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az login

Errors:

HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10325def0>: Failed to establish a new connection: [Errno 60] Operation timed out'))
Traceback (most recent call last):
python3.7/site-packages/urllib3/connection.py, ln 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
...
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10325def0>: Failed to establish a new connection: [Errno 60] Operation timed out'))

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • _Put any pre-requisite steps here..._
  • az login --identity

Expected Behavior

Environment Summary

Darwin-18.0.0-x86_64-i386-64bit
Python 3.7.3
Shell: bash

azure-cli 2.0.64 *

Additional Context


Account needs-triage

Most helpful comment

You should only run this inside Azure virtual machine with identity. We can call out in the help, and also fail early if we detect you are not inside VM

All 3 comments

I might be wrong but this look like a network issue

cc: @marstr and @yugangw-msft

169.254.169.254 is a reserved IP address which is not internet routable. Why does the az need to talk to it? Is there some setup I need to do first?

You should only run this inside Azure virtual machine with identity. We can call out in the help, and also fail early if we detect you are not inside VM

Was this page helpful?
0 / 5 - 0 ratings