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

rfay commented 1 year ago

I'm seeing this regularly in DDEV automated tests. This is now DD 4.23.0

Diagnostic: CE46F4CE-5EA3-46A1-BB0A-7FF47A7B2E10/20230923002402

$ docker ps
request returned Internal Server Error for API route and version http://%2FUsers%2Ftestbot%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json, check if the server supports the requested API version
rfay commented 1 year ago

Another diagnostic, on another machine: 358979A2-0D9F-4631-894B-EA8807C2A1EE/20230923193151

@engFelipeMonteiro could you please update the title to include something of the error message? The title could be "request returned Internal Server Error for API route and version", people might find it faster.

rfay commented 1 year ago

This is happening on Windows also, same thing:

aboggis-lc commented 1 year ago

Another one here. I'd post the result of docker info, but it's just hanging. Latest docker version (just downloaded & installed), running on MacOS Sonoma, MacBook Pro M2.

                    'c.          user@macbook.local
                 ,xNMM.          ----------------
               .OMMMMo           OS: macOS 14.0 23A344 arm64
               OMMM0,            Host: Mac14,6
     .;loddo:' loolloddol;.      Kernel: 23.0.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 2 days, 22 hours, 42 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 94 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 3840x2160@2x, 2560x1600@2x
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: MesloLGMForPowerline-Regular 12
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M2 Max
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M2 Max
       .cooc,.    .,coo:.        Memory: 11031MiB / 98304MiB

Finally, docker info returned:

user@MacBook : /Users/user/ # docker info                                                                                                        <aws:legalconnect-profile> <region:us-west-2>
Client: Docker Engine - Community
 Version:    24.0.6
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.5
    Path:     /Users/user/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.22.0-desktop.2
    Path:     /Users/user/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/user/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/user/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.8
    Path:     /Users/user/.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/user/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/user/.docker/cli-plugins/docker-scan
  scout: Docker Scout (Docker Inc.)
    Version:  v1.0.7
    Path:     /Users/user/.docker/cli-plugins/docker-scout

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

Me too.

The message:request returned Bad Gateway for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.43/exec/3c961f02cb5c7ee7320e70c1149fd48b83cc97bdc1c3e370f50420733b8ff287/json, check if the server supports the requested API version

docker info result:

Client:
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.22.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.8
    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
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.0.7
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 3
  Running: 2
  Paused: 0
  Stopped: 1
 Images: 22
 Server Version: 24.0.6
 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: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.90.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.62GiB
 Name: docker-desktop
 ID: 176fff6e-aafd-4f3f-9fbb-1cdb8198e99c
 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
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile
0927HQY commented 1 year ago

我在 DDEV 自动化测试中经常看到这种情况。现在是 DD 4.23.0

诊断:CE46F4CE-5EA3-46A1-BB0A-7FF47A7B2E10/20230923002402

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

hello ,have you solved this problem?

0927HQY commented 1 year ago

hello ,have you solved this problem?

hello ,have you solved this problem?

Mohannadcse commented 1 year ago

Likewise, same problem

docker ps
request returned Bad Gateway for API route and version http://%2FUsers%2Fmoh%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json, check if the server supports the requested API version
aboggis-lc commented 1 year ago

Another one here. I'd post the result of docker info, but it's just hanging. Latest docker version (just downloaded & installed), running on MacOS Sonoma, MacBook Pro M2.

I am now able to successfully create/run containers on my M2 Mac. In Docker Desktop, hit settings, go to "Features in Development", and turn ON "Use Rosetta".

image

rfay commented 1 year ago

