Closed
Description
- [X ] I have tried with the latest version of my channel (Stable or Edge)
- [ X] I have uploaded Diagnostics
- Diagnostics ID: CB3B5F00-CC2A-4D76-8AD4-A84151BE59A1/20200521112149
Expected behavior
Expect Docker to start.
Actual behavior
ts crashing each time I attempt to start it after selecting the new option to use WSL2 containers on Windows 10 (Build 2004 - Insider build).
Information
Startup Error produced by Docker
System.IO.IOException:
The process cannot access the file 'C:\Users\john.oconnor\AppData\Local\Docker\vm-config\config.iso' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Docker.Engines.IsoConfig.DeleteIso() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\IsoConfig.cs:line 220
at Docker.Engines.IsoConfig.CreateIso(Settings settings, JObject jsonConfig, Boolean rawJson) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\IsoConfig.cs:line 112
at Docker.Engines.WSL2.WSL2Configurator.PrepareConfiguration(Settings settings) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Configurator.cs:line 19
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__23.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 98
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
Steps to reproduce the behavior
- Start Docker Desktop
Activity
jcoconnor commentedon May 21, 2020
So - tried uninstalling and re-installing Docker Desktop - different error this time.
See Also #6727
jcoconnor commentedon May 21, 2020
3rd time luck - docker started this time and I'm able to run containers.
All working again.
rfc1985 commentedon May 27, 2020
Same issue after update to build 2004 (19628).
Tried to reinstall stable/edge version of docker multiple times with same result.
Steps already tried:
Only if I deactivate "Use the WSL 2 based engine", the docker does not crash.
But the wsl2 feature cannot be used as expected.
Error message:
`WSL distro stopped while waiting for Lifecycle server.
simonferquel commentedon May 28, 2020
@jcoconnor sorry about those crashes.
@rfc1985 can you send me a diagnostic ? for some reason, some necessary files necessary for WSL 2 are not reachable at the expected location from the wsl distro.
simonferquel commentedon May 28, 2020
see Error: mounting wslCLIDest: stat /mnt/host/c/Program Files/Docker/Docker/resources/wsl/docker-wsl-cli.iso: no such file or directory.
rfc1985 commentedon May 28, 2020
Hi @simonferquel

here the diagnostic ID: 251936C6-FF59-4063-BF06-A62A76EF5D38/20200528093614
The Docker is installed in "C:\Program Files\Docker"
Docker so file is located in same path: "C:\Program Files\Docker\Docker\resources\wsl\docker-wsl-cli.iso"
It seems to be that the docker mount is failing.
If I open the path "\wsl$\docker-desktop\mnt\host\c" there is no content inside it.
Can I configure the docker mount somewhere?
jcoconnor commentedon May 28, 2020
@simonferquel
Thanks for the update - as I indicated - I was able to get it working after a few attempts and its been working fine ever since.
But good to see that you are sorting a patch on it as well 👍
simonferquel commentedon May 28, 2020
@rfc1985 can you show me the output of
wsl -d docker-desktop cat /proc/self/mountinfo
?rfc1985 commentedon May 28, 2020
simonferquel commentedon May 28, 2020
Ok, from this output, it seems that wsl2 failed to mount your Windows drives (you can see the first line saying it).
Can you run
wsl.exe -u root dmesg
? You might find interesting things in those logs.rfc1985 commentedon May 28, 2020
Nothing special.
[ 0.081311] Microsoft 4.4.0-19628.1-Microsoft 4.4.35
rfc1985 commentedon May 28, 2020
I have a fix for the mount issue inside my Ubuntu-18.04 WSL2 by mount the drives manually after boot up.
Unfortunately I can't do this for windows docker, because it crashes at start.
simonferquel commentedon May 28, 2020
@benhillis any clue about why Windows files fail to mount ?
benhillis commentedon May 28, 2020
@simonferquel - yes, we have some fixes inbound to Insider builds. 2004 should not be affected.
comedinha commentedon May 28, 2020
I formatted the computer and the problem persists.
Few seconds after receive this problem the machine crash with error: HYPERVISOR_ERROR
8 remaining items
blue7wings commentedon Jun 10, 2020
thank you man, I shutdown and delete DockerDesktopVM from Hyper-V Manager , and restart Docker, everything is ok.
exkalation commentedon Jun 11, 2020
I just experienced the same error right after Windows startup. After opening a WSL2 Ubuntu terminal, starting Docker Desktop worked. Just in case somebody might find this helpful.
IITII commentedon Jun 13, 2020
I simplely resolve this problem by following steps:
service.msc
which should be calledcom.docker.service
wsl --shutdown
Expose Daemon on tcp://lcoalhost:2375 without tls
.Good luck.
jkonowitch commentedon Jun 15, 2020
Following @IITII 's steps fixed the issue for me.
JimNolan commentedon Jun 23, 2020
I "ejected" the virtual dvd created during the docker installation and then re-ran startup and it ran fine.
StoneyEagle commentedon Jul 18, 2020
I just ran into this issue and the options above did not solve my issue.
I had to use a program that is capable of unlocking files and deleting files on reboot.
Lockhunter will let you force delete the config file and allows you to start docker.
I have ben using this program for docker for a while since docker likes to lock files that i am working with.. even mounted files and folders.
Hope this helps anyone.
Dennis-Petrov commentedon Jul 22, 2020
Greetings.
The same issue.
Diagnostic ID: 7F3EE248-FF03-4D3D-B0C3-6A2ED025AC5F/20200722073734
mwalol commentedon Jul 22, 2020
i just reinstalled the package to fix this issue after the upgrade.
gondaz commentedon Aug 4, 2020
For all the googlers who bumped into the same issue with a WSL2/Docker stack, try to follow the steps that mentioned by @IITII above.
That worked like a magic for me, too. Thank you!
docker-robott commentedon Nov 3, 2020
Issues go stale after 90 days of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale
comment.Stale issues will be closed after an additional 30 days of inactivity.
Prevent issues from auto-closing with an
/lifecycle frozen
comment.If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale
docker-robott commentedon Jan 2, 2021
Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked