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 failed to start #863

Closed
HarisL071 opened this issue Jun 29, 2017 · 11 comments
Closed

Docker failed to start #863

HarisL071 opened this issue Jun 29, 2017 · 11 comments

Comments

@HarisL071
Copy link

Expected behavior

Dockers Starts

Actual behavior

Doxker failed to start

Information

  • Diagnostic ID : 1557827E-5766-43A6-8C68-364B3AB69CE0/2017-06-29_11-28-14

  • Unable to create: The running command stopped because the preference variable
    "ErrorActionPreference" or common parameter is set to Stop: Generic failure
    at New-Switch, : line 131
    at , : line 385

Steps to reproduce the behavior

  1. Install Docker for Windows
  2. Start Docker for windows
@HarisL071
Copy link
Author

Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Generic failure
at New-Switch, : line 131
at , : line 385
at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)

@jasonbivins
Copy link

Hi @HarisL071 It looks like the MobyLinuxVM isn't getting created properly, we might need to do some steps in the install manually, but let's see what's going on first.
Can you run the Debug-ContainerHost script located here - then send the results?
https://github.com/Microsoft/Virtualization-Documentation/tree/live/windows-server-container-tools/Debug-ContainerHost

@HarisL071
Copy link
Author

Checking for common problems
Describing Windows Version and Prerequisites
[+] Is Windows 10 Anniversary Update or Windows Server 2016 69ms
[+] Has KB3192366, KB3194496, or later installed if running Windows build 14393 17ms
[+] Is not a build with blocking issues 20ms
[+] Has 'Containers' feature installed 41.84s
Describing Docker is installed
[+] A Docker service is installed - 'Docker' or 'com.Docker.Service' 29ms
[+] Service is running 19ms

cmdlet Start-Process at command pipeline position 1
Supply values for the following parameters:
FilePath: C:\Program Files\Docker\Docker\resources\bin
[-] Docker.exe is in path 18.57s
Expected: the expression not to throw an exception. Message was {This command cannot be run due to the error: Access
is denied.}
from D:\vm\Debug-ContainerHost.ps1:107 char:13
+ Start-Process -NoNewWindow `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
135: } | Should Not Throw
at , D:\vm\Debug-ContainerHost.ps1: line 105
[+] Docker is registered in the EventLog service 59ms
Describing User has permissions to use Docker daemon
[+] docker.exe should not return access denied 177ms
Describing Windows container settings are correct
[+] Do not have DisableVSmbOplock set to 1 34ms
[+] Do not have zz values set 15ms
[+] Do not have FDVDenyWriteAccess set to 1 21ms
Describing The right container base images are installed
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/images/json: open //./pipe/docker_engine: The syst
em cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevate
d to connect. This error may also indicate that the docker daemon is not running.
[-] At least one of 'microsoft/windowsservercore' or 'microsoft/nanoserver' should be installed 222ms
ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then t
ry the command again.
ParameterBindingValidationException: Cannot validate argument on parameter 'Property'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
at , D:\vm\Debug-ContainerHost.ps1: line 229
Describing Container network is created

cmdlet Start-Process at command pipeline position 1
Supply values for the following parameters:
FilePath: C:\Program Files\Docker\Docker\resources\bin
[-] Error occurred in Describe block 7.07s
InvalidOperationException: This command cannot be run due to the error: Access is denied.
at , D:\vm\Debug-ContainerHost.ps1: line 239
Getting Warnings & errors in the Windows event logs from the last 24 hours
Logs saved to D:\vm\logs_20170629-210238.csv

@jasonbivins
Copy link

@HarisL071 I do see several access denied errors here, what kind of user rights do you have- it looks like the main issue is coming from Hyper-V not being able to create a new virtual switch.

You can try running the commands that create the MobyLinuxVM and the nat switch manually to see if you get a more specific error as to exactly where the access denies are coming from.

powershell -ExecutionPolicy ByPass -File "C:\Program Files\Docker\Docker\resources\MobyLinux.ps1" -destroy

powershell -ExecutionPolicy ByPass -File "C:\Program Files\Docker\Docker\resources\MobyLinux.ps1" -create

@HarisL071
Copy link
Author

Delete
Script started at 23:10:37.433
Module loaded at 23:10:39.298
VM MobyLinuxVM does not exist
Destroying Switch DockerNAT...
Removing VM MobyLinuxVM...
Delete VHD C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx

Create

Script started at 23:10:50.077
Module loaded at 23:10:51.949
Creating Switch: DockerNAT...
Get-VMNetworkAdapter : Generic failure
At C:\Program Files\Docker\Docker\resources\MobyLinux.ps1:131 char:25

  • ... etAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName $SwitchNam ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-VMNetworkAdapter], VirtualizationException
    • FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.GetVMNetworkAdapter

@jasonbivins
Copy link

@HarisL071 I guess this error is a lot more specific :) . - Get-VMNetworkAdapter : Generic failure

Before we go for the nuclear option - check Hyper-V manager to see if you can create or edit virtual switches, the Generic failure error is coming from Hyper-V - so there is likely a problem there.

If you still see errors there - then I'd say the best way to proceed here is to wipe Hyper-V, and then manually install the pre-requisites before reinstalling Docker.
1. Uninstall Docker, Hyper-V, and if installed - the Containers feature. Then reboot.
2. Either through the Control panel, or running powershell as an admin, enable Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
3. Reboot, then enable the containers feature either through the control panel or through an
elevated powershell prompt
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
4. Reinstall Docker
https://docs.docker.com/docker-for-windows/install/#download-docker-for-windows

@HarisL071
Copy link
Author

@jasonbivins

Thx :-) . Docker is up and running!

@jasonbivins
Copy link

@HarisL071 You're welcome!

I'll go ahead and close this out, but please let me know if you still have trouble with it

@mthird
Copy link

mthird commented Sep 21, 2017

For anyone else who happens to run into this issue, I found that VPN adapters added before the DockerNAT switch is created causes problems. After uninstalling the VPN software, everything ran properly. I was then able to reinstall the VPN software.

@dementiacs
Copy link

@jasonbivins

Awesome. Sorted out the problem for me.

@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 22, 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

5 participants