Docker Community Forums

Share and learn in the Docker community.

Docker won't start, cannot open pipe


(Abeham) #1

I used to have Docker for Windows installed on my machine some time ago, then deinstalled and yesterday installed it again. However, now I can’t get it to run anymore. I always get either of these errors when trying to start docker. I have tried stable and currently using edge (17.11.0-ce-rc3-win38 (14052). When I try to start it using Windows containers I get the error. When I switch to Linux containers I see the MobyLinux VM being created and running in the HyperV Manager. However, it appears and disappears and after some time I get again this error.

Error response from daemon: open \.\pipe\docker_engine_windows: The system cannot find the file specified.

at Docker.Backend.DockerDaemonChecker.Check(Func`1 isDaemonProcessStillRunning) in C:\gopath…\docker\pinata\win\src\Docker.Backend\DockerDaemonChecker.cs:line 63
at Docker.Backend.ContainerEngine.Windows.DoStart(Settings settings, String daemonOptions) in C:\gopath…\docker\pinata\win\src\Docker.Backend\ContainerEngine\Windows.cs:line 221
at Docker.Backend.ContainerEngine.Windows.Start(Settings settings, String daemonOptions) in C:\gopath…\docker\pinata\win\src\Docker.Backend\ContainerEngine\Windows.cs:line 93
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.b__0(Object[] parameters) in C:\gopath…\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 47
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath…\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 145

There are a number of errors mentioned in the log. It is difficult to judge what is the real cause. There is:

  1. […][WindowsDaemon ][Error ] fatal: Error starting daemon: Error initializing network controller: Error creating default network: HNS failed with error : {Object Exists} An attempt was made to create an object and the object name already existed.
  2. […][NamedPipeClient][Error ] Unable to send Start: Error response from daemon: open \.\pipe\docker_engine_windows: The system cannot find the file specified.
  3. […][DockerDaemonChecker][Error ] Docker daemon is not running
  4. […][NamedPipeServer][Error ] Unable to execute Start: Error response from daemon: open \.\pipe\docker_engine_windows: The system cannot find the file specified.
  5. […][Moby ][Error ] Failed to read Moby’s logs: The operation has timed out.
  6. […][VpnKit ][Error ] vpnkit.exe: While watching /etc/resolv.conf: ENOENT
  7. […][VpnKit ][Error ] vpnkit.exe: Failed to parse IPv4 address ‘’, using default of 192.168.65.254
  8. […][Linux ][Error ] Failed to start: Docker hv-sock proxy (vsudd) is not reachable. Let’s retry
  9. […][NamedPipeServer][Error ] Unable to execute Start: Unable to create: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Inconsistent parameters PolicyStore PersistentStore and Dhcp Enabled
  10. […][NamedPipeClient][Error ] Unable to send Start: Unable to create: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Inconsistent parameters PolicyStore PersistentStore and Dhcp Enabled

I assume the root cause is the WindowsDaemon error (HNS failed with error). But which object did it attempt to create and already existed? Was it maybe not removed? Is this persistent over restarts? How to remove it?


(Abeham) #2

Further trying to solve this problem led to the deletion of C:\ProgramData\Docker (or almost deleted it). This was probably a bad idea, as it was said that this contains symlinks that may or may not being followed deleting all contents in various places (uh-oh!) and may seriously mess the operating system. Long story short, I performed a system restore.

After the system restore Docker was gone again. I checked the virtual switches in Hyper V Manager and found there was one named “nat”. I couldn’t delete it in the manager itself, that resulted in an exception. I had to follow an advise I found on stackoverflow. I performed Get-NetNat | Remove-NetNat in powershell first (no idea if this was necessary) and then inspected the registry entries in HKLM\SYSTEM\CurrentControlSet\Services\vmsmp\parameters\SwitchList. There was just one subkey with the FirendlyName “nat”. In a subkey it also said something about HNC. After removing that subkey and restarting the network was gone in Hyper V Manager. I reinstalled docker and now everything is back to normal.

I still have this strange folder docker in ProgramData that contains still some guids there in windowsfilters. I tried running “docker system prune -a -f”, but nothing happened. The folder properties of the windowsfilters folder say it uses about 15GB disk space.