Docker Desktop fails to start/run on Windows startup
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID:
CEE7896D-A758-4E58-87F1-61F5D73B9549/20210419001522(after a restart to "stable" state) - Diagnostics ID:
CEE7896D-A758-4E58-87F1-61F5D73B9549/20210423174133(after Windows startup in "unresponsive" state)
Actual behavior
Docker fails to start on Windows startup. This can be witnessed when the Docker icon in the taskbar tray stops animating without the "containers" shown on the icon. When trying to open the UI for Docker Desktop, it doesn't even open or loads infinitely. Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
Expected behavior
Docker Desktop starts and stays in an "operative" state
Information
- Windows Version:
Windows 10 Pro 20H2 - Build 19042.928 - Docker Desktop Version:
3.3.1 (63152) - WSL2 or Hyper-V backend?
WSL 2 based engine - Are you running inside a virtualized Windows e.g. on a cloud server or a VM:
No - Kubernetes is not installed
- Experimental Features are not shown in the UI, but seem to be enabled in the JSON under "Docker Engine" - a change and a reboot after that does not have any effects.
- Addition (21st of April 2021): It seems that my WSL 2 environment seems to take some more time at Windows startup to be ready. That might be a cause for this problem, or is a follow-up problem
I am using Docker solely in my WSL 2 environment which has an Ubuntu 20.04 installed.
Checking error log files in %localappdata%\Docker\log.txt seem not to hint at anything I could work with:
[02:10:38.196][GoBackendProcess ][Info ] msg="accepted data connection on unix:\\.\pipe\dockerVpnkitData" [02:10:38.203][GoBackendProcess ][Error ] msg="error accepting multiplexer data connection: The pipe is being closed." [02:10:38.203][GoBackendProcess ][Info ] msg="listening on unix:\\.\pipe\dockerVpnkitData for data connection" [02:10:38.203][GoBackendProcess ][Info ] msg="DNS: UDP server has connected" [02:10:38.203][GoBackendProcess ][Warning] msg="ignored error: EOF"
[02:10:58.682][VpnKitBridge ][Error ] msg="windows: ssh-auth: cannot compute local path of service. Is the VM vpnkit-bridge out-of-sync with the host?" [02:10:58.682][VpnKitBridge ][Error ] msg="windows: osxfs-data: cannot compute local path of service. Is the VM vpnkit-bridge out-of-sync with the host?"
[02:11:01.124][VpnKit ][Error ] vpnkit.exe: Starting to watch : EINVAL [02:11:01.124][VpnKit ][Error ] vpnkit.exe: Failed to watch hosts file : invalid argument ... [02:11:01.128][VpnKit ][Error ] vpnkit.exe: While watching /etc/resolv.conf: ENOENT ... [02:11:01.135][VpnKit ][Error ] vpnkit.exe: Pipe.listen: caught (Failure "Failed to connect vmnet device")
Steps to reproduce the behavior
- Start Windows and wait Docker Desktop and Docker service to start and run
- See Docker being in an unoperative state (Docker commands do not work, etc.)
I habe the same problem, since some days:
- Windows Version: Windows 10 Pro 20H2 - Build 19042.928
- Docker Desktop Version: 3.3.1
- WSL2 or Hyper-V backend? WSL 2 based engine
- Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No
- Diagnostics ID: 60E75FB0-7B8D-4333-83B1-B75108000EBD/20210419044416
The first days restarting the com.docker.service service fixes this issue. But now I must go to the Troubleshooting menu in Docker Desktop an "Clean / Purge data" for WSL2. After that, Docker works again, but only until the next restart.
I tried to reinstall WSL2 and also turn off fast startup in Windows, but this does not solve the problem.
The output of "wsl -l -v" after a restart is:
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop-data Stopped 2
docker-desktop Stopped 2
The docker icon in the taskbar not showing "the small container".
Same here
Windows Version: Windows 10 Pro 10.0.19041 Build 19041 Docker Desktop Version: 3.3.1 WSL2 or Hyper-V backend: WSL 2 based engine Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No
Similar to Abrueck. When I clean/purge data the WSL2 engine starts and everything seems to work again.
Same thing for me since 3.3.1 using Hyper-V. Cleaning data also solve the issue.
Here is my Diagnostics ID if it can help: 1D7DFA7F-F9AD-4393-9DEE-920993A35CC7/20210420110952
I had the same problems with 3.3.1 using WSL2.
Downgrading to 3.2.2, Reset to factory defaults and updating to 3.3.1 fixed it for me.
@CPTechnikVX Is it fixed permanently? The same procedure worked for me, but only until I rebooted the computer. Now, when I try to start Docker it hangs again. I then have to go back and reset to factory or purge, before I can start Docker
@CPTechnikVX Is it fixed permanently? The same procedure worked for me, but only until I rebooted the computer. Now, when I try to start Docker it hangs again. I then have to go back and reset to factory or purge, before I can start Docker
@chlillelund Unfortunately, I have the same behaviour. After a reboot it's broken again and I can't reach "Troubleshoot" anymore :-( But that happened only after I started using kubernetes again. No idea if there is a connection.
It seems to be an issue with WSL2. I had to disable from Windows Features, uninstall docker, restart, install docker again but at the moment it asks to deploy WSL2 I unchecked this and it worked. So I can confirm there is an issue with WSL2 and docker desktop for Windows. Do you know guys who should to report this bug?
@MSaracusti my bet would be this repo: https://github.com/microsoft/WSL/issues
I tried adding the following lines to my .wslconfig file
[wsl2]
guiapplications=false
but Docker started successfully only once. I don't think the changes made it work once. The proposal does not seem to solve my problem.
I am one step further. I found out that Docker only starts for me when I am connected to the company via VPN (domain controller?). I have disabled autostart, connect via VPN first after login and then start Docker. With version 3.2.x it still ran without VPN. No idea if that helps narrow down the cause.
This solved it for me.
https://github.com/docker/for-win/issues/1825#issuecomment-433719346
DockerCli.exe -SwitchDaemon
Same issue for me, even downgrading to 3.3.0 didn't help. Even if Docker Desktop starts up, at some point after that it will lose the connection somehow and is not able to restore it. I then have to purge all data and redeploy all containers and hope they work as expected. (all HpyerV Backend, no WSL whatsoever)
Diagnostic ID 9128567D-5F64-415B-AEC3-AC20E97D3825/20210422134148
Also; when this happens and I run docker container ls e.g. from CMD it shows Error reponse from Daemon: i/o timeout
I found the following line in the log which confuses me. I have neither WSL2 installed nor have I checked the "use WSL2" checkbox in docker.
Why is it trying to use it?
[15:49:36.484][GoBackendProcess ][Info ] GET failed with Get "http://unix/forwards/list": open \\.\pipe\dockerWsl2BootstrapExposePorts: Das System kann die angegebene Datei nicht finden.
Edit; I got it running after some purges and what I noticed is in the log the following lines are just repeating every couple of seconds. As I said, I don't use WSL2 and I do not have any VPN connections on the machine.
[16:26:36.658][GoBackendProcess ][Info ] GET failed with Get "http://unix/forwards/list": open \\.\pipe\dockerWsl2BootstrapExposePorts: Das System kann die angegebene Datei nicht finden.
[16:26:36.658][GoBackendProcess ][Info ] msg="external: GET /forwards/list 200 \"Go-http-client/1.1\" \"\""
[16:26:36.658][ApiProxy ][Info ] msg="proxy << GET /v1.40/containers/json?all=true (2.8309ms)\n"
[16:26:36.659][ApiProxy ][Info ] msg="proxy >> GET /v1.40/images/json\n"
[16:26:36.659][VpnKitBridge ][Info ] msg="error CloseWrite to: Die Pipe wird gerade geschlossen."
[16:26:36.662][ApiProxy ][Info ] msg="proxy << GET /v1.40/images/json (1.619ms)\n"
[16:26:36.662][VpnKitBridge ][Info ] msg="error CloseWrite to: Die Pipe wird gerade geschlossen."
[16:26:36.670][ApiProxy ][Info ] msg="proxy >> GET /v1.40/containers/json?all=true\n"
I am one step further. I found out that Docker only starts for me when I am connected to the company via VPN (domain controller?). I have disabled autostart, connect via VPN first after login and then start Docker. With version 3.2.x it still ran without VPN. No idea if that helps narrow down the cause.
As @CPTechnikVX indicated above, I too have found that if I connect to my company's VPN first, then Docker Desktop will start and appears to run normally. I can also confirm that version 3.2.x started and ran fine without the VPN being connected. Because I'm not on a team version, when 3.2.x is installed, it is automatically upgraded to 3.3.1 on the next reboot and the problem comes right back.
Also, when not connected to the VPN, the Docker Desktop (3.3.1) Settings Screen has a spinner on it that loads forever.
The support/diagnostics screen is able to load and I was able to register a successful diagnostic. This is in the "broken" mode where I'm not connected to the VPN and docker desktop will not successfully load:
Diagnostics ID: D02CCEDE-9F66-403C-8750-365AE8E7959B/20210422135409
Hope this helps.
I'm having the same issue. Version 3.2.2 will start and keep running, but I can't stop it from updating to a higher version.
3.3.0 and higher will only start (even immediately after a complete re-install) after resetting to factory settings. After any restart it fails again.
I'm also getting the error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. error from the cli.
From what I can tell there are two background processes that aren't starting: com.docker.proxy.exe and com.docker.wsl-distro-proxy.exe. After resetting to factory defaults these start up and everything works as expected.
Diagnostics Id: 08966A9E-4F41-4FBC-B95C-F3F994876D15/20210422233159
@stevenobird
Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
could you expand on this? I have restarted the Docker Desktop.exe and also restarted the service with pwsh admin Restart-Service com.docker.service but it doesn't seem to fix the issue for me - though everything else seems exactly as you describe.
@stevenobird
Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
could you expand on this? I have restarted the Docker Desktop.exe and also restarted the service with pwsh admin
Restart-Service com.docker.servicebut it doesn't seem to fix the issue for me - though everything else seems exactly as you describe.
That's really the only two steps I do to temporarily fix the issue.
I stop Docker Desktop.exe with the Task Manager under "Details" tab and switch to "Services" tab to restart com.docker.service (which should be similar to doing it with Powershell). After that, I manually open up Docker Desktop.exe again and everything boots up as it should.
@stevenobird
Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
could you expand on this? I have restarted the Docker Desktop.exe and also restarted the service with pwsh admin
Restart-Service com.docker.servicebut it doesn't seem to fix the issue for me - though everything else seems exactly as you describe.That's really the only two steps I do to temporarily fix the issue.
I stop
Docker Desktop.exewith the Task Manager under "Details" tab and switch to "Services" tab to restartcom.docker.service(which should be similar to doing it with Powershell). After that, I manually open up Docker Desktop.exe again and everything boots up as it should.
Hmm, that doesn't seem to work for me but if I go into the troubleshooting part of the docker desktop app and purge hyperv data it forces a restart of the docker service and boots up again, keeping my wsl2 images etc because it's using the WSL2 engine instead.
It could just be me not doing the Windows service restarts right etc, but it's an easier workaround anyway tbh.
@stevenobird
Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
could you expand on this? I have restarted the Docker Desktop.exe and also restarted the service with pwsh admin
Restart-Service com.docker.servicebut it doesn't seem to fix the issue for me - though everything else seems exactly as you describe.That's really the only two steps I do to temporarily fix the issue.
I stop
Docker Desktop.exewith the Task Manager under "Details" tab and switch to "Services" tab to restartcom.docker.service(which should be similar to doing it with Powershell). After that, I manually open up Docker Desktop.exe again and everything boots up as it should.Hmm, that doesn't seem to work for me but if I go into the troubleshooting part of the docker desktop app and purge hyperv data it forces a restart of the docker service and boots up again, keeping my wsl2 images etc because it's using the WSL2 engine instead.
It could just be me not doing the Windows service restarts right etc, but it's an easier workaround anyway tbh.
And there's my problem: Docker Desktop is unresponsive/hanging so I can't even get to the troubleshooting part. 😅 That's why I take my described steps in the first place.
@stevenobird
Restarting the Docker Desktop.exe and the com.docker.service service fixes this issue - until the next Windows reboot.
could you expand on this? I have restarted the Docker Desktop.exe and also restarted the service with pwsh admin
Restart-Service com.docker.servicebut it doesn't seem to fix the issue for me - though everything else seems exactly as you describe.That's really the only two steps I do to temporarily fix the issue. I stop
Docker Desktop.exewith the Task Manager under "Details" tab and switch to "Services" tab to restartcom.docker.service(which should be similar to doing it with Powershell). After that, I manually open up Docker Desktop.exe again and everything boots up as it should.Hmm, that doesn't seem to work for me but if I go into the troubleshooting part of the docker desktop app and purge hyperv data it forces a restart of the docker service and boots up again, keeping my wsl2 images etc because it's using the WSL2 engine instead. It could just be me not doing the Windows service restarts right etc, but it's an easier workaround anyway tbh.
And there's my problem: Docker Desktop is unresponsive/hanging so I can't even get to the troubleshooting part. 😅 That's why I take my described steps in the first place.
Ah interesting! For me, the docker desktop settings page hangs and is unresponsive, but I'm able to access the troubleshooting tab! I hope it's fixed soon, I keep on ranting and raving to people at work at how good the WSL2 workflow is instead of virtualbox and then this happens 🤣
Ah interesting! For me, the docker desktop settings page hangs and is unresponsive, but I'm able to access the troubleshooting tab! I hope it's fixed soon, I keep on ranting and raving to people at work at how good the WSL2 workflow is instead of virtualbox and then this happens 🤣
Got it working now. Double click on the icon in the taskbar makes it indeed working so I can finally send diagnostics that are in an "unresponsive" state.
Diagnostic ID: CEE7896D-A758-4E58-87F1-61F5D73B9549/20210423174133