docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 119 forks source link

request returned Internal Server Error for API route and version 4.22.1 #6956

Open engFelipeMonteiro opened 1 year ago

engFelipeMonteiro commented 1 year ago

Description

I installed the latest version of docker-desktop, and couldn't make the docker-cli connect to docker-server.

Hardware: MacBook Pro M2 8GB OS: MacOS Ventura 13.4.1 (c) Docker: Docker Desktop 4.22.1 (118664) Diagnostics ID: B51D4228-3485-49B7-B20D-AFDCA2E977C7/20230827032005

 % ps -ef | grep docker
    0   565     1   0  9:37   ??         0:00.03 /Library/PrivilegedHelperTools/com.docker.vmnetd
  501  2421  2420   0 10:40   ??         0:02.39 /Applications/Docker.app/Contents/MacOS/com.docker.backend -watchdog -native-api
  501  2427  2421   0 10:40   ??         0:00.25 /Applications/Docker.app/Contents/MacOS/com.docker.backend -watchdog -native-api
  501  2454  2421   0 10:40   ??         0:00.03 com.docker.dev-envs -watchdog
  501  2455  2421   0 10:40   ??         0:00.66 com.docker.extensions -address /Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/extension-manager.sock -watchdog
  501  2457  2421   0 10:40   ??         0:00.24 com.docker.build
  501  2458  2421   0 10:40   ??         0:00.24 docker serve --address unix:///Users/felipemonteirojacome/.docker/run/docker-cli-api.sock
  501  2459  2421   0 10:40   ??         0:00.19 /Applications/Docker.app/Contents/MacOS/com.docker.virtualization --kernel /Applications/Docker.app/Contents/Resources/linuxkit/kernel --cmdline vsyscall=emulate panic=1 nospec_store_bypass_disable noibrs noibpb no_stf_barrier mitigations=off linuxkit.unified_cgroup_hierarchy=1 console=hvc0  irqaffinity=0 vpnkit.connect=connect://2/1999 vpnkit.disable=osxfs-data --ramdisk /Applications/Docker.app/Contents/Resources/linuxkit/initrd.img --disk /Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw --networkType gvisor --macaddr-filename vms/0/macaddr --cpus 4 --memoryMiB 4096 --console-log log/vm/console.log --console /Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/vms/0/console.sock --api /Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/virtualization.sock --watchdog --virtiofs /Users --virtiofs /Volumes --virtiofs /private --virtiofs /tmp --virtiofs /var/folders
  501  2474  2455   0 10:40   ??         0:00.11 /Applications/Docker.app/Contents/MacOS/com.docker.extensions -address /Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/extension-manager.sock -watchdog
  501  2487     1   0 10:40   ??         0:00.01 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Frameworks/Electron Framework.framework/Helpers/chrome_crashpad_handler --no-rate-limit --monitor-self-annotation=ptype=crashpad-handler --database=/Users/felipemonteirojacome/Library/Containers/com.docker.docker/Data/log/host/electron-crash-reports --annotation=_productName=Docker Desktop --annotation=_version=4.22.1 --annotation=plat=OS X --annotation=prod=Electron --annotation=ver=23.3.4 --handshake-fd=55
  501  2488  2484   0 10:40   ??         0:00.15 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Frameworks/Docker Desktop Helper.app/Contents/MacOS/Docker Desktop Helper --type=utility --utility-sub-type=network.mojom.NetworkService --lang=pt-BR --service-sandbox-type=network --user-data-dir=/Users/felipemonteirojacome/Library/Application Support/Docker Desktop --standard-schemes --secure-schemes --bypasscsp-schemes --cors-schemes --fetch-schemes=docker-hub,docker-extensions-be --service-worker-schemes --streaming-schemes --shared-files --field-trial-handle=1718379636,r,16874270178111516900,7423617435867662373,131072 --disable-features=SpareRendererForSitePerProcess --seatbelt-client=58
  501  2724  2484   0 11:01   ??         0:05.15 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Frameworks/Docker Desktop Helper (Renderer).app/Contents/MacOS/Docker Desktop Helper (Renderer) --type=renderer --user-data-dir=/Users/felipemonteirojacome/Library/Application Support/Docker Desktop --standard-schemes --secure-schemes --bypasscsp-schemes --cors-schemes --fetch-schemes=docker-hub,docker-extensions-be --service-worker-schemes --streaming-schemes --app-path=/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Resources/app.asar --no-sandbox --no-zygote --lang=pt-BR --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=5 --time-ticks-at-unix-epoch=-1693094940259234 --launch-time-ticks=6724124900 --shared-files --field-trial-handle=1718379636,r,16874270178111516900,7423617435867662373,131072 --disable-features=SpareRendererForSitePerProcess
% ls -la /var/run/docker.sock 
lrwxr-xr-x@ 1 root  daemon  51 26 Ago 09:37 /var/run/docker.sock -> /Users/felipemonteirojacome/.docker/run/docker.sock
% docker info
Client:
 Version:    24.0.5
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     /Users/felipemonteirojacome/.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/felipemonteirojacome/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scout

Server:
ERROR: request returned Bad Gateway for API route and version http://%2FUsers%2Ffelipemonteirojacome%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version
errors pretty printing info
% docker version
Cannot connect to the Docker daemon at unix:///Users/felipemonteirojacome/.docker/run/docker.sock. Is the docker daemon running?
Client:
 Cloud integration: v1.0.35-desktop+001
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:32:30 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux
% ls -la /Users/felipemonteirojacome/.docker/run/docker.sock
ls: /Users/felipemonteirojacome/.docker/run/docker.sock: No such file or directory

% export  DOCKER_HOST=unix:///var/run/docker.sock

% docker info                                    
Client:
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     /Users/felipemonteirojacome/.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/felipemonteirojacome/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scout

Server:
ERROR: request returned Bad Gateway for API route and version http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version
errors pretty printing info

Reproduce

% docker info Client: Version: 24.0.5 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.11.2-desktop.1 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.20.2-desktop.1 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-compose dev: Docker Dev Environments (Docker Inc.) Version: v0.1.0 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-dev extension: Manages Docker extensions (Docker Inc.) Version: v0.2.20 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-extension init: Creates Docker-related starter files for your project (Docker Inc.) Version: v0.1.0-beta.6 Path: /Users/felipemonteirojacome/.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/felipemonteirojacome/.docker/cli-plugins/docker-sbom scan: Docker Scan (Docker Inc.) Version: v0.26.0 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-scan scout: Command line tool for Docker Scout (Docker Inc.) Version: 0.20.0 Path: /Users/felipemonteirojacome/.docker/cli-plugins/docker-scout

Server: ERROR: request returned Bad Gateway for API route and version http://%2FUsers%2Ffelipemonteirojacome%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version errors pretty printing info

Expected behavior

No response

docker version

Cannot connect to the Docker daemon at unix:///Users/felipemonteirojacome/.docker/run/docker.sock. Is the docker daemon running?
Client:
 Cloud integration: v1.0.35-desktop+001
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:32:30 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

docker info

docker info
Client:
 Version:    24.0.5
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     /Users/felipemonteirojacome/.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/felipemonteirojacome/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     /Users/felipemonteirojacome/.docker/cli-plugins/docker-scout

Server:
ERROR: request returned Bad Gateway for API route and version http://%2FUsers%2Ffelipemonteirojacome%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version
errors pretty printing info

Diagnostics ID

B51D4228-3485-49B7-B20D-AFDCA2E977C7/20230827032005

Additional Info

No response

jkugler commented 1 year ago

Just throwing this out there for those googling for a solution. Simply restarting Docker Desktop fixed this for me. Version 4.25.0

Shouldn't have had to do it in the first place, but at least a restart got me going.

teddyknox commented 1 year ago

Bump

samluiz commented 1 year ago

for me it only fixed when i uninstalled and manually removed docker and bash completion files, and then reinstalled

marksweb commented 1 year ago

Just had this start happening, no updates made to the OS or docker to trigger it, nor any configuration changes.

Running macOS Version 14.1.1 (23B81)

❯ docker version
Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:28:49 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.25.2 (129061)
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:31:36 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Its also then stopped happening without me changing any config. I think I restarted the desktop app a few times, turned on automatic update downloads while I was poking around.

Very strange.

Gerst20051 commented 12 months ago

I have also noticed this happening very frequently recently. Using Docker v4.25.2 and macOS Ventura 13.6.2.

I also decided to disable the resource saver.

Settings → Resources → Resource Saver → Uncheck "Enable Resource Saver"

After that, I noticed that one of my containers was throwing an error:

could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device

I then checked and noticed that I had 0GB available so I ran prune to clear up some space:

[$]> docker system prune -a

Let's see if that resolves my issues 🙏

Update: I haven't run into any issues after this.

milamd commented 12 months ago

Apple M2 Pro, Sonoma 14.1.2 I deleted and reinstalled latest via Homebrew (brew reinstall --cask Docker), version 4.26.0,130397 of Cask docker I keep seeing the mentioned error: request returned Internal Server Error for API route and version Why is it looking for a particular version in the path? docker.sock does not appear to be a directory

~ » docker version        
request returned Internal Server Error for API route and version http://%2FUsers%2Fmememe%2F.docker%2Frun%2Fdocker.sock/v1.24/version, check if the server supports the requested API version
Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:04:20 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux
~ » ls -la .docker/run/docker.sock
srwxr-xr-x@ 1 mememe  staff  0 Dec  6 12:33 .docker/run/docker.sock
ksparedis commented 11 months ago

I have same issue. For me the VM crashes whenever I lock my macbook, the VM stays functioning when I'm logged in. Restarting Docker allows everything to start up again, until I lock the macbook again then VM crash.

Hardware: MacBook Pro M2 32GB OS: Sonoma 14.1.2

~ » docker version
request returned Internal Server Error for API route and version check if the server supports the requested API version Client: Cloud integration: v1.0.35+desktop.5 Version: 24.0.7 API version: 1.43 Go version: go1.20.10 Git commit: afdd53b Built: Thu Oct 26 09:04:20 2023 OS/Arch: darwin/arm64 Context: desktop-linux

imhilla commented 11 months ago

docker compose up

request returned Internal Server Error for API route and version http://%2FUsers%2Fkiptoo%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dapp%22%3Atrue%7D%7D, check if the server supports the requested API version

I have been experiencing this in the latest docker, restarting usually gets me going.

NikitaKharkov commented 11 months ago

Guys, don't pretend to provide a solution, just ad-hock, not more, but me helped:

I ran docker, it started long and I closed the interface, but after couldn't restart it again. And face this error in the console. Me helped:

Find all processes from Docker and kill them - ps aux | grep docker And kill them all - kill -9 procID1 procID2 etc (except processes run under root).

Tried to start again - it works!

jkugler commented 11 months ago

Just throwing this out there for those googling for a solution. Simply restarting Docker Desktop fixed this for me. Version 4.25.0

Shouldn't have had to do it in the first place, but at least a restart got me going.

So...this is happening VERY often now, even in the middle of builds and trying to bring up clusters in Kubernetes. I'll type something simple like

docker image ls

and be met with:

request returned Internal Server Error for API route and version http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json, check if the server supports the requested API version

I have $DOCKER_HOST set to the /var/run path. But it does the same thing even on the socker in my home directory.

Diagnostic ID: DC63B504-D90C-4B3C-A2C6-E9394AABB169/20231214220048

usr-ein commented 11 months ago

https://github.com/docker/for-mac/issues/6956#issuecomment-1840287140

@Gerst20051 I have the exact same setup (macOS + docker version), and the same happens to me multiple times a day.

I just disabled the resource saver after your comment, and I'll see how it goes!

f1ynng8 commented 11 months ago

4.26.0 also has this problem, on x86 macOS 13.6.3. disabling resource saver has no improvement.

jkugler commented 11 months ago

As a data point, I enabled the experimental containderd feature, and I've not had any API failures since.

f1ynng8 commented 11 months ago

As a data point, I enabled the experimental containderd feature, and I've not had any API failures since.

Do you mean this one? @jkugler

Use containerd for pulling and storing images

usr-ein commented 11 months ago

Reporting back after a week using it

Disabling ressource saver also did the trick for me! Cheers!

Of course, I write that this morning and then it happens again today. I upgraded to macOS 14.2 (23C64), and Docker for Mac 4.25.2 (129061), yet it still happens!

It seems to happen when I run docker compose up (Docker Compose version v2.23.0-desktop.1), and as I attach to my container.

f1ynng8 commented 11 months ago

Unfortunately, disabling resource save didn't work for me.

macOS 13.6.3, Docker for Mac 4.26.0

jkugler commented 11 months ago

@f1ynng8 Yes, "Use containerd for pulling and storing images"

cacharrin commented 11 months ago

I started to see this problem today... My Doker Desktop is unable to stop or start new containers. I'm on windows 10

f1ynng8 commented 11 months ago

I have enabled "Use containerd for pulling and storing images" in the experimental feature page, and will see if it improves.

Ybouali commented 11 months ago

a quick solution for this problem because i have been faced the same problem today

Screenshot 2023-12-24 at 10 51 06

HHHHHHHHHHHHHHHHHHHHHH

Just open ur terminal and do this cmd ps -ef | grep docker any process related to docker just do sudo kill and the pid of the process

Mcgoozers commented 11 months ago

HI everyone, I am having this issue still on my Macbook Pro 2019 with latest version of Sonoma and its driving me crazy. enabled "Use containerd for pulling and storing images" and disabling resource saver did not resolve the issue.

Anyone have any solution? I guess I will just have to downgrade to 4.20.1?

f1ynng8 commented 11 months ago

I can confirm high network load in certain container, my case is aria2 and a webdav container, will easily cause the Docker for Mac crash and show "request returned Internal Server Error for API route..."

I have tried every version from 4.22.1~4.26.1 with resource saver disabled, but this problem still exists.

Last week I enabled the "Use containerd for pulling and storing images" which caused rebuild every image and container, this problem hasn't appeard so far from then. I will observer this some more time.

abhilesh commented 11 months ago

I think someone pointed this above, but it seems like the issue maybe related to the 'Resource Saver' feature that was introduced in v4.22 - https://github.com/docker/for-mac/issues/6933

I enabled the 'Use containerd for pulling and storing images' and am still running into this issue

vhscom commented 11 months ago

4.26.0 also has this problem, on x86 macOS 13.6.3.

Ditto M1 running Docker Desktop 4.26.1 (131620) and macOS Sonoma 14.1.2 (23B92). To reproduce I simply did a docker ps like the second individual to comment in this issue on Aug 22. This is the second for-mac issue I've hit this week.

Mcgoozers commented 11 months ago

Downgrading to 4.25.2 has been stable for me so far. I will report if it crashes again

imhilla commented 11 months ago

Mine still crushes sometimes. But restarting docker usually fixes.

On Sat, Dec 30, 2023 at 12:35 AM Mcgoozers @.***> wrote:

Downgrading to 4.25.2 has been stable for me so far. I will report if it crashes again

— Reply to this email directly, view it on GitHub https://github.com/docker/for-mac/issues/6956#issuecomment-1872348938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6FGVIDX4X2U3SIKYYMYH3YL4ZRTAVCNFSM6AAAAAA4AAZHOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGM2DQOJTHA . You are receiving this because you commented.Message ID: @.***>

abhilesh commented 11 months ago

Restarting Docker Engine fixes it but needs to be restarted several times a day, hardly a solution for server services where uptime is crucial

Ybouali commented 11 months ago

Just throwing this out there for those googling for a solution. Simply restarting Docker Desktop fixed this for me. Version 4.25.0 Shouldn't have had to do it in the first place, but at least a restart got me going.

So...this is happening VERY often now, even in the middle of builds and trying to bring up clusters in Kubernetes. I'll type something simple like

docker image ls

and be met with:

request returned Internal Server Error for API route and version http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json, check if the server supports the requested API version

I have $DOCKER_HOST set to the /var/run path. But it does the same thing even on the socker in my home directory.

Diagnostic ID: DC63B504-D90C-4B3C-A2C6-E9394AABB169/20231214220048

i don't know but i think there is a problem with the docker api i mean if u pass a number of req by day i causes issue

Shawn-Armstrong commented 11 months ago

Error:

request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/398be226bc6081cfeceb3e1ca248ecd68751a0760939496555c7491130fa558a/json, check if the server supports the requested API version

System Details

Windows 11 Home 64-bit, Version 22H2 Docker Desktop 4.25.2 (129061) with WSL2 integration AMD Ryzen 7

Corrective Action

  1. Open Powershell as Administrator

    wsl --shutdown
  2. Allow Docker to terminate
  3. Restart Docker

Details

I understand the context of this question is for Mac but see other Windows users. I've encountered this error numerous times while doing experimental things with Vite.

matthinrichsen-wf commented 11 months ago

Just had this issue happen on Mac on version 4.25.2 (129061). Shutting down/restcrting docker just caused the application to hang as it left orphaned processes (had to Force Quit them via the Activity Monitor).

This has started to occur increasingly more often in the last couple of weeks.

FWIW, it seems to exclusively happen (for me) when pulling many decently-large images at the same time.

luisgj commented 11 months ago

same error here. Restarting docker does the trick but some time it gets stuck on this error.

 docker info
Client:
 Version:    24.0.7
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0-desktop.2
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3-desktop.2
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  0.1
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.10
    Path:     /Users/luisoscargabriel/.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/luisoscargabriel/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-scan
  scout: Docker Scout (Docker Inc.)
    Version:  v1.2.0
    Path:     /Users/luisoscargabriel/.docker/cli-plugins/docker-scout

Server:
ERROR: request returned Internal Server Error for API route and version http://%2FUsers%2Fluisoscargabriel%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version
errors pretty printing info

I'm on a 2023 Macbook Pro with M2 PRO processor.

UPDATE:

I have enabled "Use containerd for pulling and storing images" in the experimental feature page, and will see if it improves.

☝🏻 This seems to alleviate the issue.

JulianOcampo commented 11 months ago

Actually still happening.

docker info Client: Version: 24.0.7 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.12.0-desktop.2 Path: /Users/julianocampo/.docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.23.3-desktop.2 Path: /Users/julianocampo/.docker/cli-plugins/docker-compose dev: Docker Dev Environments (Docker Inc.) Version: v0.1.0 Path: /Users/julianocampo/.docker/cli-plugins/docker-dev extension: Manages Docker extensions (Docker Inc.) Version: v0.2.21 Path: /Users/julianocampo/.docker/cli-plugins/docker-extension feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: 0.1 Path: /Users/julianocampo/.docker/cli-plugins/docker-feedback init: Creates Docker-related starter files for your project (Docker Inc.) Version: v0.1.0-beta.10 Path: /Users/julianocampo/.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/julianocampo/.docker/cli-plugins/docker-sbom scan: Docker Scan (Docker Inc.) Version: v0.26.0 Path: /Users/julianocampo/.docker/cli-plugins/docker-scan scout: Docker Scout (Docker Inc.) Version: v1.2.0 Path: /Users/julianocampo/.docker/cli-plugins/docker-scout

Server: ERROR: request returned Internal Server Error for API route and version http://%2FUsers%2Fjulianocampo%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version errors pretty printing info

austinarchibald commented 10 months ago

For you Windows users, realize this is the for-mac repo.

I was constantly getting this error as described in this thread, and container APIs couldn't reach each other, and the web guis for each container would no longer be connectable. I'd have to restart Docker Desktop every 18 hours or so. I made 3 changes and now it's flawless with no issues, but not sure which solved my problem. a) Upgraded Mac Mini from 16 to 32GB of RAM. b) No longer ran docker containers' config folders from external hard drive and c) Switched from Docker Desktop to Orbstack.

I suspect my solution was Orbstack. Beautifully written Mac app, so much better than Docker Desktop. Installation and migration took mere minutes, and everything worked perfectly instantly. If you're seeing this issue, definitely try Orbstack as a replacement for Docker Desktop.

Terhile commented 10 months ago

I experienced this after upgrading to v4.26.1 on M2. enabling Use containerd for pulling and storing images fixed it for me. Use Rosetta for x86/amd64 emulation on Apple Silicon is already enabled

image

okdas commented 10 months ago

Same here. I upgraded to latest (4.26.1 (131620)), and now have to restart docker a few times a day due to that issue.

request returned Internal Server Error for API route and version http://%2FUsers%2Fdk%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json, check if the server supports the requested API version
raphaeldas commented 10 months ago

Same problem here on Windows 10, Docker Version 4.26.1 Enabling the experimental containerd feature seems to work for now.

NiklasBr commented 10 months ago

