-
Notifications
You must be signed in to change notification settings - Fork 821
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
[WSL2] Cannot access windows service running on host from a container using host.docker.internal
#6364
Comments
You should try without adding the |
@simonferquel indeed it does seem to resolve properly without the
Behavior seems wrong so I'll let that open for now. |
Hi There, r = adapter.send(request, **kwargs)
File "/opt/bitnami/python/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='host.docker.internal', port=30002): Max retries exceeded with url: /api/v1/datastore/write (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fdbccf2e130>: Failed to establish a new connection: [Errno -2] Name or service not known'))
127.0.0.1 - - [18/Feb/2021 03:48:40] "POST /api/v1/user/ HTTP/1.1" 500 - |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Environment
It's running on a clean Windows10 install followed by a docker desktop 3.0 setup and a
docker-compose up -d
.Steps to reproduce
Start a service on the windows host:
Run a container with a bind on host-gateway:
Try to curl the windows host inside (
/etc/hosts
properly has192.168.65.1 host.docker.internal
):Expected behavior
Working access according to the WSL docs: Accessing Windows networking apps from Linux (host IP)
So not sure if the docs are outdated (WSL1?) or if I have something misconfigured but this is on a clean install and with Windows Defender turned off.
Actual behavior
Does work if I use the
vEthernet (WSL)
ip (eg.curl http://172.27.64.1:8080
), but since it changes at every restart and I haven't found a reliable way to expose this IP address to my container, I'm stuck.The text was updated successfully, but these errors were encountered: