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 does not start on company computer #10985

Closed
3 tasks done
vdsbenoit opened this issue Apr 21, 2021 · 10 comments
Closed
3 tasks done

Docker desktop does not start on company computer #10985

vdsbenoit opened this issue Apr 21, 2021 · 10 comments

Comments

@vdsbenoit
Copy link

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 04064F16-2D64-44B8-91AC-164F37683E15/20210421072138

relates to #10965 #10852 #10354

Actual behavior

On my work laptop, Docker is configured to start when I log in. If I am not connected to my company VPN nor my actual company network when Docker starts, it fails and raise this error :

System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\<username>\AppData\Local\Docker\wsl\distro: exit code: -1
 stdout: Logon failure: the user has not been granted the requested logon type at this computer.

Expected behavior

Docker desktop start with success

Information

  • Windows Version: Windows 10 Pro 20H2 19042.928
  • Docker Desktop Version: 20.10.5, build 55c4c88
  • WSL2 or Hyper-V backend? WSL2 but IIRC, I've had it already with Hyper-V backend
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No
  • Is it reproducible? Yes
  • Is the problem new? No, I've had it for more than a year (before April 2020)
  • Did the problem appear with an update? No

It looks like a WSL2 issue because I cannot launch any WSL2 terminals either. I would say it is related to this issue.

It is definitely related to my company active directory since my fix to this issue is :

  • connect to the company VPN / company network
  • run gpupdate /force
  • run docker desktop again

A similar issue occurs when my computer wakes up from hibernation. Here is another fix I found in the wsl issue comments :

  • open an admin PowerShell
  • run Restart-Service vmms
  • run docker desktop again

Steps to reproduce the behavior

  1. Have a computer managed in a company AD
  2. Configure docker desktop to run WSL2 backend in an AD user session
  3. Disconnect from the company network / VPN
  4. Make a complete restart or hibernate
  5. Wake the computer up & open the AD user session
  6. Start docker without being connected to the company network / VPN
@stephen-turner
Copy link
Contributor

I think WSL 2 has not been set up correctly. See Microsoft's instructions at https://aka.ms/wsl2-install. If it's set up correctly, then the command wsl -l -v should show a version 2 distro.

@vdsbenoit
Copy link
Author

When I run wsl -l -v, I get this :

▶ wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-16.04           Stopped         1
  Ubuntu-20.04           Stopped         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2

@sworisbreathing
Copy link

sworisbreathing commented Apr 22, 2021

I am also experiencing the same problem. My diagnostic ID is F854B19F-3369-4D93-BDEB-6E6CBB2F9ECF/20210422231018.
Following @lrayman's suggestion in #8484, I restarted the Windows Management Instrumentation service and was then able to start Docker.

@ImNightwing
Copy link

I have this same issue. Following suggestions in #8484 as well, I was able to not have this error when I ran powershell restart-service vmcompute (when running Powershell as administrator)
Only a temporary fix tho. I'm no expert but seems like a bug.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@sworisbreathing
Copy link

/remove-lifecycle stale

@sworisbreathing
Copy link

/lifecycle frozen

@sworisbreathing
Copy link

I'm having mixed success resolving the issue by running gpupdate /force from a command prompt, after connecting to VPN. Sometimes it fixes the issue but other times it doesn't.

The issue has become so prevalent and so annoying that I've disabled docker desktop from starting up automatically on boot, because I pretty much have to fiddle with either gpupdate or WMI service. every. single. time.

@stephen-turner
Copy link
Contributor

This appears to be an interaction between starting WSL 2 and your company's IT settings. I don't think there's anything Docker can do about it.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants