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

in wsl2 run docker info got ERROR: request returned Internal Server Error for API route and version...

Open eveforest opened this issue 2 years ago • 13 comments

Description

after install docker-for-win, in wsl2 run docker info got ERROR: request returned Internal Server Error for API route and version http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info, check if the server supports the requested API version

Reproduce

docker info

Expected behavior

run docker cli command success in wsl2

docker version

request returned Internal Server Error for API route and version http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version, check if the server supports the requested API version
Client: Docker Engine - Community
 Cloud integration: v1.0.35+desktop.4
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:32:16 2023
 OS/Arch:           linux/amd64
 Context:           default

docker info

Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.4
    Path:     /usr/local/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0-desktop.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /usr/local/lib/docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.7
    Path:     /usr/local/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/local/lib/docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.24.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-scout

Server:
ERROR: request returned Internal Server Error 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

Diagnostics ID

43E9627B-FE87-4715-B390-6257A875E52D/20230921050807

Additional Info

also see desktop pops up this error: image

eveforest avatar Sep 21 '23 05:09 eveforest

my system: window11 22621.2283 using wsl2 ubuntu-22.04.02 LTS

eveforest avatar Sep 21 '23 05:09 eveforest

Same as mac issue:

  • https://github.com/docker/for-mac/issues/6956

rfay avatar Sep 25 '23 22:09 rfay

Another diagnostic: 714965AA-305C-4811-B395-B1F87D1BCF18/20230925223604

rfay avatar Sep 25 '23 22:09 rfay

This may be the same as https://github.com/docker/for-win/issues/13585#issuecomment-1674167909 (see image there). It may just be what docker tells you these days when the daemon has died.

rfay avatar Sep 25 '23 23:09 rfay

You can try older versions. It seems to be the bug of the latest version, I don't exactly know the reason, but I installed an old version and figured it out.

Campbell0 avatar Oct 08 '23 11:10 Campbell0

I downgraded my Windows Docker Desktop to version 4.23.0, and this fixed the problem.

Previously I was using version 4.24.2

ziyun avatar Oct 20 '23 14:10 ziyun

Bad practice, and it destroys everything running on your docker engine - but I finally just ran

docker kill *

Upon doing so, a docker prompt appeared asking if I wanted to reset docker to factory defaults. I did so, and everything seems to be working again.

Running Windows Docker Desktop version 4.25.1.

bradenkwebb avatar Nov 20 '23 20:11 bradenkwebb

I've encountered this while doing experimental things with Vite. This fixes the issue for me.

  1. Open Powershell as administrator

    wsl --shutdown
    
  2. Docker will prompt for termination, allow it to terminate.

  3. Restart Docker

Shawn-Armstrong avatar Jan 04 '24 18:01 Shawn-Armstrong

Hi, I have the same issue.

Have tried the following:

  • restart docker desktop (works temporarily, like for one docker command, then the same issue resurfaces)
  • clean reinstallation
  • wsl --shutdown

Nothing seems to be a proper solution that works for me. The same error still keeps appearing.

Anyone able to help?

GloriaNeo avatar Jun 28 '24 04:06 GloriaNeo

same for me as @GloriaNeo . Can someone help on this issue?

alankarjain05 avatar Jul 16 '24 02:07 alankarjain05

@alankarjain05 @GloriaNeo i uninstall wsl2 and docker, and reinstall the latested version(docker desktop v4.31) , everything work fine.

wsl -l -v
wsl --unregister [your wsl disro]

eveforest avatar Jul 26 '24 07:07 eveforest

I am seeing the same error message on the console and Docker Desktop shows Image randomly after suspend to ram. Very annoying!

cvjjm avatar Dec 09 '24 08:12 cvjjm