@aboggis-lc if you are on Apple Silicon and need Rosetta to run arm64 containers (for example, docker run -it ubuntu bash -c "echo hi there" something is really wrong; you have probably installed the wrong version of Docker Desktop. You need the Apple Silicon version. Most docker images these days have dual versions; you may have one that is old and amd64 only. Your situation has nothing to do with this issue.

aboggis-lc commented 1 year ago

@aboggis-lc if you are on Apple Silicon and need Rosetta to run arm64 containers (for example, docker run -it ubuntu bash -c "echo hi there" something is really wrong; you have probably installed the wrong version of Docker Desktop. You need the Apple Silicon version. Most docker images these days have dual versions; you may have one that is old and amd64 only. Your situation has nothing to do with this issue.

Perhaps. I am just reporting what resolved my issue, which, at the time, seemed related. Hence my previous post.

Mohannadcse commented 1 year ago

so what's the solution>

stathis-alexander commented 1 year ago

Upgrading to docker desktop version 4.24.2 (124339) has resolved the issue for a colleague of mine.

uduakabaci commented 1 year ago

Another one here. I'd post the result of docker info, but it's just hanging. Latest docker version (just downloaded & installed), running on MacOS Sonoma, MacBook Pro M2.

I am now able to successfully create/run containers on my M2 Mac. In Docker Desktop, hit settings, go to "Features in Development", and turn ON "Use Rosetta".

image

This worked for me!

Mohannadcse commented 1 year ago

nasty solution, but worked for me 1- brew uninstall --cask docker 2- Manual removal like

rm -rf  /usr/local/lib/docker
rm /usr/local/etc/bash_completion.d/docker

3- brew install --cask docker, it might fail due to some residual files/folders, remove them and repeat the brew command

0927HQY commented 1 year ago

这里还有另一张。我会发布 的结果docker info,但它只是挂起。最新的 docker 版本(刚刚下载并安装),在 MacOS Sonoma、MacBook Pro M2 上运行。

我现在能够在我的 M2 Mac 上成功创建/运行容器。在 Docker Desktop 中,点击设置,转到“开发中的功能”,然后打开“使用 Rosetta”。

图像my computer is intel silicon

0927HQY commented 1 year ago

这里还有另一张。我会发布 的结果docker info,但它只是挂起。最新的 docker 版本(刚刚下载并安装),在 MacOS Sonoma、MacBook Pro M2 上运行。

我现在能够在我的 M2 Mac 上成功创建/运行容器。在 Docker Desktop 中,点击设置,转到“开发中的功能”,然后打开“使用 Rosetta”。 图像

这对我有用! I opened the docker desktop I downloaded and couldn’t find the option you mentioned. Sorry.

Alexmarch1 commented 1 year ago

I had the same problem. I stopped Docker and ran it with Administrator privileges. If you have a shortcut, change it to run Docker with Administrator privileges, and the issue should be resolved. У меня была такая же проблема. Я остановил Докер и запустил его с правами Администратора. Если есть ярлык, измените его на запуск докера с правами Администратора, проблема решится , проверить потом docker info

0927HQY commented 1 year ago

Thank you, my problem has been solved. I upgraded docker to the latest version.

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年10月28日(星期六) 中午12:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [docker/for-mac] request returned Internal Server Error for API route and version 4.22.1 (Issue #6956)

我也有同样的问题。我阻止了Doker并以管理员权限启动了它如果有快捷方式,将其更改为具有管理员权限的Docker,问题将得到解决

— Reply to this email directly,view it on GitHub,orunsubscribe. You are receiving this because you commented.Message @.***和>

Tanbari commented 1 year ago

I had the same problem. I stopped Docker and ran it with Administrator privileges. If you have a shortcut, change it to run Docker with Administrator privileges, and the issue should be resolved. У меня была такая же проблема. Я остановил Докер и запустил его с правами Администратора. Если есть ярлык, измените его на запуск докера с правами Администратора, проблема решится , проверить потом docker info

Thanks very much. Your solution worked for me

stevef51 commented 1 year ago

I am running 4.25.0 and its still happening, Docker appears to run for a short period of time (~10 mins) before freezing and returning the Internal Server Error when running "docker ps"

stevef51 commented 1 year ago

It ran for couple hours today (although previous run was like 10mins) - Can someone direct me on how I can assist on this, provide logs etc ? This is terribly frustrating as it occurs several times a day.

stevef51 commented 1 year ago

I am currently trialing running as Administrator

/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/MacOS > sudo ./Docker\ Desktop

stevef51 commented 1 year ago

Ok, so running as sudo/Administrator makes no difference - Docker works perfectly for couple hours and then just stops, all containers stop responding, none predictive (ie requests to containers that worked moments ago, just stop) - "docker ps" returns Internal Server Error.
I currently "Quit Docker Desktop" and restart it - thankfully a full OSX reboot is not needed - but still painful. What logs can I provide ?

buddypia commented 1 year ago

I am currently trialing running as Administrator

/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/MacOS > sudo ./Docker\ Desktop

work for me

letzfets commented 1 year ago

/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/MacOS > sudo ./Docker\ Desktop

Does not work on MacOS with Docker 4.25.0 for me

letzfets commented 1 year ago

nasty solution, but worked for me 1- brew uninstall --cask docker 2- Manual removal like

rm -rf  /usr/local/lib/docker
rm /usr/local/etc/bash_completion.d/docker

3- brew install --cask docker, it might fail due to some residual files/folders, remove them and repeat the brew command

Even this did not work -> Starting Docker Engine keeps endlessly loading

letzfets commented 1 year ago

Now after letting the Engine start for several hours, I killed the Docker processes through Activity Monitor. That led to the com.docker.communications process offering me a factory default reset. I took that option, which solved the original problem and cleaned all images and containers from my instance. Good luck folks. This seems to be related

iRay commented 1 year ago

Updated docker to the latest version and installed rosetta solved the issue:

softwareupdate --install-rosetta

According to the documentation Mac with Apple silicon:

Beginning with Docker Desktop 4.3.0, we have removed the hard requirement to install Rosetta 2. There are a few optional command line tools that still require Rosetta 2 when using Darwin/AMD64. See Known issues. However, to get the best experience, we recommend that you install Rosetta 2. To install Rosetta 2 manually from the command line, run the following command: $ softwareupdate --install-rosetta

stevef51 commented 1 year ago

My Mac is Intel, so Rosetta is not the problem. So to clarify, running as normal user or sudo makes no difference. When Docker Desktop is run, it fires up quickly and everything works seemlessly for a while. I am a developer and have ~20 containers running and VSCode Dev Containers for development. What I have seen with this problem this week is my Dev Container is running fine, processing requests and then suddenly it stops responding, I then quickly run "docker ps" on terminal and it hangs and eventually returns the Internal Server Error image image image

stevef51 commented 1 year ago

Ok, I am not sure when this happened or whether it is related to the Internal Server Error - but I found that my Docker Desktop is configured to use all 16 cores on my 16 core system, not how I normally configure it since that leaves 0 cores for OSX to run with, really not sure how this changed as I would definitely not have changed it myself - perhaps one of the upgrades has affected this setting? Anyway, I have set the CPU limit to 6 (out of 16) and will monitor over next few days - fingers crossed

stevef51 commented 1 year ago

Nope - that made no difference - I am going back to older version of Docker Desktop, this is not stable at all.

gaspo53 commented 1 year ago

This is happening randomly with various API endpoints, for example:

request returned Internal Server Error for API route and version http://%2FUsers%2Fgaspar%2F.docker%2Frun%2Fdocker.sock/v1.24/auth, check if the server supports the requested API version
make: *** [.ecr-login.mc] Error 1
request returned Internal Server Error for API route and version http://%2FUsers%2Flucasv%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json?all=1, check if the server supports the requested API version

Version 4.25, macOS Sonoma, M1 Max

stevef51 commented 1 year ago

I have gone back to 4.20.1 which has not exhibited the issue since rolling back to it (over 24 hours)

shgzb99 commented 1 year ago

这里还有另一张。我会发布 的结果docker info,但它只是挂起。最新的 docker 版本(刚刚下载并安装),在 MacOS Sonoma、MacBook Pro M2 上运行。

我现在能够在我的 M2 Mac 上成功创建/运行容器。在 Docker Desktop 中,点击设置,转到“开发中的功能”,然后打开“使用 Rosetta”。 图像

这对我有用! I opened the docker desktop I downloaded and couldn’t find the option you mentioned. Sorry.

Does not work on MacOS with Docker 4.25.0 for me

Does not work on MacOS with Docker 4.25.0 for me

haanguloo commented 1 year ago

I have gone back to 4.20.1 which has not exhibited the issue since rolling back to it (over 24 hours)

@stevef51 Thanks dude, this one worked out on my end!

abhilesh commented 1 year ago

Just adding that on Docker v4.25.0 on M1 Mac Mini, Mac OS Sonoma 14.0, this issue crops up every 30 minutes or so, making it virtually unusable.

nothing2obvi commented 1 year ago

I have gone back to 4.20.1 which has not exhibited the issue since rolling back to it (over 24 hours)

Thank you; this worked for me. Running Docker 4.20.1 on Intel Mac, Monterey 12.6. Was previously on 4.25.0 which was causing the problem.

alicedb2 commented 1 year ago

Same issue/error, Docker v4.25.0 on M2 Air running MacOS Ventura 13.6. Trying to use BinaryBuilder.jl in Julia which uses Docker for cross-compilation. The container becomes unresponsive/unreachable almost immediately when firing up ./configure with nothing but the "Bad Gateway for API route and version" error left in the logs. Neither sudo nor enabling rosetta worked.

Reverting back to v4.20.1 worked.

austinarchibald commented 1 year ago

Getting this issue every day or so on macOS Sonoma 14.1, have to manually shut down docker and relaunch. For those who downgraded, why 4.20.1 (released 2023-06-05) and nothing between that and latest (v4.25.0)? Is the issue in each release from 4.21-25 for the past few months? In the meantime, I'll downgrade as others have and avoid upgrading until stable reports.

alicedb2 commented 1 year ago

Getting this issue every day or so on macOS Sonoma 14.1, have to manually shut down docker and relaunch. For those who downgraded, why 4.20.1 (released 2023-06-05) and nothing between that and latest (v4.25.0)? Is the issue in each release from 4.21-25 for the past few months? In the meantime, I'll downgrade as others have and avoid upgrading until stable reports.

I can confirm that in my case at least it seems to actually work all the way up to 4.22.1 on Ventura 13.6.

Then from 4.23.0 to 4.24.2 the container straight up crashes with the following scary-looking error message and takes Docker Desktop out with it.

docker 2 24 2 binarybuilder crash

With 4.25.0 Docker Desktop survives but the container becomes unresponsive/unreachable, the "Virtual Machine Service" process is stuck at 750% cpu usage, and I eventually get the API error in the logs

request returned Internal Server Error for API route and version 
http://%2FUsers%2Falice%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/313cba7be9f2708acf1266bc7244ca0b11eeb06a736b77b6e22aeab2a8264789/json, 
check if the server supports the requested API version
abhilesh commented 1 year ago

How does one downgrade docker keeping all container data intact?

sopello commented 1 year ago

Try to disable Resource Saver (Settings > Resource Saver) - looks like it works for me on 4.25.1, Sonoma 14.1.1 and M2. Might be the cause and was first introduced in 4.22 so matches first report.

reillyp6 commented 1 year ago

Currently experiencing the same issue on MacOS Sonoma 14.1.1, Intel. Was working fine until I upgraded to 4.25.1. Now whenever I start Docker Desktop it hangs on the "Starting the Docker engine..." screen. When I run docker ps or docker info I get "request returned Internal Server Error for API route and version .... check if the server supports the requested API version".

I tried uninstalling and reinstalling some older versions but now experiencing the same issues with older versions (have tried as far back as 4.20.1)

Any ideas as to what the cause or solution to this might be?

michalpristas commented 1 year ago

macos sonoma, 4.25.1 it's basically unusable. errors/timeouts building, failed to load containers/images.. tried reinstall, purge, reset to defaults

BasitAli05 commented 1 year ago

Upgrading to docker desktop version 4.24.2 (124339) has resolved the issue for a colleague of mine.

I have docker version 4.25.2 getting same problem

stevef51 commented 1 year ago

I have had 0 issues since downgrading to 4.20.1 - I also make sure (since this has stung me a couple times) that I dont have any data in containers/volumes that I can't afford to lose. Instead I will mount host volumes so data is stored on my host drive, all other containers are either built images or dev-containers with Github repo for source.

ldeveber commented 1 year ago

nasty solution, but worked for me 1- brew uninstall --cask docker 2- Manual removal like

rm -rf  /usr/local/lib/docker
rm /usr/local/etc/bash_completion.d/docker

3- brew install --cask docker, it might fail due to some residual files/folders, remove them and repeat the brew command

I just got this error, but this fixed it! It seems my docker cli was very out of date.

EDIT 12/4/2023 - this did not work, and this is still an issue for me.

Screenshot 2023-11-20 at 11 37 11 AM
khnbzkrt commented 1 year ago

I solved problem this checkbox set as checked image

austinarchibald commented 1 year ago

@khnbzkrt This made my containers all disappear upon apply + restart. I turned the feature off and they all appeared again. Must I re-run docker compose for all containers after enabling the feature? And should WASM be enabled as well? Why would containerd fix my problem of needing to restart docker once every day or so? Isn't it purely for just faster startup time?