for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Unexpected Error in Docker Desktop

Open iarc13 opened this issue 10 months ago • 1 comments

Description

I was working on a container. It just hung up. And docker commands stopped working. A docker ps returned this:

docker ps
docker statsrequest returned Internal Server Error for API route and version http://%2FUsers%2Fiarc13%2F.docker%2Frun%2Fdocker.sock/v1.47/containers/json, check if the server supports the requested API version

A popup(from where I generated diagnostics) said unexpected error occured:

running engine: waiting for the Docker API: engine linux/virtualization-framework failed to run: running VM: com.docker.virtualization: process terminated unexpectedly: Invalid virtual machine configuration. The storage device attachment is invalid.

Reproduce

Can't reproduce, happens intermittently. It happens like once in a month. My best guess is that it's a memory problem.

Expected behavior

No response

docker version

Client: Docker Engine - Community
 Version:           27.4.1
 API version:       1.47
 Go version:        go1.23.4
 Git commit:        b9d17eaebb
 Built:             Mon Dec 16 21:43:43 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.37.1 (178610)
 Engine:
  Version:          27.4.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.10
  Git commit:       92a8393
  Built:            Sat Dec  7 10:38:33 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.21
  GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    27.4.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Ask Gordon - Docker Agent (Docker Inc.)
    Version:  v0.5.1
    Path:     /Users/iarc13/.docker/cli-plugins/docker-ai
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.19.2-desktop.1
    Path:     /Users/iarc13/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.31.0-desktop.2
    Path:     /Users/iarc13/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.37
    Path:     /Users/iarc13/.docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Beta) (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/iarc13/.docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/iarc13/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     /Users/iarc13/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/iarc13/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     /Users/iarc13/.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/iarc13/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.15.1
    Path:     /Users/iarc13/.docker/cli-plugins/docker-scout

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 27.4.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.14-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 8
 Total Memory: 3.827GiB
 Name: docker-desktop
 ID: a42ef3b5-48a5-4693-80e2-30feb9584250
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///Users/iarc13/Library/Containers/com.docker.docker/Data/docker-cli.sock
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile

Diagnostics ID

DC536B9A-8040-4344-9091-3AFFFA011E98/20250209132917

Additional Info

Started to happen from 2 weeks back.

iarc13 avatar Feb 09 '25 13:02 iarc13

Whenever it happens, resetting to default gets it to work.

iarc13 avatar Feb 09 '25 13:02 iarc13

happens to me after a hung-up push to ECR

docker push 11111111111111.dkr.ecr.us-east-2.amazonaws.com/repo:latest
The push refers to repository [11111111111111.dkr.ecr.us-east-2.amazonaws.com/repo]
4c1110416e19: Preparing
4be0aa8318ca: Pushing [==================================================>]   2.56kB
caa2d4c85d90: Pushing [==================================================>]  11.26kB
432d9e1430ce: Pushing [==================================================>]   80.9kB
9c4a8f8401bb: Pushing  1.536kB
046ecdb73140: Waiting
8e092a219aa9: Waiting
863fe8082669: Waiting
288a834fec15: Waiting
35393cf1138f: Waiting
66a307619b8c: Waiting
^Ccontext canceled

docker push 11111111111111.dkr.ecr.us-east-2.amazonaws.com/repo:latest
request returned Internal Server Error for API route and version http://%2FUsers%2Femalihin%2F.docker%2Frun%2Fdocker.sock/v1.47/images/11111111111111.dkr.ecr.us-east-2.amazonaws.com/repo/push?tag=latest, check if the server supports the requested API version

emalihin avatar May 08 '25 10:05 emalihin

I appear to have gotten around this (🤞) by going to Docker Desktop Settings > General > Virtual Machine Options and switching Virtual Machine Manager from "Apple Virtualization framework" to "Docker VMM (beta)".

fwiw: this happened to me when I did any cross-platform docker build for linux on my ARM mac.

dwo avatar Jun 13 '25 12:06 dwo