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

Docker Desktop - Unexpected WSL error #14580

Open
ambm3498 opened this issue Feb 6, 2025 · 2 comments
Open

Docker Desktop - Unexpected WSL error #14580

ambm3498 opened this issue Feb 6, 2025 · 2 comments

Comments

@ambm3498
Copy link

ambm3498 commented Feb 6, 2025

Description

I encountered an unexpected WSL error when trying to start Docker Desktop. The error message indicates an issue with mounting the VHDX file.

Error message:

It starts up and than runs for a 30 seconds till i get this error report

An unexpected error occurred while executing a WSL command.
Error: exit code: 4294967295
checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.

Docker Desktop - Unexpected WSL error
An unexpected error occurred while executing a WSL command.

Either shut down WSL down with wsl --shutdown, and/or reboot your machine. You can also try reinstalling WSL and/or Docker Desktop. If the issue persists, collect diagnostics and submit an issue ⁠.

deploying WSL2 distributions
ensuring data disk is available: exit code: 4294967295: running WSL command wsl.exe C:\Windows\System32\wsl.exe --mount --bare --vhd \AppData\Local\Docker\wsl\disk\docker_data.vhdx: Copyright (c) Microsoft Corporation. All rights reserved.

Usage: wsl.exe [Argument] [Options...] [CommandLine]

Arguments for running Linux binaries:

If no command line is provided, wsl.exe launches the default shell.



--exec, -e <CommandLine>

    Execute the specified command without using the default Linux shell.



--

    Pass the remaining command line as is.

Options:

--cd <Directory>

    Sets the specified directory as the current working directory.

    If ~ is used the Linux user's home path will be used. If the path begins

    with a / character, it will be interpreted as an absolute Linux path.

    Otherwise, the value must be an absolute Windows path.



--distribution, -d <Distro>

    Run the specified distribution.



--user, -u <UserName>

    Run as the specified user.



--system

    Launches a shell for the system distribution.

Arguments for managing Windows Subsystem for Linux:

--help

    Display usage information.


--install [Options]

    Install additional Windows Subsystem for Linux distributions.

    For a list of valid distributions, use 'wsl --list --online'.



    Options:

        --distribution, -d [Argument]

            Downloads and installs a distribution by name.



            Arguments:

                A valid distribution name (not case sensitive).



            Examples:

                wsl --install -d Ubuntu

                wsl --install --distribution Debian



--set-default-version <Version>

    Changes the default install version for new distributions.



--shutdown

    Immediately terminates all running distributions and the WSL 2

    lightweight utility virtual machine.



--status

    Show the status of Windows Subsystem for Linux.



--update [Options]

    If no options are specified, the WSL 2 kernel will be updated

    to the latest version.



    Options:

        --rollback

            Revert to the previous version of the WSL 2 kernel.

Arguments for managing distributions in Windows Subsystem for Linux:

--export <Distro> <FileName>

    Exports the distribution to a tar file.

    The filename can be - for standard output.



--import <Distro> <InstallLocation> <FileName> [Options]

    Imports the specified tar file as a new distribution.

    The filename can be - for standard input.



    Options:

        --version <Version>

            Specifies the version to use for the new distribution.



--list, -l [Options]

    Lists distributions.



    Options:

        --all

            List all distributions, including distributions that are

            currently being installed or uninstalled.



        --running

            List only distributions that are currently running.



        --quiet, -q

            Only show distribution names.



        --verbose, -v

            Show detailed information about all distributions.



        --online, -o

            Displays a list of available distributions for install with 'wsl --install'.



--set-default, -s <Distro>

    Sets the distribution as the default.



--set-version <Distro> <Version>

    Changes the version of the specified distribution.



--terminate, -t <Distro>

    Terminates the specified distribution.



--unregister <Distro>

    Unregisters the distribution and deletes the root filesystem.



--mount <Disk>

    Attaches and mounts a physical disk in all WSL2 distributions.



    Options:

        --bare

            Attach the disk to WSL2, but don't mount it.



        --type <Type>

            Filesystem to use when mounting a disk, if not specified defaults to ext4.



        --options <Options>

            Additional mount options.



        --partition <Index>

            Index of the partition to mount, if not specified defaults to the whole disk.



--unmount [Disk]

    Unmounts and detaches a disk from all WSL2 distributions.

    Unmounts and detaches all disks if called without argument.

: exit status 0xffffffff
checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.
Read our policy for uploaded diagnostic data⁠

Fixes I have tried:
I reinstalled ubuntu,docker,wsl through cmd and powershell
Restarted WSL (wsl --shutdown).
Restarted the LxssManager service.
Updated WSL (wsl --update).
Reset Docker Desktop WSL integration.
Deleted and recreated the docker_data.vhdx file.
Reinstalled both Docker Desktop and WSL.
Running wsl -l -v shows that docker-desktop is in a Stopped state.
Running docker version inside WSL gives "Cannot connect to the Docker daemon at unix:///var/run/docker.sock."
Restarting Docker Desktop and WSL does not resolve the issue.

This issue persists even after reinstalling Docker Desktop and resetting WSL.
Made sure Virtualization was on in bios

Below image shows when i check status through powershell the intial run is from docker app
Image
after this when docker crashes the status changes to stopped again

Image

Here is the latest log file from docker

PS C:\Windows\system32> Get-Content "C:\Users\AppData\Local\Docker\log\host\com.docker.backend.exe.log" -Tail 50

--unmount [Disk]

    Unmounts and detaches a disk from all WSL2 distributions.

    Unmounts and detaches all disks if called without argument.

: exit status 0xffffffff
checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.extensions] exiting goroutine updating extensions in marketplace
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.socketforward] closing virtual listener on http-proxy
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.otelmgr] shut down started
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.ipc] (6106211c) e59ae092-desktop_extensions S->C Docker-Desktop/4.37.1 (Windows; x64) GET /events (29.4611923s): OK
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.socketforward] closing virtual listener on http-proxy-restricted
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.socketforward] closing virtual listener on dns.system/grpc
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.statehandler] sending to Dashboard: stopping
[2025-02-06T13:03:18.162559200Z][com.docker.backend.exe.services] closing connection to /run/guest-services/wsl2-bootstrap-expose-ports.sock: context canceled
[2025-02-06T13:03:18.162559200Z][com.docker.backend.exe.services] closing connection to /run/guest-services/docker.proxy.sock: context canceled
[2025-02-06T13:03:18.162000000Z][com.docker.backend.exe.extensions] exiting goroutine updating extensions in marketplace
[2025-02-06T13:03:18.162559200Z][com.docker.backend.exe.services] closing connection to /run/guest-services/docker.proxy.sock: context canceled
[2025-02-06T13:03:18.163741900Z][com.docker.backend.exe.ipc] (4249a0e7-6) 56166619-BackendAPI S->C 2d43fea7-desktop_extensions GET /forwards/list (1.9452688s): []
[2025-02-06T13:03:18.164325400Z][com.docker.backend.exe.grpcdns] internal: stopping
[2025-02-06T13:03:18.164429300Z][com.docker.backend.exe.grpcdns] system: stopping
[2025-02-06T13:03:18.162559200Z][com.docker.backend.exe.tasks] shutting down 1 tasks
[2025-02-06T13:03:18.164867800Z][com.docker.backend.exe.state] sending desktop state:ExitHealthyState
[2025-02-06T13:03:18.164867800Z][com.docker.backend.exe.socketforward] closing virtual listener on dns.internal/grpc
[2025-02-06T13:03:18.164547300Z][com.docker.backend.exe.apiproxy] closing
[2025-02-06T13:03:18.166066800Z][com.docker.backend.exe.socketforward] closing virtual listener on dns.system/grpc
[2025-02-06T13:03:18.164547300Z][com.docker.backend.exe.extensions] extension manager server stopped
[2025-02-06T13:03:18.164547300Z][com.docker.backend.exe.ipc] (4249a0e7-2) 56166619-BackendAPI S->C 2d43fea7-desktop_extensions GET /forwards/list (21.9468191s): []
[2025-02-06T13:03:18.166581900Z][com.docker.backend.exe.tasks] shutdown group 0/0: [com.docker.build.exe]
[2025-02-06T13:03:18.166066800Z][com.docker.backend.exe.tracker] queuing DesktopState
[2025-02-06T13:03:18.166581900Z][com.docker.backend.exe.apiproxy] closing \.\pipe\docker_engine
[2025-02-06T13:03:18.166697600Z][com.docker.backend.exe.apiproxy] closing \.\pipe\dockerDesktopEngine
[2025-02-06T13:03:18.166784200Z][com.docker.backend.exe.apiproxy] closing \.\pipe\dockerDesktopLinuxEngine
[2025-02-06T13:03:18.166939300Z][com.docker.backend.exe.ipc] (6106211c) e59ae092-desktop_extensions S->C Docker-Desktop/4.37.1 (Windows; x64) GET /store/suggestions (27.6743699s): []
[2025-02-06T13:03:18.166939300Z][com.docker.backend.exe.extensions] Exiting listening to Docker events: error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.47/events?filters=%7B%22event%22%3A%7B%22die%22%3Atrue%2C%22start%22%3Atrue%7D%2C%22type%22%3A%7B%22container%22%3Atrue%7D%7D": open //./pipe/docker_engine_linux: The system cannot find the file specified.
[2025-02-06T13:03:18.166939300Z][com.docker.backend.exe.apiproxy] closing \.\pipe\dockerDesktopWindowsEngine
[2025-02-06T13:03:18.166939300Z][com.docker.backend.exe.events] adding server timestamp to event (): 1738846998166939300 dockerAPI: stopped (API proxies closed)
[2025-02-06T13:03:18.166939300Z][com.docker.backend.exe.statehandler] sending to Dashboard: stopped
[2025-02-06T13:03:18.167601800Z][com.docker.backend.exe.tracker] sending event: desktopState
[2025-02-06T13:03:18.172397500Z][com.docker.backend.exe.tasks] all 1 tasks shutdown
[2025-02-06T13:03:18.172664900Z][com.docker.backend.exe.comdockerdevenvs] dev envs stopped: context done
[2025-02-06T13:03:18.176159200Z][com.docker.backend.exe.tasks] all 1 tasks shutdown
[2025-02-06T13:03:18.176852200Z][com.docker.backend.exe.tasks] detected errors written to process stdout/stderr for C:\Program Files\Docker\Docker\resources\com.docker.build.exe
[2025-02-06T13:03:18.189820600Z][com.docker.backend.exe] shutting down analytics client
[2025-02-06T13:03:18.189820600Z][com.docker.backend.exe.segment] exit requested – draining messages
[2025-02-06T13:03:18.190162200Z][com.docker.backend.exe.segment] flushing 3 messages
[2025-02-06T13:03:18.190162200Z][com.docker.backend.exe.segment] exit
[2025-02-06T13:03:18.270821000Z][com.docker.backend.exe.electron][E] electron pid 16516 shutdown with exit code 1
[2025-02-06T13:03:18.390470800Z][com.docker.backend.exe.segment] response 200 OK


PS C:\Windows\system32> Get-Service com.docker.service

Status Name DisplayName


Stopped com.docker.service Docker Desktop Service

PS C:\Windows\system32> Start-Service com.docker.service

PS C:\Windows\system32> Get-Service com.docker.service

Status Name DisplayName


Running com.docker.service Docker Desktop Service

PS C:\Windows\system32> Get-Service com.docker.service

Status Name DisplayName


Running com.docker.service Docker Desktop Service

PS C:\Windows\system32> wsl -l -v
NAME STATE VERSION

  • Ubuntu Stopped 2
    docker-desktop Stopped 2
    PS C:\Windows\system32> Get-Service com.docker.service

Status Name DisplayName


Running com.docker.service Docker Desktop Service

Reproduce

1.Docker run

Image

2.Docker shows error message after 30 seconds

Image

Expected behavior

Docker should start up and operate and run normally.

docker version

Client:
 Version:           27.4.0
 API version:       1.47
 Go version:        go1.22.10
 Git commit:        bde2b89
 Built:             Sat Dec  7 10:40:21 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux
error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/version": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.

docker info

Client:
 Version:    27.4.0
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Ask Gordon - Docker Agent (Docker Inc.)
    Version:  v0.5.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-ai.exe
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.19.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.31.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.37
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Beta) (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    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
  scout: Docker Scout (Docker Inc.)
    Version:  v1.15.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/info": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
errors pretty printing info

Diagnostics ID

47482F54-9B9A-4B67-A4C9-704236D1D42B/20250206123014

Additional Info

you will notice in the version and info that there is a error log there aswell
I am rather confused on what is happening overall any assitance would be greatly appreciated.

@Bragolgirith
Copy link

A bit anecdotal, but what helped in my case was running Docker for Windows as an admin once.
After that I was again able to run it as a normal user.

@ambm3498
Copy link
Author

ambm3498 commented Feb 7, 2025

A bit anecdotal, but what helped in my case was running Docker for Windows as an admin once. After that I was again able to run it as a normal user.

@Bragolgirith sadly didnt work but thank you for the suggestion
ill try toubleshooting again today but or else most likely it maybe a windows issue and a fresh install of windows maybe the best option

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

No branches or pull requests

3 participants