Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az login interactive goes to a localhost link that can't be reached #22377

Open
ammarasmro opened this issue May 12, 2022 · 4 comments
Open

az login interactive goes to a localhost link that can't be reached #22377

ammarasmro opened this issue May 12, 2022 · 4 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request
Milestone

Comments

@ammarasmro
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az login

Errors:
Chrome returning:

This site can’t be reachedlocalhost refused to connect.
Try:

Checking the connection
[Checking the proxy and the firewall](chrome-error://chromewebdata/#buttons)
ERR_CONNECTION_REFUSED

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

Expected Behavior

Environment Summary

Linux-5.4.0-1074-azure-x86_64-with-glibc2.27, Ubuntu 18.04.6 LTS
Python 3.8.13
Installer: DEB

azure-cli 2.36.0

Extensions:
ml 2.3.1

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context

This happens when I try to do anything azure related through an AzureML compute instance. It opens up the interactive screen. I click on my account and it goes to a localhost:... link and gives the error above. I can curl that link from a terminal in the machine and it seems to return a success but the cli doesn't get the response and keeps waiting

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels May 12, 2022
@ghost ghost assigned jiasli May 12, 2022
@ghost ghost added this to the Backlog milestone May 12, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented May 13, 2022

@jiasli for awareness

@ammarasmro
Copy link
Author

For reference, a workaround that I used

az login --use-device-code
pip install azure-cli-core

Then loading the workspace says something about falling back to CLI credentials and avoids the interactive window

More context: I tried 3-4 different versions of azureml-sdk and tried different conda envs (including the one provided by azure, still same thing). Updated VSCode, restarted computer and VM, still not working. Today I had a coworker who had the same problem

@jiasli
Copy link
Member

jiasli commented May 13, 2022

This is more of a local configuration issue and could be similar to #10426

Is your browser trying to reach localhost on HTTPS? Or do you have any config/firewall/hosts that blocks localhost?

@ammarasmro
Copy link
Author

Oh I actually tried that issue already, didn't work. Mine is going to:

http://localhost:port/.....

I tried the same script locally (not on the azureml VM) and interactive login worked without a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request
Projects
None yet
Development

No branches or pull requests

3 participants