-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
I get the following error after logging in.
PS > az login
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"
You have logged in. Now let us find all the subscriptions to which you have access...
Error occurred in request., ConnectionError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /tenants?api-version=2016-06-01 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x04D537D0>: Failed to establish a new connection: [WinError 10060] 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',))
Traceback (most recent call last):
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\connection.py", line 159, in _new_conn
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\util\connection.py", line 80, in create_connection
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\util\connection.py", line 70, in create_connection
TimeoutError: [WinError 10060] 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
If I set https_proxy variable :
PS > az login
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"
You have logged in. Now let us find all the subscriptions to which you have access...
Error occurred in request., ProxyError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /tenants?api-version=2016-06-01 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))
Traceback (most recent call last):
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\connectionpool.py", line 594, in urlopen
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\connectionpool.py", line 805, in _prepare_proxy
File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-install-bsrj0zf4\urllib3\urllib3\connection.py", line 308, in connect
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\http\client.py", line 919, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required
If I set https_proxy variable with the wrong proxy (i.e. non existent ip address) then the error is this:
PS > az login
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/token (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x052ABEF0>: Failed to establish a new connection: [WinError 10060] 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',)))
I have closed and reopened powershell after changes to env variables
The behaviour is the same on the command prompt
To Reproduce
-
Az Login
-
Select appropriate account on browser window
-
Wait for error
Expected behavior
it should list the subscriptions i have access to
Environment summary
Windows 10 - 1803 - 17134.590
Used Msi file to install Az CLI
version - 2.0.59 - This is a guess based on the msi, az --version commands doesn't seem to provide any output (5 minutes and counting)
I have tried from both Command Prompt and PowerShell
I am behind a corporate proxy
Additional context