docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.87k stars 289 forks source link

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

Open eveforest opened 1 year ago

eveforest commented 1 year ago

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 commented 1 year ago

my system: window11 22621.2283 using wsl2 ubuntu-22.04.02 LTS

rfay commented 1 year ago

Same as mac issue:

rfay commented 1 year ago

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

rfay commented 1 year ago

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.

Campbell0 commented 1 year ago

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.

ziyun commented 1 year ago

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

Previously I was using version 4.24.2

bradenkwebb commented 1 year ago

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.

Shawn-Armstrong commented 11 months ago

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
GloriaNeo commented 5 months ago

Hi, I have the same issue.

Have tried the following:

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

Anyone able to help?

alankarjain05 commented 4 months ago

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

eveforest commented 4 months ago

@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]