moby: Windows Docker daemon not started after machine restart

Description

Docker daemon was not running after a restart of the Windows VM.

Steps to reproduce the issue:

  1. Restart the machine.
  2. Issue the command docker ps in PowerShell.
  3. Observe the error message.

Describe the results you received: Error message:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Also verified from Task Manager -> Services that the service named “docker” has a status “Stopped”.

Describe the results you expected: The docker ps command should have succeeded. docker service should be in a “Running” state.

Additional information you deem important (e.g. issue happens only occasionally): The issue happens only occasionally.

Output of docker version: This output is shown in the case when the Docker daemon is actually running.

Client:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.4
 Git commit:   d1515a5
 Built:        Thu Dec 15 09:24:59 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.14.0-dev
 API version:  1.26 (minimum version 1.24)
 Go version:   go1.7.4
 Git commit:   d1515a5
 Built:        Thu Dec 15 09:24:59 2016
 OS/Arch:      windows/amd64
 Experimental: false

Output of docker info:

This output is shown in the case when the Docker daemon is actually running.

Containers: 7
 Running: 7
 Paused: 0
 Stopped: 0
Images: 5
Server Version: 1.14.0-dev
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.576.amd64fre.rs1_release_inmarket.161208-2252)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 4 GiB
Name: eti-win-host
ID: MUSO:JQAE:6YYG:RJOD:2V2Y:L5TG:O4JM:LJ7W:PBY4:Y56P:KWAX:RXNQ
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.): It was an Azure VM running Windows Server 2016.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 38
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Doing what it says at the end of docker-machine env default helps too, at least for the current session. docker-machine env default | Invoke-Expression

I needed to create a VM as follows, to stop getting that error:

docker-machine create box
docker-machine env box

**For the command below, do whatever comes out in the comment that is printed when you execute docker-machine env box & "C:\Program Files\Docker Toolbox\docker-machine.exe" env box | Invoke-Expression

I solved this with the following steps:

  1. Exit Docker QuickStart
  2. Open VirtualBox
  3. Find default machine and stop it with right click
  4. Wait until it stops and start Docker QuickStart again

I started Kitematic when I got this error. It displayed a button saying ‘reset the VM’ and that fixed the issue.

Even for me it solved by following the above steps.

Basically the created VM’s for Docker will be in saved status. So we need to restart them.

Once you have restarted the docker start running

  1. Exit Docker QuickStart
  2. Open VirtualBox
  3. Find default machine and stop it with right click
  4. Wait until it stop and start Docker QuickStart again

I am having the same error message come up whenever I enter in docker commands.

I have the docker toolbox and can run the docker default environment fine and all. However, when I installed the original docker.exe file, it said I didn’t have a HyperV installed.