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 on windows 10 Pro fails to start #1348

Closed
nerdoftech opened this issue Nov 20, 2017 · 19 comments
Closed

Docker on windows 10 Pro fails to start #1348

nerdoftech opened this issue Nov 20, 2017 · 19 comments

Comments

@nerdoftech
Copy link

Opening this case for co-worker who is tech writer.

Expected behavior

Docker should start.

Actual behavior

Docker fails to start.

Information

Windows 10 Pro
All Hyper-V packages installed

I havent worked with windows in over 3 years and am quite rusty with it, so let me know what other info from whatever commands needed to be run.

Unable to stop: Cannot invoke method. Method invocation is supported only on core types in this language mode.
at <ScriptBlock>, <No file>: line 86
   at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV.cs:line 177
   at Docker.Backend.ContainerEngine.Linux.DoStop() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 279
   at Docker.Backend.ContainerEngine.Linux.Restart(Settings settings, String daemonOptions) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 169
   at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 47
   at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 145

Steps to reproduce the behavior

Try to start docker.

@Ndaginada
Copy link

I have the same problem, It may be caused by the win10 update

@jasonbivins
Copy link

hi @nerdoftech
Does docker load at all? Do you get the Whale icon in your systray?
If you see it there - right click and choose Diagnose and Feedback - I need the diagnostic ID that gets generated.

@nerdoftech
Copy link
Author

Diagnostic ID - 3302CBFF-9FFE-419A-95EB-2054F66D1B19/2017-12-03_09-32-16

@vasokot
Copy link

vasokot commented Dec 14, 2017

I have the same problem, but Whale icon not stay in my systray

@mo7och
Copy link

mo7och commented Jan 23, 2018

Root cause

Cannot invoke method. Method invocation is supported only on core types in this language mode.

This error linked with PowerShell language mode
Shortly speaking... LanguageMode need for security on your host. This param can be applyed from your domain GPO with Sec. policies. If your $ENV have "Constrained Language", you can't run scripts with unallowed types or unsigned scripts. To check this param run this in PowerShell:
PS C:\> $ExecutionContext.SessionState.LanguageMode
I think this is root cause. And probably developers should sign all scripts in Docker to fix this issue.

Workaround, not safe.
So, if we change this param to FullLanguage, Docker will work.
Obveusly this is not good idea for production environment to change LanguageMode in to FullLanguage, because this not secure. So think twice before you do this.
In my case i'm just disabled SRP(windows Software Restriction Policies) policies on my host, after that LanguageMode switched to FullLanguage and Docker restarted normally.

My env:

  • Win10Pro b. 1703
  • Windows managment framework 5.1 + .net 4.5+
  • Paranoid host lockdown policies with SRP, AppLocker and etc

@jamiemccrindle
Copy link

I have the same problem. Our group policy will only let me run PowerShell in ConstrainedLanguage mode. It would be awesome if Docker could sign it's scripts or only run with ConstrainedLanguage features (if possible).

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d 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

@arunganti
Copy link

I am facing the same issue and am not able to run docker on windows. I cannot change the variable mentioned. Is there a new version where this bug is fixed ?

@depperson
Copy link

+1 please allow docker to run in constrainedlanguage mode. This seems to be common for corporate laptops running windows.

https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/

@ystxn
Copy link

ystxn commented Nov 13, 2018

+1 is this being prioritized please? this is a big problem for enterprise users with pesky cyber security teams.

@l-cdc
Copy link

l-cdc commented Nov 15, 2018

Marking as fresh. This is a major issue for corporate users.
/remove-lifecycle stale

@ngie-eign
Copy link

ngie-eign commented Dec 6, 2018

This is still an issue on Windows 10 Pro, as I have run into when trying to install/run Docker on my newly provisioned corporate laptop.

@vistola
Copy link

vistola commented Jan 8, 2019

I am facing the same issue and am not able to run docker on windows on my corporate laptop.
$ExecutionContext.SessionState.LanguageMode is set to Constrained Language and I can't change it.

Diagnostic ID: 74AAE1FB-F331-4ED3-8306-AE09CFE16CAB/20190108121829

Unable to stop: Cannot invoke method. Method invocation is supported only on core types in this language mode.
at , : line 72
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
at Docker.Actions.<>c__DisplayClass19_0.b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d 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

@naagf5
Copy link

naagf5 commented May 13, 2019

Still facing the same issue with new build on Windows 10.
Any of you have a work around for this problem?

@stevkan
Copy link

stevkan commented May 31, 2019

Also facing this issue on a Windows 10 corporate laptop.
/remove-lifecycle stale

@euxiemldl
Copy link

the following way worked for me:

  1. go to regedit,
  2. in Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment, there is a setting __PSLockDownPolicy = 4, change it to 8 or remove it
  3. restart docker desktop (my version is 2.1.0.0 (36874)), it should stop crashing.
    but after starting docker, that value is set back to 4. so it's just a workaround.
    The value comes from this post (https://blogs.technet.microsoft.com/kfalde/2017/01/20/pslockdownpolicy-and-powershell-constrained-language-mode/)

@ediband
Copy link

ediband commented Feb 27, 2020

Root cause

Cannot invoke method. Method invocation is supported only on core types in this language mode.

This error linked with PowerShell language mode
Shortly speaking... LanguageMode need for security on your host. This param can be applyed from your domain GPO with Sec. policies. If your $ENV have "Constrained Language", you can't run scripts with unallowed types or unsigned scripts. To check this param run this in PowerShell:
PS C:\> $ExecutionContext.SessionState.LanguageMode
I think this is root cause. And probably developers should sign all scripts in Docker to fix this issue.

Workaround, not safe.
So, if we change this param to FullLanguage, Docker will work.
Obveusly this is not good idea for production environment to change LanguageMode in to FullLanguage, because this not secure. So think twice before you do this.
In my case i'm just disabled SRP(windows Software Restriction Policies) policies on my host, after that LanguageMode switched to FullLanguage and Docker restarted normally.

My env:

  • Win10Pro b. 1703
  • Windows managment framework 5.1 + .net 4.5+
  • Paranoid host lockdown policies with SRP, AppLocker and etc

My powershell was also set in constrained language mode after updating windows. I could set it back to full language mode in regedit by setting "HKLM\System\CurrentControlSet\Control\SESSION MANAGER\Environment__PSLockdownPolicy" to value "8"

After rebooting windows, docker desktop started without problem!

@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 Jun 24, 2020
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