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

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

Open
engFelipeMonteiro opened this issue Aug 27, 2023 · 157 comments

Comments

@engFelipeMonteiro
Copy link

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
Copy link

rfay commented Sep 23, 2023

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
Copy link

rfay commented Sep 23, 2023

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.

@engFelipeMonteiro engFelipeMonteiro changed the title can't connect to docker using only docker-desktop installation 4.22.1 request returned Internal Server Error for API route and version 4.22.1 Sep 25, 2023
@rfay
Copy link

rfay commented Sep 25, 2023

This is happening on Windows also, same thing:

@aboggis-lc
Copy link

aboggis-lc commented Sep 29, 2023

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
Copy link

hajimen commented Oct 20, 2023

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
Copy link

0927HQY commented Oct 26, 2023

我在 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
Copy link

0927HQY commented Oct 26, 2023

hello ,have you solved this problem?

hello ,have you solved this problem?

@Mohannadcse
Copy link

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
Copy link

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
Copy link

rfay commented Oct 26, 2023

@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
Copy link

@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
Copy link

so what's the solution>

@stathis-alexander
Copy link

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

@uduakabaci
Copy link

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
Copy link

Mohannadcse commented Oct 26, 2023

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
Copy link

0927HQY commented Oct 27, 2023

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

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

图像my computer is intel silicon

@0927HQY
Copy link

0927HQY commented Oct 27, 2023

这里还有另一张。我会发布 的结果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
Copy link

Alexmarch1 commented Oct 28, 2023

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
Copy link

0927HQY commented Oct 28, 2023 via email

@Tanbari
Copy link

Tanbari commented Oct 29, 2023

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
Copy link

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
Copy link

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
Copy link

I am currently trialing running as Administrator

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

@cohen-neria
Copy link

Same problem here, docker is not stable in the last month

@l0g1n
Copy link

l0g1n commented Apr 12, 2024

Turning on SOCKS proxy support solved the problem for me. Go to the Settings -> Features in development -> Beta features and select the checkmark for Enable SOCKS proxy support. Apply & Restart.

Screenshot 2024-03-21 at 09 55 21

solved the problem for me, thank you

@NiklasBr
Copy link

$ docker image prune -a -f --filter until=240h
request returned Internal Server Error for API route and version http://%2FUsers%2Fnikbr%2F.docker%2Frun%2Fdocker.sock/_ping, check if the server supports the requested API version

Still happens with 4.29

@eXist-FraGGer
Copy link

eXist-FraGGer commented Apr 18, 2024

Docker Desktop 4.29.0 (145265) - have to restart always.

Have script to do standart flow:

  1. Create build
  2. Create tag
  3. Push to repository (that is started at one of the docker containers)

At any step it can just stuck, in settings I see that builders are failed with error:

Builder error
request returned Internal Server Error for API route and version http://%2Fvar%2Frun%2Fdocker.sock/_ping, check if the server supports the requested API version
image

Docker desktop shows notification:
(HTTP code 500) server error -
image

I do restart docker and it works, but stuck again.

So it can be like: I do restart and able to build and push 3 images or even I do restart and again stuck at the first one.

BTW. I have:

  • disabled all extensions
  • disabled experimental features and etc.
  • enabled the proxy as suggested here.

It does not help.


So I do spend just a lot of time after each restart, start again minikube infrastructure, wait when everything ready, try again to build and push.

@h0jeZvgoxFepBQ2C
Copy link

For me worked this experimental build which enables a TCP kernel network flag: #7240 (comment)

@jeremyruffell
Copy link

For me worked this experimental build which enables a TCP kernel network flag: #7240 (comment)

Can confirm this also worked for me.

@lukecivantos
Copy link

For me worked this experimental build which enables a TCP kernel network flag: #7240 (comment)

Yeah likewise it worked for me

@CharlesParent
Copy link

Turning on SOCKS proxy support solved the problem for me. Go to the Settings -> Features in development -> Beta features and select the checkmark for Enable SOCKS proxy support. Apply & Restart.

Screenshot 2024-03-21 at 09 55 21

khwilo's answer worked for me, thanks 🙏

@laygir
Copy link

laygir commented Jun 4, 2024

Having same issues on docker desktop 4.30.0 with M3 on a large docker compose.

Use Rosetta is enabled
There is no SOCKS option anymore
Extensions disabled

@stevef51
Copy link

stevef51 commented Jun 5, 2024

@laygir you should try OrbStack, it is a 100% drop in replacement. Download it, install it, Quit Docker Desktop, do your stuff, it works without any changes - I love it.

@jkugler
Copy link

jkugler commented Jun 5, 2024

@stevef51 What about a local Kubernetes cluster. Does it set all that up for you as well?

@stevef51
Copy link

stevef51 commented Jun 5, 2024

@stevef51 What about a local Kubernetes cluster. Does it set all that up for you as well?

@jkugler I have some experience with k8s, but not recently. I see OrbStack supports k8s in the docs, but I have not used it - if its anything like the Docker support then it should be good.

The beauty of OrbStack is it just works, I tried Podman as a replacement a while back and it kinda worked after some config changes, but I could not get it to work with VSCode Dev Containers which is a must for us - OrbStack worked without changing anything - give it a try, if it doesnt work you just uninstall it and restart Docker and your back to where you are now

@kevinhq
Copy link

kevinhq commented Jun 10, 2024

Macbook Pro M2 with Docker desktop v 4.30.0 and I still see this error after re-building container. weird.

@Nicolas-Saade
Copy link

I had the same error with MacBook Pro M1 Pro, what the error might be suggesting is that the docker daemon just died. Restarting docker-desktop for me fixed the issue.

@3ddi
Copy link

3ddi commented Jun 26, 2024

Same on M1 Pro with v4.31.0. Restart helps for a little while and then crashes again

@ruscon
Copy link

ruscon commented Jun 27, 2024

#6956 (comment)

The same configuration.
Just migrated from macbook 2019 with Intel (no issues) to macbook with m3 and after sleep found this error.

Just changed some settings (with restart) and it helped, but after 5 minutes (while writing this comment) bug has appeared again.

Upd.
After that I reset all settings and the error disappeared.
Everything was fine for a couple of days.

@CarlosLeonCode
Copy link

I've to restart a couple of times to can use Docker. I'm using MacOs 14.5. But this happens with some images. I don't understand what is going on.... Someone knows?

@WoZ
Copy link

WoZ commented Jul 11, 2024

The same for me. Docker engine v4.25.2

@Patrick-SHEMA
Copy link

Patrick-SHEMA commented Jul 14, 2024

Same issue for me, mac m1 , had to restart docker desktop and it finally went back to normal

@Noahkoole
Copy link

Also an issue for me since latest docker desktop update on mac m1. Happens really often

@ericandrewmeadows
Copy link

Same as well. Happens every hour or so.

@ybrodsky
Copy link

ybrodsky commented Aug 1, 2024

This keeps happening; happens when your internet is not working great and you might experience micro cuts. 🙄

@stevef51
Copy link

stevef51 commented Aug 4, 2024 via email

@austinarchibald
Copy link

Since I found OrbStack I have not looked back - dont get me wrong, I love Docker and what they have done for containerisation but this issue was a big one and I can't believe its still occurring 6 months after I initially experienced it. OrbStack is Mac specific, faster and provides more features than Docker for Mac/Windows.

Yes, Orbstack immediately solved all my problems with docker on mac. It has been so solid, have not experienced a single crash in the past 7 months since switching. Whereas I was getting almost daily crashes on docker desktop.

@ybrodsky
Copy link

ybrodsky commented Aug 5, 2024

The problem I had with Orbstack is that when it imports from docker it does not import the networks. So when trying to fire up the containers it imported they crashed because of missing network. Got stucked there, had to limp back to docker.

@stevef51
Copy link

stevef51 commented Aug 6, 2024

@ybrodsky this is no different to setting your system up on a new Docker system, you would have to create those networks which are easily done using the exact same syntax

docker network create mynetwork

The beauty of OrbStack is that I have found it to be a 100% drop in replacement. I did not use the OrbStack import Docker data, I just re-ran all my Docker setup scripts (to create volumes, networks) and rebuilt images - but I did not have to change a single line of code, it rebuilt and runs perfectly.

@frnidito
Copy link

frnidito commented Dec 4, 2024

Is there anybody working at this issue?

@ybrodsky
Copy link

ybrodsky commented Dec 4, 2024

Is there anybody working at this issue?

Just come over to OrbStack. It works fine, seemless transition.

@enzoxic
Copy link

enzoxic commented Dec 4, 2024

Dunno how to work with a macbook air, with so low specs than is only trough an ultra light VM solution that you will be able to use it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment