docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.87k stars 288 forks source link

Docker Engine not starting #14207

Open staaky opened 4 months ago

staaky commented 4 months ago

Description

Docker Desktop 4.32.0 is stuck on Starting the Docker Engine.... Manual restart shows Docker Engine stopped with an error message:

Unable to calculate image disk size

4.28.0 used to work for me but now also fails to start, it gives a different error:

Failed to start VM - received state failed to start: running TAP AF_VSOCK: no such file or directory

It might be caused by Windows 11 auto-updating WSL to 2.3.11.0, see https://github.com/docker/for-win/issues/14202#issuecomment-2240092670.

4.32.0 4.28.0
Screenshot 2024-07-20 151751 Screenshot 2024-07-20 163042 Screenshot 2024-07-20 163054

Reproduce

  1. Use WSL 2.3.11.0
  2. Open Docker Desktop 4.32.0
  3. Restart it manually once stuck on Starting the Docker Engine...
  4. Docker Engine stops with Unable to calculate image disk size error message
  5. Repeat with 4.28.0 for different error messages

Expected behavior

Docker Desktop works with WSL 2.3.11.0

docker version

Client:
 Version:           27.0.3
 API version:       1.46
 Go version:        go1.21.11
 Git commit:        7d4bcd8
 Built:             Sat Jun 29 00:03:32 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

docker info

Client:
 Version:    27.0.3
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.32
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.14
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.10.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.46/info": context canceled
errors pretty printing info

Diagnostics ID

911B2ADB-E636-4057-8AF7-CB26365AD897/20240720132622

Additional Info

Also uploaded 4.28.0 Diagnostics, ID: 911B2ADB-E636-4057-8AF7-CB26365AD897/20240720143219

Using Windows 11 Version 23H2 (OS Build 22631.3880)

Wizard1209 commented 4 months ago

Same issue, I couldn't find any related info, seems like it's not related to engine startup itself since dockerd logs are not informative, I suppose this error from docker backend is related to the issue. com.docker.backend.exe.log

YouGina commented 4 months ago

I see this issue is very recent, I have the same problem at the moment, last friday it all still worked, not sure what changed, could have been the update for wsl as I have the same version as the first message describes.

Note: For anyone who is just looking for a workaround, downgrading WSL to the previous version works. see wsl-2.2.4

pacepace commented 4 months ago

Have this same issue, switching to the older version of wsl as YouGina suggested worked...

kyleshrader commented 4 months ago

An easy fix was to take the latest update for wsl. I did this by using wsl --update in my cmd. Since I was on the latest update and this didn't resolve the issue, I opted to use a pre-release version. This command is wsl --update --pre-release. I then had to accept the admin prompt, wait a moment, and docker worked.

Additionally, DO NOT press factory reset as this will wipe all user data in docker. Volumes, containers, images, and any application settings.

I lost a lot of data due to this. 😭

remerle commented 3 months ago

May have been fixed by the 2.3.13 release

https://github.com/microsoft/WSL/releases/tag/2.3.13