All docker commands hang: Proxy error handling "/_ping"

I have an issue where I have freshly installed Docker Desktop on Ubuntu and all docker commands (info, version, image ls) are hanging without any output, such that I have to ctrl-c.

I start docker on the CLI with the following:

systemctl --user start docker-desktop

The status then shows this:

systemctl --user status docker-desktop
● docker-desktop.service - Docker Desktop
     Loaded: loaded (/usr/lib/systemd/user/docker-desktop.service; disabled; preset: enabled)
     Active: active (running) since Sun 2024-08-25 08:42:42 AEST; 1s ago
   Main PID: 6475 (com.docker.back)
      Tasks: 50 (limit: 37992)
     Memory: 63.6M (peak: 80.7M)
        CPU: 264ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/docker-desktop.service
             ├─6475 /opt/docker-desktop/bin/com.docker.backend
             ├─6494 /opt/docker-desktop/bin/com.docker.backend run
             ├─6517 com.docker.dev-envs -watchdog
             └─6526 com.docker.build

Aug 25 08:42:42 pretty-hate-machine com.docker.backend[6475]: [22:42:42.442055097Z][main.tasks.build      ] 2024-08-24 22:42:42 [I] setting PATH=/opt/docker-desktop/bin:/usr/local/bin:/home/courtney/.symfony5/bin:/home/courtney>
Aug 25 08:42:42 pretty-hate-machine com.docker.backend[6475]: [22:42:42.442071860Z][main.tasks.build      ] 2024-08-24 22:42:42 [I] bugsnag configured
Aug 25 08:42:42 pretty-hate-machine com.docker.backend[6475]: [22:42:42.442321361Z][main.tasks.build      ] 2024-08-24 22:42:42 [I] current docker context: desktop-linux
Aug 25 08:42:42 pretty-hate-machine com.docker.backend[6475]: [22:42:42.442685844Z][main.apiproxy         ] >> POST /grpc
Aug 25 08:42:42 pretty-hate-machine com.docker.backend[6475]: [22:42:42.547126754Z][main.electron         ][E] electron shutdown by signal: trace/breakpoint trap
Aug 25 08:42:43 pretty-hate-machine com.docker.backend[6475]: [22:42:43.410238245Z][main.ipc              ] 04195b46-DockerApiProxyBackendClient /pause/state <-- 2024-08-25T08:42:42.404798728+10:00 (59dc563f) pause resumed: init
Aug 25 08:42:43 pretty-hate-machine com.docker.backend[6475]: [22:42:43.410284023Z][main.ipc              ] 04195b46-DockerApiProxyBackendClient /pause/state <-- 2024-08-25T08:42:43.410184469+10:00 (5fe9e325) ipc ready:
Aug 25 08:42:43 pretty-hate-machine com.docker.backend[6475]: [22:42:43.410323722Z][main.ipcstream        ] LastEvent: /pause/state server sync completed
Aug 25 08:42:43 pretty-hate-machine com.docker.backend[6475]: [22:42:43.410364906Z][main.apiproxy         ] >> HEAD /_ping
Aug 25 08:42:43 pretty-hate-machine com.docker.backend[6475]: [22:42:43.410451596Z][main.apiproxy         ] >> HEAD /_ping

If I run docker info it hangs with no output, but the docker-desktop status shows the following.

Aug 25 08:42:47 pretty-hate-machine com.docker.backend[6475]: [22:42:47.406768879Z][main.segment          ] flushing 1 messages
Aug 25 08:42:48 pretty-hate-machine com.docker.backend[6475]: [22:42:48.327213556Z][main.segment          ] response 200 OK
Aug 25 08:43:39 pretty-hate-machine com.docker.backend[6475]: [22:43:39.462292676Z][main.apiproxy         ] >> HEAD /_ping
Aug 25 08:43:41 pretty-hate-machine com.docker.backend[6475]: [22:43:41.463412775Z][main.apiproxy         ][W] Proxy error handling "/_ping": context canceled
Aug 25 08:43:41 pretty-hate-machine com.docker.backend[6475]: [22:43:41.463796174Z][main.apiproxy         ] >> HEAD /_ping

If I ctrl-c the docker info command, it does output the info, followed by an error message

$ docker info
^CClient: Docker Engine - Community
 Version:    27.1.2
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.1-desktop.1
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-desktop.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     /usr/lib/docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.14
    Path:     /usr/lib/docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /usr/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     /usr/lib/docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /usr/lib/docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     /usr/lib/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:     /usr/lib/docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.11.0
    Path:     /usr/lib/docker/cli-plugins/docker-scout

Server:
ERROR: Get "http://%2Fhome%2Fcourtney%2F.docker%2Fdesktop%2Fdocker.sock/v1.46/info": context canceled
errors pretty printing info

I’m at a loss for how to troubleshoot – I can’t find any reports of this issue by others.

(Note that I had some issues with which I believed to be related to conflicting docker installs, which I described at Recovering from conflicting Docker Compose versions but now I believe that is sorted.)

Which version of Docker Desktop for Linux did you install? I had to downgrade to 4.32 to get it working.

See Docker Desktop for Linux 4.33.0 on Ubuntu 22.04 not working after update

I had to downgrade to 4.32 to get it working.

I got really excited my solution might have been this simple – but alas.

I was running Docker Desktop 4.33.0-160616. I downgraded to 4.32.0-157355 and still have the same issue.

I’m specifically running Ubuntu 24.04 LTS.

I have realised that docker info will run fine when the docker daemon is not running. It seems when the daemon is running, it gets stuck when trying to connect to it.

With the install of Docker Desktop, I have overlooked the note that says Ubuntu 24.04 is not supported.

I have ran the following command as the install guide suggested.

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

This gets me to a new error that appears when Docker Desktop GUI pops up, relating to qemu. I’m investigating whe the cause might be.

running engine: waiting for the Docker API: engine linux/qemu failed to run: running VM: qemu: process terminated unexpectedly: exit status 1

I uninstalled Docker Desktop, and instead installed docker via the instructions at How to Install Docker on Ubuntu 24.04 | Vultr Docs This seems to work perfectly.


I tried finding instruction at docs.docker.com for how to install without having to install Docker Desktop, but I could not identify what was relevant to my needs, and in the case of the Docker Compose docs, it linked back to Docker Desktop for how to install.

Searching for “docker install” on Google should give you this as a first result

You choose a distribution (not desktop) and the guide contains the installation of docker compose as well. But it looks like the guide you found uses the official repository.