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

default DNS server has some problems with Github Copilot extension in VSCode in WSL when using fixed internet #11729

Open
1 of 2 tasks
copdips opened this issue Jun 26, 2024 · 7 comments
Labels

Comments

@copdips
Copy link

copdips commented Jun 26, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3737]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 20.04

Other Software

VSCode Github Copilot extension

Repro Steps

Github Copilot extension in VSCode cannot connect

This is my DNS conf:

> cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 10.255.255.254
search home

changing it to resolved my issue

> cat /etc/resolv.conf 
nameserver 1.1.1.1
nameserver 10.255.255.254
search home
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 10.255.255.254/32 brd 10.255.255.254 scope global lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:4c:04:f5 brd ff:ff:ff:ff:ff:ff
    inet 172.27.15.111/20 brd 172.27.15.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fe4c:4f5/64 scope link
       valid_lft forever preferred_lft forever

nslookup:

> nslookup
> www.github.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
www.github.com  canonical name = github.com.
Name:   github.com
Address: 140.82.121.3
> server 10.255.255.254
Default server: 10.255.255.254
Address: 10.255.255.254#53
> www.github.com
Server:         10.255.255.254
Address:        10.255.255.254#53

Non-authoritative answer:
www.github.com  canonical name = github.com.
Name:   github.com
Address: 140.82.121.3
> 

And the DNS on the host Window OS:

PS C:\Users\xiang> Get-NetIPConfiguration

InterfaceAlias       : Wi-Fi
InterfaceIndex       : 4
InterfaceDescription : Intel(R) Wi-Fi 6 AX201 160MHz
NetProfile.Name      : contoso
IPv6Address          : xxxxxxx
IPv4Address          : 192.168.111.47
IPv6DefaultGateway   : fe80::d6f8:29ff:fe80:78c0
IPv4DefaultGateway   : 192.168.111.1
DNSServer            : 2a01:cb08:e25:1700:d6f8:29ff:fe80:78c0
                       fe80::d6f8:29ff:fe80:78c0
                       192.168.111.1

InterfaceAlias       : Ethernet 2
InterfaceIndex       : 5
InterfaceDescription : Realtek USB GbE Family Controller microsoft/vscode#2
NetAdapter.Status    : Disconnected

InterfaceAlias       : Connexion réseau Bluetooth
InterfaceIndex       : 8
InterfaceDescription : Bluetooth Device (Personal Area Network)
NetAdapter.Status    : Disconnected

InterfaceAlias       : Connexion au réseau local 2
InterfaceIndex       : 23
InterfaceDescription : OpenVPN Data Channel Offload
NetAdapter.Status    : Disconnected

InterfaceAlias       : Astrill VPN
InterfaceIndex       : 25
InterfaceDescription : Wintun Userspace Tunnel
NetAdapter.Status    : Disconnected

I raised this issue because I come from here.
It seems that the default name server 10.255.255.254 has some problems with github copilot domains.

When I connect my same laptop to mobile internet, the issue is resolved.
The problem only occurs when my laptop is connected to a fixed network and using WSL.
Additionally, VSCode on Windows (outside of WSL) on the same laptop does not have any issues with github copilot.

And the problem occurs since 1 or 2 months ago.

Expected Behavior

Github Copilot can connect

Actual Behavior

Github Copilot cannot connect

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please 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!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@copdips copdips changed the title what is my DNS server default DNS server has some problems with Github Copilot extension in VSCode in WSL Jun 26, 2024
Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please 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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@copdips copdips changed the title default DNS server has some problems with Github Copilot extension in VSCode in WSL default DNS server has some problems with Github Copilot extension in VSCode in WSL when using fixed internet Jun 26, 2024
Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please 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!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@copdips
Copy link
Author

copdips commented Jun 26, 2024

please find hereunder the dns logs:

WslLogs-2024-06-27_00-41-21.zip

Copy link

Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0

@NehalDamania
Copy link

Facing the same issue. For me, even after adding the nameserver 1.1.1.1, github copilot and few other extension in vs code like gitlens launchpad still does not work. Works perfectly fine on Mobile internet connection or on Windows directly without WSL

@OneBlue OneBlue added the network label Jul 9, 2024
@CatalinFetoiu
Copy link
Collaborator

thanks for reporting the issue

Please follow the networking diagnostic script to collect logs. https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

It should create a folder like [WslNetworkingLogs-date_ver.zip]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants