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 (redirects to localhost and hits ERR_CONNECTION_REFUSED) #26199

Closed
dsteeley opened this issue Apr 19, 2023 · 5 comments
Closed

az login (redirects to localhost and hits ERR_CONNECTION_REFUSED) #26199

dsteeley opened this issue Apr 19, 2023 · 5 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Graph az ad question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@dsteeley
Copy link

Describe the bug

Similar to other recent issues but slightly different symptoms. I run az login, follow through the interactive login process and the oauth flow redirects me to localhost: where I hit an ERR_CONNECTION_REFUSED.
Using edge browser.
--use-device-code does work.

From the debug logs there is also a link to localhost:?error=abort which I've tested and still hit an ERR_CONNECTION_REFUSED.
It looks to me like az is unable to open a connection on localhost: which is leading to this issue. I'm concerned about this as I later tried to run az ad group list --debug and hit issues relating to my device not being managed which I've previously never hit so suspect it's a symptom of the same issue.

Command Name
az login

Errors:

Paste here the error message you have received. Make sure to remove all sensitive information,
such as user name, password, credential, subscription ID, etc.

To Reproduce:

  • az login --debug

Expected Behavior

Environment Summary

Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.6 LTS
Python 3.10.10
Installer: DEB

azure-cli 2.47.0

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional Context

@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 Apr 19, 2023
@ghost ghost assigned jiasli Apr 19, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 19, 2023

Thank you for opening this issue, we will look into it.

@ghost ghost added this to the Backlog milestone Apr 19, 2023
@ghost ghost added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Graph az ad labels Apr 19, 2023
@cclark-work
Copy link

cclark-work commented Apr 19, 2023

Getting the same thing running in Ubuntu 22.04 in WSL2
azure-cli is already the newest version (2.47.0-1~jammy)

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

It opens the browser window and prompts me for my username, I click on it and then it redirects to something like this:
http://localhost:37703/?code=<very long token> ... &state=ASDFjklasdf&session_state=<guid>

As a further test, I uninstalled 2.47 and went back to 2.40 and the same thing happened.

@bebound
Copy link
Contributor

bebound commented Apr 20, 2023

I guess this is the same as #26180

@jiasli jiasli closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@jiasli
Copy link
Member

jiasli commented Apr 20, 2023

Duplicate of #26180

@jiasli jiasli marked this as a duplicate of #26180 Apr 20, 2023
@cclark-work
Copy link

Yes, as mentioned in #26180 executing wsl --update --pre-release to get the patch has worked for me

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 Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Graph az ad question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants