docker / for-win

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

Diagnose tool doesn't work from PowerShell/Windows Terminal #14406

Open QuAzI opened 7 hours ago

QuAzI commented 7 hours ago

Description

Image

Reproduce

Run PowerShell or Windows Terminal with defaults Try to run com.docker.diagnose.exe

"C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe"

Expected behavior

Diagnostic data

docker version

Client: Version: 27.3.1 API version: 1.47 Go version: go1.22.7 Git commit: ce12230 Built: Fri Sep 20 11:42:27 2024 OS/Arch: windows/amd64 Context: desktop-linux

Server: Docker Desktop 4.35.1 (173168) Engine: Version: 27.3.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 41ca978 Built: Fri Sep 20 11:41:11 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0

docker info

Client: Version: 27.3.1 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.17.1-desktop.1 Path: C:\Users\rusla.docker\cli-plugins\docker-buildx.exe compose: Docker Compose (Docker Inc.) Version: v2.29.7-desktop.1 Path: C:\Users\rusla.docker\cli-plugins\docker-compose.exe debug: Get a shell into any image or container (Docker Inc.) Version: 0.0.37 Path: C:\Users\rusla.docker\cli-plugins\docker-debug.exe desktop: Docker Desktop commands (Alpha) (Docker Inc.) Version: v0.0.15 Path: C:\Users\rusla.docker\cli-plugins\docker-desktop.exe dev: Docker Dev Environments (Docker Inc.) Version: v0.1.2 Path: C:\Users\rusla.docker\cli-plugins\docker-dev.exe extension: Manages Docker extensions (Docker Inc.) Version: v0.2.27 Path: C:\Users\rusla.docker\cli-plugins\docker-extension.exe feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: v1.0.5 Path: C:\Users\rusla.docker\cli-plugins\docker-feedback.exe init: Creates Docker-related starter files for your project (Docker Inc.) Version: v1.3.0 Path: C:\Users\rusla.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:\Users\rusla.docker\cli-plugins\docker-sbom.exe scout: Docker Scout (Docker Inc.) Version: v1.14.0 Path: C:\Users\rusla.docker\cli-plugins\docker-scout.exe

Server: Containers: 72 Running: 55 Paused: 0 Stopped: 17 Images: 219 Server Version: 27.3.1 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 splunk syslog Swarm: inactive Runtimes: runc io.containerd.runc.v2 nvidia Default Runtime: runc Init Binary: docker-init containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111 runc version: v1.1.13-0-g58aa920 init version: de40ad0 Security Options: seccomp Profile: unconfined Kernel Version: 5.15.153.1-microsoft-standard-WSL2 Operating System: Docker Desktop OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 31.06GiB Name: docker-desktop ID: 19910013-dea0-41db-81eb-379eea11b5bb 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 Labels: com.docker.desktop.address=npipe://\.\pipe\docker_cli 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

Diagnostics ID

Doesn't work at all

Additional Info

I can't even imagine why Diagnostics ID required while nothing works at all

C:\Projects>"C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
Starting diagnostics

[2024-11-05T07:19:19.435608700Z][com.docker.diagnose.exe.ipc] 3d771d12-diagnose -> \\.\pipe\dockerBackendApiServer BackendAPI
[2024-11-05T07:19:19.443526800Z][com.docker.diagnose.exe.ipc] (1b98d6f8) 3d771d12-diagnose C->S BackendAPI POST /idle/make-busy
[2024-11-05T07:19:19.444603400Z][com.docker.diagnose.exe.ipc] (1b98d6f8) 3d771d12-diagnose C<-S 86202f58-BackendAPI POST /idle/make-busy (1.0491ms): 0xc000766fa0
[2024-11-05T07:19:20.450497100Z][com.docker.diagnose.exe.ipc] (1b98d6f8-1) 3d771d12-diagnose C->S BackendAPI GET /idle
[2024-11-05T07:19:20.451587700Z][com.docker.diagnose.exe.ipc] (1b98d6f8-1) 3d771d12-diagnose C<-S 86202f58-BackendAPI GET /idle (1.0906ms): {"booted":true,"busyReason":["54 container(s)","timed activities: map[/idle/make-busy:28992483800]"],"containers":54,"timedActivities":{"/idle/make-busy":28992483800},"vmRunning":true}
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[SKIP] DD0002: does the bootloader have virtualization enabled?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[SKIP] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[SKIP] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? listing block devices: : exit status 0xffffffff
[PASS] DD0035: is the VM time synchronized?
[FAIL] DD0017: can a VM be started? prereq failed: is the WSL 2 Linux filesystem corrupt?
[FAIL] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started?
[FAIL] DD0004: is the Docker engine running? prereq failed: is the LinuxKit VM running?
[PASS] DD0015: are the binary symlinks installed?
[FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running?
[PASS] DD0013: is the $PATH ok?
[FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running?
[FAIL] DD0005: is the user in the docker-users group? prereq failed: is the LinuxKit VM running?
[FAIL] DD0037: is the connection to Docker working? prereq failed: is the Docker engine running?
[FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running?
[FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running?
[FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running?
[FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running?
[SKIP] DD0006: is the Docker Desktop Service responding?
[FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[WARN] DD0029: is the WSL 2 Linux filesystem corrupt? listing block devices: : exit status 0xffffffff
[PASS] DD0035: is the VM time synchronized?
[WARN] DD0017: can a VM be started? prereq failed: is the WSL 2 Linux filesystem corrupt?
[WARN] DD0016: is the LinuxKit VM running? prereq failed: can a VM be started?
[WARN] DD0004: is the Docker engine running? prereq failed: is the LinuxKit VM running?
[PASS] DD0015: are the binary symlinks installed?
[WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running?
[WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work?
segment 2024/11/05 10:19:22 ERROR: sending request - Post "https://api.segment.io/v1/batch": dial tcp: lookup api.segment.io: getaddrinfow: The requested name is valid, but no data of the requested type was found.
segment 2024/11/05 10:19:22 ERROR: 1 messages dropped because they failed to be sent and the client was closed

Please note the following 6 warnings:

1 : The check: is the WSL 2 Linux filesystem corrupt?
    Produced the following warning: listing block devices: : exit status 0xffffffff

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start.
There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see:
https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will
run a filesystem check and hopefully fix the problem.

2 : The check: can a VM be started?
    Produced the following warning: prereq failed: is the WSL 2 Linux filesystem corrupt?

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

3 : The check: is the LinuxKit VM running?
    Produced the following warning: prereq failed: can a VM be started?

The Docker engine runs inside a Linux VM. Therefore the VM must be running.

4 : The check: is the Docker engine running?
    Produced the following warning: prereq failed: is the LinuxKit VM running?

The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start.

5 : The check: does the Docker API work?
    Produced the following warning: prereq failed: is the Docker engine running?

If the Docker API is not available from the host then Docker Desktop will not work correctly.

6 : The check: do Docker networks overlap with host IPs?
    Produced the following warning: prereq failed: does the Docker API work?

If the subnet used by a Docker network overlaps with an IP used by the host, then containers
won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml.
See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

Please investigate the following 1 issue:

1 : The test: is the WSL 2 Linux filesystem corrupt?
    Failed with: listing block devices: : exit status 0xffffffff

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start.
There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see:
https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will
run a filesystem check and hopefully fix the problem.
karman-docker commented 6 hours ago

@QuAzI Can you try this please on Power Shell terminal. & 'C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe' check

QuAzI commented 5 hours ago

@karman-docker this works

karman-docker commented 5 hours ago

@QuAzI Thanks for confirming. Did you encounter an issue for which you were trying to gather diagnostics ? If the issue was only with running the diagnose.exe tool, can I close this ? Thank you.

QuAzI commented 5 hours ago

In #14405 I found that Diagnostics ID from this tool is required to report the bug

QuAzI commented 5 hours ago

Also logs in Additional Info looks... like nothing should work but it does)