Skip to content

WSL2 sock bind error: 38 function not implement #9587

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

Closed
1 of 2 tasks
wangjf78 opened this issue Feb 4, 2023 · 6 comments
Closed
1 of 2 tasks

WSL2 sock bind error: 38 function not implement #9587

wangjf78 opened this issue Feb 4, 2023 · 6 comments

Comments

@wangjf78
Copy link

wangjf78 commented Feb 4, 2023

Version

Windows version: 10.0.19044.2546

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.83.1

Distro Version

Ubuntu-18.04

Other Software

Docker ce 23.0.0
minikube version: v1.28.0 (with k8s 1.23)
VSCode

Repro Steps

Start minikube , deploy some workload

Running after 2-3 hours.

Any call to sock bind will report errorno 38

Expected Behavior

In docker / K8S bind a server sock

In WSL, bind a server sock

e.g. : python -m http.server

Actual Behavior

In docker / K8S tcp sock bind return errorno 38

docker run nginx:alpine will cause :
bind: 38: function not implemed

In WSL, any tcp sock bind call return errno 38
python -m http.server

bind: errorno 38

Diagnostic Logs

No response

@wangjf78
Copy link
Author

wangjf78 commented Feb 4, 2023

WslLogs-2023-02-04_15-20-51.zip

grafana/loki in K8S Error:
listen tcp :80: bind: function not implemented
error initialising module: server
github.com/grafana/dskit/modules.(*Manager).initModule
/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:122

attach to container :
$ docker exec -it kube-nginx-1 sh
failed to create runc console socket: listen unix /tmp/pty431848913/pty.sock: bind: function not implemented: unknown

$ python -m http.server
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.6/http/server.py", line 1211, in
test(HandlerClass=handler_class, port=args.port, bind=args.bind)
File "/usr/lib/python3.6/http/server.py", line 1185, in test
with ServerClass(server_address, HandlerClass) as httpd:
File "/usr/lib/python3.6/socketserver.py", line 456, in init
self.server_bind()
File "/usr/lib/python3.6/http/server.py", line 136, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.6/socketserver.py", line 470, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 38] Function not implemented

@OneBlue OneBlue assigned ghost Feb 7, 2023
@cerebrate
Copy link

I've had similar bind: function not implemented errors in a variety of applications recently using some of the pre-release versions of WSL from here (1.1.2 for certain). It cleared up on reverting to 1.0.3, and since trying out the 1.1.3 pre-release I haven't had a recurrence of the issue.

@ghost
Copy link

ghost commented Feb 16, 2023

@wangjf78, In the future please let the log collection run while reproducing the issue, else there isn't anything for me to see. It only collects logs from events while it is running (not a time machine).

Else go ahead and try 1.1.3

@wangjf78
Copy link
Author

I had update to 1.1.3 in last 2 days. It's worked, thanks !

@ghost
Copy link

ghost commented Feb 21, 2023

/dupe #9508

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

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

No branches or pull requests

2 participants