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

Windows Docker daemon not started after machine restart #30239

Closed
akunaatrium opened this Issue Jan 18, 2017 · 17 comments

Comments

Projects
None yet
@akunaatrium

akunaatrium commented Jan 18, 2017

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.

@friism

This comment has been minimized.

Show comment
Hide comment
@friism

friism Jan 18, 2017

Contributor

What error do you get if you try to manually start the daemon? This might be related: #30240

Contributor

friism commented Jan 18, 2017

What error do you get if you try to manually start the daemon? This might be related: #30240

@friism

This comment has been minimized.

Show comment
Hide comment
@friism

friism Jan 18, 2017

Contributor

Ah, same poster - @thaJeztah recommend closing this

Contributor

friism commented Jan 18, 2017

Ah, same poster - @thaJeztah recommend closing this

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Jan 18, 2017

Member

yes, lets' continue in #30240

Member

thaJeztah commented Jan 18, 2017

yes, lets' continue in #30240

@thaJeztah thaJeztah closed this Jan 18, 2017

@ztamizzen

This comment has been minimized.

Show comment
Hide comment
@ztamizzen

ztamizzen Mar 14, 2017

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

ztamizzen commented Mar 14, 2017

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

@nvt007

This comment has been minimized.

Show comment
Hide comment
@nvt007

nvt007 Mar 17, 2017

I ran into the same errors after the installation, and by rerunning the installation with repair mode, it fixed the problem.

nvt007 commented Mar 17, 2017

I ran into the same errors after the installation, and by rerunning the installation with repair mode, it fixed the problem.

@TimothyLe

This comment has been minimized.

Show comment
Hide comment
@TimothyLe

TimothyLe Mar 19, 2017

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.

TimothyLe commented Mar 19, 2017

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.

@moulishanmuhavelu

This comment has been minimized.

Show comment
Hide comment
@moulishanmuhavelu

moulishanmuhavelu Apr 16, 2017

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

moulishanmuhavelu commented Apr 16, 2017

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

@montybhayana

This comment has been minimized.

Show comment
Hide comment
@montybhayana

montybhayana Aug 11, 2017

Starting the Kitematic, then deleting and resetting the VM fixed the issue.

montybhayana commented Aug 11, 2017

Starting the Kitematic, then deleting and resetting the VM fixed the issue.

@lijo-george

This comment has been minimized.

Show comment
Hide comment
@lijo-george

lijo-george Sep 27, 2017

For me, this error was resolved after I removed 'daemon.json' file in "%programdata%\docker\config"

The content in my 'daemon.json' is the following:

{

"hosts": ["tcp://0.0.0.0:2375"]

}

I created this manually as part of some testing. But after I restarted the server, I started to get the error in this question

lijo-george commented Sep 27, 2017

For me, this error was resolved after I removed 'daemon.json' file in "%programdata%\docker\config"

The content in my 'daemon.json' is the following:

{

"hosts": ["tcp://0.0.0.0:2375"]

}

I created this manually as part of some testing. But after I restarted the server, I started to get the error in this question

@jafetmorales

This comment has been minimized.

Show comment
Hide comment
@jafetmorales

jafetmorales Oct 4, 2017

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

jafetmorales commented Oct 4, 2017

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

@Nditah

This comment has been minimized.

Show comment
Hide comment
@Nditah

Nditah Oct 10, 2017

When I test my installation with :
docker run hello-world
I get error in my cmd:
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.31/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=a69674653e03129196ba8822c9918b742fe347015eb69a9cd9cf85ca9b309709&shmsize=0&t=friendlyhello&target=&ulimits=null: 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.

Nditah commented Oct 10, 2017

When I test my installation with :
docker run hello-world
I get error in my cmd:
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.31/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=a69674653e03129196ba8822c9918b742fe347015eb69a9cd9cf85ca9b309709&shmsize=0&t=friendlyhello&target=&ulimits=null: 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.

@vladkras

This comment has been minimized.

Show comment
Hide comment
@vladkras

vladkras Jan 5, 2018

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

vladkras commented Jan 5, 2018

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
@FabianHT

This comment has been minimized.

Show comment
Hide comment
@FabianHT

FabianHT Jan 19, 2018

vladkras commented 14 days ago

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 stop and start Docker QuickStart again
    --

Works for me too!

FabianHT commented Jan 19, 2018

vladkras commented 14 days ago

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 stop and start Docker QuickStart again
    --

Works for me too!

@smacharla

This comment has been minimized.

Show comment
Hide comment
@smacharla

smacharla Feb 15, 2018

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

smacharla commented Feb 15, 2018

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
@alexgman

This comment has been minimized.

Show comment
Hide comment
@alexgman

alexgman May 11, 2018

how do you resolve this if you're running windows core with terminal only?

alexgman commented May 11, 2018

how do you resolve this if you're running windows core with terminal only?

@vladkras

This comment has been minimized.

Show comment
Hide comment
@vladkras

vladkras May 12, 2018

how do you resolve this if you're running windows core with terminal only?

@alexgman, try https://docs.docker.com/machine/reference/stop/

vladkras commented May 12, 2018

how do you resolve this if you're running windows core with terminal only?

@alexgman, try https://docs.docker.com/machine/reference/stop/

@SantoshKumarA

This comment has been minimized.

Show comment
Hide comment
@SantoshKumarA

SantoshKumarA Jul 24, 2018

For me, when I ran the following command,

$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp:.."
export DOCKER_CERT_PATH="C:\Users\j\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:\Users\sarj\bin\docker-machine.exe" env default)

and then, simply rerunning the eval command solved the problem

SantoshKumarA commented Jul 24, 2018

For me, when I ran the following command,

$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp:.."
export DOCKER_CERT_PATH="C:\Users\j\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:\Users\sarj\bin\docker-machine.exe" env default)

and then, simply rerunning the eval command solved the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment