Docker for window giving message-Time out has expired and the operation has not been completed

Viewed 5176

I have been trying to setup Docker for window machine and to run Asp.Net core 2.0 application in the Docker. I have setup below items.

  1. Widow 10.
  2. Visual Studio 2017, Community version.
  3. Installed Core 2.0.

I have created a sample Asp.Net Core2.0 application and chosen Docker to run this application.

Below are the details -

  1. Default project setup reference image- Asp.Net core2.0 project setup

  2. Docker run status

Below is the details for the timeout issue.

   Time out has expired and the operation has not been completed.
   at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
   at Docker.Backend.Processes.WindowsDockerDaemon.TryToStartService(String args, Dictionary`2 env) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\Processes\WindowsDockerDaemon.cs:line 138
   at Docker.Backend.ContainerEngine.Windows.DoStart(Settings settings, String daemonOptions) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Windows.cs:line 200
   at Docker.Backend.ContainerEngine.Windows.Start(Settings settings, String daemonOptions) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Windows.cs:line 78
   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.Nam

Can anyone suggest what could be issue for the timeout, I have tried and reset the docker

3 Answers

I think maybe we have same problem

After many month, I found my problem

As you can see in Crash while switching from Linux to Windows containers , My problem is one bug from Docker Desktop, that panic.txt is readonly after I change this from forums docker guideline

The short answer is

  1. Go to C:\ProgramData\Docker (Or any other location that data-root locate to it)
  2. Right click on panic.txt → Properties
  3. Uncheck ‘Read-Only’

My problem is resolved (very very thanks to Tomas Slaman)

We had the same issue. We had to uninstall docker for Windows, and re-install. But this time we did not check the box (on the installation screen) which said "enable windows containers". So we just did next -> next which means Linux containers will be used instead of Windows, even though installation is being done on a Windows machine. Installation and launch were successful after that.

I came across this and thought it necessary to confirm if virtualization is enabled on my system, as it being disabled could be the problem. Apparently, that was my problem.

So basically, since I had Hyper-V turned on already under "Turn Windows Features on or off" I simply ran the script on windows power-shell in admin mode:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

This forced a restart, after which I was fine.

Here is a reference guide to enabling on windows-10: https://thebackroomtech.com/2019/03/11/how-to-enable-virtualization-in-windows-10/

Hope this helps.

Related