-
Notifications
You must be signed in to change notification settings - Fork 863
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
Autogenerated /etc/resolv.conf has invalid nameserver leading to issues like az login failures #12587
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running. Diagnostic information
|
Attaching WSL logs again |
Diagnostic information
|
@shivshanks switch to WSL info:
In mirrored mode there are lots of error messages on the debug console, like:
|
I am using NAT. |
I am suddenly seeing the same issue; dns does not work at all within WSL2 unless I change the resolv.conf, which is pointing at the IP of the Ethernet adapter vEthernet (WSL) that I can see in ipconfig on the host. I haven't updated anything recently, so I'm uncertain why this suddenly started failing. |
Ack here; me and another member of my team have the same issue, precisely. @craigloewen-msft we need to resolve this; it's a blocker. I, too, am using NAT. |
Hi folks, We have root caused this to be an issue related to Global Secure Access. For now there is a work around to disable Thank you! |
In case anyone isn't sure how to configure this setting,
|
Windows Version
Microsoft Windows [Version 10.0.26100.3194]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Ubuntu 22.04.5 LTS
Other Software
azure-cli 2.69.0
Repro Steps
curl to https://login.microsoftonline.com/organizations and various other Microsoft sites hang leading to issues with az login on WSL. See this issue originally filed against az-cli -
Azure/azure-cli#30763
The problem seems to be that the auto generated /etc/resolv.conf has a nameserver in the private IP range like 10.255.255.x instead of picking the right one from Windows. It does have the correct search entries.
Expected Behavior
The auto generated /etc/resolv.conf should have a nameserver that is configured in Windows.
Actual Behavior
curl to https://login.microsoftonline.com/organizations and various other Microsoft sites hang.
Diagnostic Logs
~$ az login --use-device-code --debug
cli.knack.cli: Command arguments: ['login', '--use-device-code', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f2b509fb740>, <function OutputProducer.on_global_arguments at 0x7f2b5074e700>, <function CLIQuery.on_global_arguments at 0x7f2b50793c40>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: Total (1) 0.001 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f2b4f9bade0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/shivram/.azure/commands/2025-02-12.15-46-23.login.631.log'.
az_command_data_logger: command args: login --use-device-code --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f2b4f9fbd80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f2b4fa2e160>, <function register_cache_arguments..add_cache_arguments at 0x7f2b4fa2e2a0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f2b4fa2e340>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f2b5074e7a0>, <function CLIQuery.handle_query_parameter at 0x7f2b50793ce0>, <function register_ids_argument..parse_ids_arguments at 0x7f2b4fa2e200>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/shivram/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/shivram/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
The text was updated successfully, but these errors were encountered: