Docker: WSL 2 integration with distro Ubuntu 20.04 unexpectedly stopped with exit code 1

Viewed 4440

My docker environment was working fine. I restarted my system and it stopped unexpectedly. whenever I try to start docker it throws the following error

WSL 2 integration with distro Ubuntu 20.04 unexpectedly stopped with exit code 1.

I am using the following versions

  • Windows 10
  • Docker Desktop 4.6.1
  • WSL 2
  • List item
  • .wslconfig (memory=8GB, processors=4)

I have tried following patterns to make it run

  • restarted docker and windows many times
  • done with wsl upgrade > sudo apt update && sudo apt upgrade -y
3 Answers

I had the same issue when updated docker desktop with WSL2 backed has a work around I did the following steps:

  1. In docker desktop settings i enabled again the "enabled integration with other distros"
  2. Apply and restart the changes then stop Docker desktop.
  3. Enter to Settings -> Apps and search for ubuntu
  4. Click on Ubuntu and advanced settings
  5. Select repair
  6. Restart the computer
  7. After computer starts enter to the ubuntu wsl via console or terminal
  8. Start docker desktop
  9. Try docker ps or docker-compose to check if the error was resolved.

Hope this helps!

Please try this solution comes from todpale:

  1. close Docker Desktop
  2. restart Ubuntu through services.msc or this command (you can put in bat): net stop LxssManager && net start LxssManager
  3. start Docker again

You also may check if your distro is enabled in Docker settings (General tab and Resources tab -> WSL Integration).

There is a discussion about this issue on Github https://github.com/docker/for-win/issues/9972

Unfortunately none of the solutions here worked for me. Steps to fix were:

  1. Update WSL2 Ubuntu distro:
sudo apt update
sudo apt upgrade
  1. Uninstall Docker Desktop on Windows
  2. Reinstall Docker Desktop on Windows

Note that containers and volumes were lost with the uninstall.

Related