microsoft / microsoft/vscode-remote-release
Port forwarding should support IPv6
@alexr00 is already working on this.
Since Aug 10, 2022.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version:
1.70.0 - Local OS Version:
Microsoft Windows [Version 10.0.19043.1826] - Remote OS Version:
Ubuntu 20.04.4 LTS - Remote Extension/Connection Type:
Containers - Logs:
N/A
Steps to Reproduce:
-
clone the project & open with vscode
git clone https://github.com/doggy8088/devcontainer-dotnet-mssql-ipv6-issue.git code devcontainer-dotnet-mssql-ipv6-issue -
Reopen in Container
-
Here is the
PORTSinfo.
-
Connect to
localhostlocally usingsqlcmdsqlcmd -S localhost -U sa -P P@ssw0rd -Q "SELECT 1;"It will result:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. . Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. -
Connect to
127.0.0.1locally usingsqlcmdsqlcmd -S 127.0.0.1 -U sa -P P@ssw0rd -Q "SELECT 1;"It will run successfully.
----------- 1 (1 rows affected)
I really expected I can connect to the db container using localhost. It because the PORTS shows that.
During few hours research, I realized that Windows use IPv6 by default. When VSCode use IPv4 to do the port forwarding, connect to localhost will route to ::1 and it will failed.
Two suggestions:
-
Change the
Local Addressto show127.0.01:1433on thePORTSwindow. -
Port forwarding support
IPv6.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.