Skip to content
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 Engine won't start. #7506

Open
Collincg opened this issue Dec 6, 2024 · 7 comments
Open

Docker Engine won't start. #7506

Collincg opened this issue Dec 6, 2024 · 7 comments

Comments

@Collincg
Copy link

Collincg commented Dec 6, 2024

Description

I encountered an issue with Docker Desktop on my system where it fails to start properly. The following error message appears:

`An unexpected error occurred
Docker Desktop encountered an unexpected error and needs to close.

Search our troubleshooting documentation ⁠to find a solution or workaround. Alternatively, you can gather a diagnostics report and submit a support request or GitHub issue.

running engine: waiting for the Docker API: context deadline exceeded`

This is keeping me from using docker features

Reproduce

  1. Open docker
  2. That's it. Engine won't start. I can't use any docker commands

Expected behavior

No response

docker version

Client:
 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:38:18 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

docker info

Client:
 Version:    27.3.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Ask Gordon - Docker Agent (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/collingraff/.docker/cli-plugins/docker-ai
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.18.0-desktop.2
    Path:     /Users/collingraff/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.30.3-desktop.1
    Path:     /Users/collingraff/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.37
    Path:     /Users/collingraff/.docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.15
    Path:     /Users/collingraff/.docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/collingraff/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     /Users/collingraff/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/collingraff/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     /Users/collingraff/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/collingraff/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.15.0
    Path:     /Users/collingraff/.docker/cli-plugins/docker-scout

Server:
ERROR: Cannot connect to the Docker daemon at unix:///Users/collingraff/.docker/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Diagnostics ID

0C740503-AE8C-4859-9967-78B3DFDDB9B4/20241206220228

Additional Info

No response

@ChrisBeWithYou
Copy link

Having the same issues on my Windows 11 machine, with the same error message presenting itself after a while. I am unable to download the diagnostics when i click on the button sadly.

Docker Engine never starts. I got it to load once last night but it wouldn't actually pull anything and was very slow to load even settings pages.

Docker Desktop 4.36.0
Fresh install, Hyper-V, VMP, and WSL all enabled in Windows Features
confirmed WSL is enabled and selected via powershell> wsl --set version docker-desktop 2
No other hypervisors installed on my machine.
No change via Troubleshoot>Clean/Purge Data
No change via restarting PC
In referencing similar(ish) issue found here: docker/for-win#14453 , tried to install @andrea-reale 's dev build (https://desktop-stage.docker.com/win/main/amd64/176956/Docker%20Desktop%20Installer.exe) but it won't even launch when opened as administrator.

This is a definite show-stopper and head scratcher. Not sure what else I can possibly configure differently, but I don't have any issues on MacOS or Windows 10 when running Docker. Is this a fresh bug that was introduced in the last build? My org won't let us keep the rollback version so this needs to be addressed please. Let me know if I can provide anything else to help assist/troubleshoot, thanks!

-ChrisBeWithYou

@andrea-reale
Copy link

andrea-reale commented Dec 11, 2024

Hi @Collincg, from your diagnostics it looks like your Docker Desktop virtual disk may have ran out of space.

You can increase the disk limit by going to 'Settings -> Resouces -> Virtual Disk Size'.

If Docker Desktop is in a state where it does not let you apply the new settings, you can proceed whith the following unofficial manual recovery steps.

  1. Quit Docker Desktop.
  2. Open a shell and cd into the directory where the docker desktop disk is located. On macOS, this is typically /Users/$USER/Library/Containers/com.docker.docker/Data/vms/0/data/. The directory should contain a Docker.raw file.
$ cd /Users/$USER/Library/Containers/com.docker.docker/Data/vms/0/data/
  1. I'd recommend to backup the current disk before manipulating it, for example via:
cp Docker.raw Docker.raw.bak
  1. Increse the disk size via the truncate (note the '+' sign in front of the size argument, which means that the maximum size will be increased by that value, 64GB in the example):
$ truncate -s +64GB Docker.raw
  1. Start Docker desktop again.

We're aware this is far from being ideal, and we're working at a much better handling of this kind of siutations.

Of course if you do not care too much about the data you currently have in Docker Desktop, a factory reset would also help :)


P.S. @Collincg I am assuming you accidentally posted this issue in the for-win issue repository, as I see from your diagnostics you are on MacOS.


[EDIT: updated to provide better resolution guidance]

@andrea-reale
Copy link

@ChrisBeWithYou , could you please generate a diagnostics bundle and share the id here, so we can take a look at your case? It's possible is different from the reporter's one, as you are using the Windows version while the reporter is on MacOs.

@nsd-dennis
Copy link

I'm having the same problem (in Windows) since updating to 4.36.0 (175267) yesterday.
My WSL also was updated to 2.3.26.0.

I generated diagnostics with the ID: 2E177169-17AC-4BF7-BDAC-EE069B844277/20241212091015

@thompson-shaun thompson-shaun transferred this issue from docker/for-win Dec 16, 2024
@thorsten-l
Copy link

I've the same issue with my MacBook Pro M4 Max, macOS 15.2, Diagnostic ID : C737B674-DC6A-472B-9F78-2FF488F0C220/20241218061233

I tried:

  1. wiping the system hd
  2. reinstalling macOS 15.2
  3. installing Docker Desktop 4.36
  4. -> engine does not start
  5. Update Docker Desktop to version v4.37.0
  6. -> engine does not start
  7. ... truncate -s +64GB Docker.raw
  8. -> engine does not start

Remove docker with:

sudo /Applications/Docker.app/Contents/MacOS/uninstall
sudo rm -fr "/Applications/Docker.app" "$HOME/.docker"
sudo find $HOME/Library \( -type d -a -iname '*docker*' \) -print -exec rm -fr {} \;

and install docker again -> engine does not start

Image

@thorsten-l
Copy link

I just tested macOS 15.3 Beta with docker.desktop v4.37.1, but the engine didn't even start.

@thorsten-l
Copy link

thorsten-l commented Dec 28, 2024

For your info: With OrbStack (https://orbstack.dev/) everything works fine with the M4 Max. The docker engine starts in a few seconds and i tested it with my KeyCloak-Sample-Environment (nginx,postgres,keycloak,port389,mailhog) (https://github.com/thorsten-l/Keycloak-Sample-Environment)

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

5 participants