I got this error consistently now after upgrading to 4.27.0 on an M1 Mac.

❯ docker compose pull
unable to get image 'redis:7-alpine': request returned Internal Server Error for API route and version http://%2FUsers%2Fnikbr%2F.docker%2Frun%2Fdocker.sock/v1.24/images/redis:7-alpine/json, check if the server supports the requested API version
❯ docker ps
request returned Internal Server Error for API route and version http://%2FUsers%2Fnikbr%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json, check if the server supports the requested API version

Diagnostic ID: B99BCF91-9CAF-4D12-AE8B-A4858EC43329/20240126075731

Even the docker info command contains an error message.

❯ docker info
Client:
 Version:    25.0.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1-desktop.4
    Path:     /Users/nikbr/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.3-desktop.1
    Path:     /Users/nikbr/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.22
    Path:     /Users/nikbr/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/nikbr/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    Path:     /Users/nikbr/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     /Users/nikbr/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.0.0
    Path:     /Users/nikbr/.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/nikbr/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.3.0
    Path:     /Users/nikbr/.docker/cli-plugins/docker-scout
WARNING: Plugin "/Users/nikbr/.docker/cli-plugins/docker-scan" is not valid: failed to fetch metadata: fork/exec /Users/nikbr/.docker/cli-plugins/docker-scan: no such file or directory

Server:
ERROR: request returned Internal Server Error for API route and version http://%2FUsers%2Fnikbr%2F.docker%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version
errors pretty printing info
Rafael-Quinteiro commented 10 months ago

Hello, guys.

My problem is resolved in version 4.27.0.

rspears74 commented 10 months ago

Docker is completely unusable for me after upgrading to 4.27 on my Mac M1. I was getting this "Internal Server Error for API route and version" on trying to build and run containers, and now constant crashes with "Invalid virtual machine configuration. The storage device attachment is invalid." and prompts me to Quit or reset to factory settings.

austinarchibald commented 10 months ago

Everyone seriously try Orbstack to replace Docker Desktop. Changed my life. Now many days without any API errors or crashes or anything.

RosalynLP commented 10 months ago

As a data point, I enabled the experimental containderd feature, and I've not had any API failures since.

I had a fresh install which didn't work, just enabled this feature and it worked first time

Mcgoozers commented 10 months ago

Im still having this issue on v 4.27.1

NiklasBr commented 10 months ago

Same. No difference between 4.27.0 and 4.27.1 – both broken. I could have sworn I read that a fix was supposed to be in 4.27.1.

f1ynng8 commented 10 months ago

Everyone seriously try Orbstack to replace Docker Desktop. Changed my life. Now many days without any API errors or crashes or anything.

I have changed to Orbstack too. Everyone suffering the Docker Desktop should try Orbstack. This is the real Docker.

mannoeu commented 10 months ago

Error:

request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/398be226bc6081cfeceb3e1ca248ecd68751a0760939496555c7491130fa558a/json, check if the server supports the requested API version

System Details

Windows 11 Home 64-bit, Version 22H2 Docker Desktop 4.25.2 (129061) with WSL2 integration AMD Ryzen 7

Corrective Action

  1. Open Powershell as Administrator
    wsl --shutdown
  2. Allow Docker to terminate
  3. Restart Docker

Details

I understand the context of this question is for Mac but see other Windows users. I've encountered this error numerous times while doing experimental things with Vite.

works for me

lazardjokovic commented 9 months ago

Still broken, my specs:

shane-js commented 9 months ago

Just installed docker desktop v4.27.1 on a new hard drive on Win 10 tonight and got the same issue.

NiklasBr commented 9 months ago

Still broken on Docker v4.27.2 as well. @dgageot, like others in this thread it is not necessarily a Mac-only issue as it also happens in Windows 10 (see comment above) as well as in Windows 11 for me.

guya-pecan commented 9 months ago

+1

shane-js commented 9 months ago

Just installed docker desktop v4.27.1 on a new hard drive on Win 10 tonight and got the same issue.

Update: After a full computer shutdown (after I had already restarted as asked previously) Docker Desktop suddenly popped up a prompt to configure/setup (with Admin credentials). Once that was done the error went away. Maybe some issue with the installer not going down the right path after the first prompted restart?