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

Failed to start the Docker Engine after update to last version 4.19.0 (getting WSL version: exit status 0xffffffff) #13445

Closed
2 of 3 tasks
jlumbierres opened this issue Apr 30, 2023 · 17 comments

Comments

@jlumbierres
Copy link

jlumbierres commented Apr 30, 2023

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: B5370082-C00F-4B3D-AC18-AB44D4864579/20230430155922

Actual behavior

Docker stopped.
And it shows this Erros
System.Exception:
2 errors occurred:
* starting keep alive in the data distro: waiting for wsl-keepalive to be ready: running wsl-keepalive in "docker-desktop-data": exit status 0xffffffff
* checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: No se encuentra el nombre de red especificado.

en Docker.Engines.WSL2.LinuxWSL2Engine.d__10.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:línea 93
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:línea 29
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:línea 79
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:línea 108
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Docker.ApiServices.StateMachines.EngineStateMachine.d__17.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:línea 97
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Docker.Engines.Engines.d__25.MoveNext() en C:\workspaces\PR-21718\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:línea 126

Expected behavior

Docker running

Information

  • Windows Version: Windows 10 Professional
  • Docker Desktop Version: Last version 4.19.0(106363)
  • WSL2 or Hyper-V backend?
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM:
  • No, im running in the Windows 10 itself

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

com.docker.diagnose.exe.log

Steps to reproduce the behavior

  1. ...
  2. ...
@ctalledo
Copy link

ctalledo commented May 3, 2023

Hi @jlumbierres, sorry to hear you found a problem and thanks for filing the report.

Could you please provide the output of executing wsl --version on the Windows command line prompt or Powershell?

Thanks!

@ctalledo
Copy link

ctalledo commented May 3, 2023

Initial analysis shows Docker Desktop failed to start, presumably because it had trouble determining the version of WSL on the host. The com.docker.backend logs show:

[2023-04-30T15:51:58.124644600Z][com.docker.backend.exe][E] getting WSL version: exit status 0xffffffff

...

[2023-04-30T15:52:13.413624000Z][com.docker.backend.exe][I] (e0c16652) 75c70201-BackendAPI S->C 7bf9145c-DiagkitPKG GET /events (519.9µs): [1682869784192274000 (from server) docker: starting (LinuxWSL2Engine is starting)  1682869798528229600 (from server) docker: failed to start (LinuxWSL2Engine failed to start: 2 errors occurred:
        * starting keep alive in the data distro: waiting for wsl-keepalive to be ready: running wsl-keepalive in "docker-desktop-data": exit status 0xffffffff
        * checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: No se encuentra el nombre de red especificado.

This WSL version check was added in Docker Desktop 4.19.

@jakubvedral
Copy link

jakubvedral commented May 4, 2023

I have the same problem :(

@ctalledo
Copy link

ctalledo commented May 4, 2023

I have the same problem :(

Sorry to hear that @jakubvedral; can you please provide the output of wsl --version on the Windows command line prompt or Powershell?

Thanks!

@jlumbierres
Copy link
Author

Sorry to say this but docker its already in function

@ctalledo
Copy link

ctalledo commented May 5, 2023

Sorry to say this but docker its already in function

Thanks @jlumbierres; do you mean it works now (i.e., it started successfully)? If so, did you change anything on the host?

@jakubvedral
Copy link

I solved it by downgrading to 4.18

@ctalledo wsl --version is not valid command

Output of:

wsl -l -v

is:

  NAME                   STATE           VERSION
* Ubuntu                 Stopped         2
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2

@ctalledo
Copy link

ctalledo commented May 7, 2023

Hi @jakubvedral,

What does the output of wsl --version look like on your host? (Even if it's not a valid command, please post the output of how it fails).

Context: Docker Desktop 4.19 checks for the WSL version using the wsl --version command (added in recent versions of WSL). Docker Desktop knows older versions of WSL do not support the --version flag, so it knows the command may fail. However, it expects the failure to occur in a certain way, and I suspect the failure occurs differently on your host. This is why it would be helpful for us if you can show us the output of wsl --version on your host please (even if it fails).

Also, if you update WSL to the latest version (e.g., wsl --update), I am pretty confident Docker Desktop 4.19 will start without problem.

@jaimeburnap
Copy link

jaimeburnap commented May 9, 2023

I have the same problem

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2788

@jakubvedral
Copy link

jakubvedral commented May 11, 2023

Hi @jakubvedral,

What does the output of wsl --version look like on your host? (Even if it's not a valid command, please post the output of how it fails).

Context: Docker Desktop 4.19 checks for the WSL version using the wsl --version command (added in recent versions of WSL). Docker Desktop knows older versions of WSL do not support the --version flag, so it knows the command may fail. However, it expects the failure to occur in a certain way, and I suspect the failure occurs differently on your host. This is why it would be helpful for us if you can show us the output of wsl --version on your host please (even if it fails).

Also, if you update WSL to the latest version (e.g., wsl --update), I am pretty confident Docker Desktop 4.19 will start without problem.

sorry for the delay.

It is quite useless output, but here it is :) :

 wsl --version
Invalid command line option: --version
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

            --no-launch, -n
                Do not launch the distribution after install.

    --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.

    --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.

    --unmount [Disk]
        Unmounts and detaches a disk from all WSL2 distributions.
        Unmounts and detaches all disks if called without argument.

    --update [Options]
        If no options are specified, download and install WSL from the Microsoft Store.

        Options:
            --rollback
                Revert to the previous version of the WSL 2 kernel.

            --inbox
                Only update the inbox WSL 2 kernel. Do not install WSL from the Microsoft Store.

            --web-download
                Download the most recent version of WSL from the internet instead of the Microsoft Store.
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.

I will try the update and report back. Thank you

@ctalledo
Copy link

Thanks @jakubvedral. Based on the output for wsl --version you provided, I think you are hitting the Docker Desktop 4.19 bug that occurs when checking for the WSL version.

I will try the update and report back. Thank you

Thanks. Yes, updating WSL (wsl --update) should work-around it.

@jaimeburnap
Copy link

My WSL was up to date so wsl --update didn't do anything. I did notice that if I just waited a little while docker would load.

It also seems to load on first try if it's been working and you do a wsl --shutdown and then open wsl and start docker.

@ctalledo
Copy link

My WSL was up to date so wsl --update didn't do anything. I did notice that if I just waited a little while docker would load.

Thanks @jaimeburnap for chiming in. If your WSL was up to date and wsl --version works, then the issue you are facing may appear similar to this one but likely has a different underlying cause. There are a few issues with Docker Desktop starts on WSL, some caused by WSL bugs, others related to Docker Desktop.

@jaimeburnap
Copy link

There are a few issues with Docker Desktop starts on WSL, some caused by WSL bugs, others related to Docker Desktop.

@ctalledo OK. This has been the only issue I've had so far and it's been intermittent. Are there any tickets related to that that I can take a look at? Thank you.

@ctalledo
Copy link

Hi @jaimeburnap,

Going back to this comment you made earlier:

My WSL was up to date so wsl --update didn't do anything

If WSL is up to date, when wsl --version should report something like this:

C:\> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22624.1755

But earlier you indicated that it reports:

C:\> wsl --version
Invalid command line option: --version

This means WSL is not up to date. To update it, do the following please:

  1. In your windows host, go to settings -> windows update -> advanced options and enable receive updates for other microsoft products.

  2. Open a command prompt or powershell and type wsl --update.

Give that a try and see if that works. Thanks!

@ctalledo
Copy link

FYI, the upcoming Docker Desktop 4.20 will have a fix so it better deals with hosts with old versions of WSL (i.e., where wsl --version is not supported yet).

@ctalledo
Copy link

Closing as issue is fixed in DD 4.20. Please re-open if you continue to see the same problem.

Summary:

DD 4.19 has a bug where it fails to start in Windows hosts with old WSL versions (where command wsl --version is not available).

In such hosts, DD 4.19 may fail to start and the log file at C:\Users\<USER>\AppData\Local\Docker\log\com.docker.backend.log will show an error such as getting WSL version: exit status 0xffffffff.

DD 4.20 includes a fix that allows it better deal with this scenario so it won't fail to start.

@ctalledo ctalledo changed the title Failed to start the Docker Engine after update to last version 4.19.0 Failed to start the Docker Engine after update to last version 4.19.0 (getting WSL version: exit status 0xffffffff) May 31, 2023
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

5 participants