-
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
Docker daemon fails with following output #2291
Comments
Microsoft Windows [Version 10.0.15063] Within the Bash on Ubuntu on Windows environment I successfuly installed docker.io with apt. Subsequently I try to activate a docker container following https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/udacity Thereafter I get bash telling me the docker daemon is not running. Trying to run dockerd (the daemon) result in the following output:
|
Please fill out the issue template above (especially what version of Windows you are using and what where the exact command that failed. That being said, I believe docker is not yet supported by wsl |
Are there any plans to add support for docker to wsl? Here's my information if it can be any help.
|
seeing the exact same issue as @HanJoHibender, I know it's not simple, but having docker run like that on windows, is a game changer. it would be amazing. (I don't have the Pro version on my home computer, and the vm based docker is a pain, and slow) |
+1 |
The version of docker you're using is obsolete. It's version 1.something. The current version is 17.something. |
I'm glad to say Docker daemon finally runs on WSL. I'm testing on build 17134. The most important part is dockerd will only run on an elevated console (run as Admin) and cgroup should be always mounted before running the docker daemon. The steps to install docker on Ubuntu Xenial are:
And every time you need to run the daemon, always on an elevated ubuntu.exe:
After that I tried these and did work:
It's important to note that docker version in Xenial repositories is moby 1.13.1 which would be docker-ce 17.02. The last docker-ce version that works right now on build 17134 is 17.09.0. Anything after that fails on extracting the docker images. Thanks to @targat1982's post on reddit |
That's great news! Unfortunately, jerry@PC:/mnt/c/Users/jerry/projects/my-project$ docker-compose up -d
Creating network "project_project" with driver "bridge"
ERROR: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.20.0.0/16 ! -o br-9e8373fca539 -j MASQUERADE: iptables: No chain/target/match by that name.
(exit status 1)) There is a problem with Please upvote here: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/32025199-support-iptables |
I tried to run a hello world example in the latest version of docker provided by Ubuntu Bionic (using lxrunoffline yes) and I ...
write(2, "9bb5a5d4561a: ", 149bb5a5d4561a: ) = 14
ioctl(1, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
write(2, "Extracting [===================="..., 79Extracting [==================================================>] 9) = 795B
futex(0xc4204d2148, FUTEX_WAKE, 1) = 1
write(2, "\33[1B", 4) = 4
read(3, 0xc420084000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x1693c08, FUTEX_WAIT, 0, NULL) = 0
docker: failed to register layer: Error processing tar file(exit status 1): invalid argument.
See 'docker run --help'.
epoll_pwait(4, <unfinished ...>
+++ exited with 125 +++ Perhaps it has some diagnostic? EDIT: Nevermind, I overlooked the solution above, by completely wiping docker and install 17.09.0 did work for me. Then I added |
@stevefan1999 Are you on build 17134? That problem was due non supported MS_SLAVE flag on mount. It was fixed in build 17666 Running docker from Bionic (docker-ce 17.12.1) on latest insider builds works but containerd-shim shows high CPU usage on idle. Probably some syscall that was stubbed but not implemented yet. |
@onomatopellan Exactly! I'm not using insider build though, nor will I be tempted to, as it's too risky to take but I can tolerate manually starting docker every time I start bash (better yet I can use an alias for one character boot). I wouldn't mind waiting till November for Autumn update for a better workaround. By the way, how do I switch another docker engine connection on my native windows? localhost:4243 is open and receiving, but docker keeps connecting to EDIT: Setting DOCKER_HOST in environment variable, just like usual *nix setup, did work. |
@stevefan1999 Even in latest builds running Dockerd inside WSL is right now for kicks and giggles. It's just not ready for normal usage (there are some problems with overlay2 driver) and it's just for testing where is the limit. Some scenarios work surprisingly well though, like the process of compiling docker from docker-ce repo which pulls and runs debian/ubuntu containers in order to create the binaries. |
@onomatopellan Can you document (in some blog or something) everything that has lit up with native Docker? Also, if there are several scenarios working then new issues should be opened for the fine-tune tweaking (such as eliminating high cpu usage) to get a fully functional docker engine in WSL. I wouldn't mind alittle more slowness compared to Windows if it was made to be not so unbearable but if not all scenarios are working yet, as you said, no point in running it other than giggles. |
@DarthSpock Portainer, for example, didn't work. I don't know the exact reason but |
@DarthSpock The reddit thread already has some issues people are finding out. Since I'm not a Docker expert and I can't compare it to Docker for Windows (no Hyper-V support) I just like to follow Docker tutorials and see how far I can get in WSL on latest insider builds. So far only the tutorial for compiling Docker-ce worked for me. I'd really love to see a fully functional docker engine in WSL. It looks like there is more work to do to fully implement iptables and cgroups. This tweet was a bit discouraging though, and It explains why sometimes the file system inside containers is erratic. |
Yeah, I recently mentioned it on Twitter and got a major "we aren't supporting this, we highly advise against it" message from our former WSL PM. Still if enough of it lights up, it would only make logical sense to put on the final touches. I'm curious where the cgroup implementation is coming from though since Docker obviously isn't the use-case (that they want to admit to anyways). As far as iptables go, yeah that would be great to have regardless of Docker. We can use it in a VM (even with Hyper-V) so WSL ought to be able to handle it but still have to wait for full-implementation. @stevefan1999 good to know. Glad there's some people out there able to use Insiders to test this. |
@DarthSpock Perhaps it is for the compliance to the Linux kernel, you know, cgroups is still in mainline after all, and that also means only a minimal viable set of functionalities are available. Also, I didn't expect Is there something wrong in the implementation or was that the syscall was delayed in Windows kernel translation level? But I'm more hyped to see |
Control groups are used extensively by a very large, popular, and highly requested package that doesn't run (well) in WSL right now. You could... almost... call it the number |
What is "chrome"? |
I don't think that's it. Would that be |
Systemd is PID1. Right now WSL uses a closed-source custom init due to that. |
I've been able to make it work by changing the sequence to:
In my own installation, it works everything, including commands without "--network host" option. Hope this helps. |
@marco6 can it run |
@Knedox , this works... but... But I have problems apparently with memory allocation. |
Windows Insider Fast Ring build (>=18917) via WSL2, latest docker/docker-compose is running native in WSL Linux.
$ docker --version $ service docker status
$ docker run --network host hello-world Hello from Docker! ... $ docker-compose up (ip address ---'d out) $ docker-compose images
|
Even better, you should set this parameter in the configuration file
No more |
perfect,it has sovled the problem that starting docker service with error bellow:
|
Thanks, I have been searching solutions even in 2019. The above steps are really helping! |
@duke-cliff Were you able to get this working with Windows 10 1909? I followed the same steps + disabling iptables, but I end up with:
|
@nirvdrum Ditto on this - I'm getting the same error with these steps. |
We installed Docker Desktop for Windows on my Windows 10 w/ WSL Ubuntu 1804.2019 and still receive the error: $ docker run --network host hello-world |
You probably need |
@MikeWilcoxMicrosoft See this thread for help: docker/for-win#5096 |
C:\WINDOWS\system32>ver root@:~/.kube# docker ps strace -o strace.txt -ff docker ps |
Hey guys, thank you for this thread! I'm glad I'm not alone in this! I'm running Windows 10 Pro Version 1903 Build 18362:
I perfomed a reset of Ubuntu WLS with the following steps:
Then I launched Ubuntu WLS and typed these commands as suggested:
When I type the last one, I get the following "OK" output:
But then running "
Running Ubuntu WLS as Administrator doesn't change anything. If I close Ubuntu WLS and open it again, the error is the one we are discussing in this thread:
Any other suggestion to make docker running in Ubuntu WLS for Windows 10, and get rid of Docker Desktop (which it's a pain when handling data volumes due of permission issues etc)? |
Found this thread funnily enough because I was having issues starting Docker on a native Linux VM and I think the @numbworks , to try help you out here, I don't think you actually have an issue with what you've done/are doing except from one thing: Docker runs as the
which is correct and how it should be done (note, I used Docker then starts as root, preventing any other user from accessing the daemon. From the excerpt you shared above, you're trying to issue
or similar about permissions. This is the same behaviour that occurs on a native Ubuntu install; Docker runs as
You did mention that you tried running Ubuntu WLS as Administrator. Since I'm not familiar with WLS, does that drop you in to the terminal as EDIT 2: Just realised that you're issuing EDIT: The second issue you mentioned, you said you closed then reopened Ubuntu WSL and got the following:
Again, I'm not familiar with WSL but I would imagine that this (closing and reopening) is like a reboot of the system? Annoyingly, when Docker is installed, despite installing In either case, try to check if Docker is still running after re-opening Ubuntu WLS by issuing Hope that helps! |
I just installed Docker For Windows using the WSL2 on Windows 10 Home - would this issue explain why my app in a Docker container barfs with this error:
as far as I can tell without cgroups and systemd all the typical tools to raise the thread limits don't exist. |
Just highlighting this note. I have missed it initially. Ensure your WSL terminal is running on elevated console |
For now I can run |
If you are getting "Error creating default "bridge" network: permission denied", this helped: https://stackoverflow.com/a/59671572/7083698 Basically, I needed /etc/docker/daemon.json to have:
|
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! |
This bug-tracker is monitored by developers and other technical types. We like detail! So please use this form and tell us, concisely but precisely, what's up. Please fill out ALL THE FIELDS!
If you have a feature request, please post to the UserVoice. If you're reporting a BSOD, don't post here! Instead, e-mail "[email protected]", and if possible attach the minidump from "C:\Windows\minidump".
Your Windows build number: (Type
ver
at a Windows Command Prompt)What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
What's wrong / what should be happening instead:
Strace of the failing command, if applicable: (If
<cmd>
is failing, then runstrace -o strace.txt -ff <cmd>
, and post the strace.txt output here)See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: