Docker Community Forums

Share and learn in the Docker community.

Error message when trying to switch to windows container

Hello

I downloaded docker for windows, and installed it. I then started docker and then did Switch to Windows containers form the taskbar tray, but I get error message. i downlaoded and installed 3.5.2
I was getting the same error for version 3.6

System.ServiceProcess.TimeoutException:
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(Settings settings, String args, Dictionary`2 env) in C:\workspaces\PR-16070\src\github.com\docker\pinata\win\src\Docker.Backend\Processes\WindowsDockerDaemon.cs:line 208
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

  

2 Likes

I’m having the same issue.

Windows 10 OS 20H2

Had to rip out antivirus just to get docker to even install. It switched to windows containers once and then hasn’t since…

I get the same exact issue posted before. Same steps to reproduce. I’ve tried Docker 3.6 and 3.5.2. I’m about to go into older versions because I need this working.

Linux containers run just fine

Could this be because of bitlocker enabled on this computer?

Thanks

Having same issue here,

  • Windows 10 20H2
  • Docker Desktop 3.6.0.67351

The Windows container was able to be started and the worked normally only once. After a normal reboot, the Docker (Windows container mode) failed to start. After re-install the Docker, only the Linux container engine (Hyper-V/WSL2) could be started.

That’s my exact same behavior man!!! oh my goodness, it’s not just happening to me.

No matter what version I docker I try now, exhibits the same behavior

Diag upload —>

B31919B7-C324-4780-8C3A-571B3F6A11AC/20210816040934

1 Like

I wondered if this was occurring due to One Drive, so I unlinked and uninstalled One Drive as well, but still getting the same timeout error.

I did a bunch of fresh installations of both v3.6 and v3.5.2 but still the same time out error

created a diagnostic id:
52D70333-91B1-40D6-9BA9-A725164B4544/20210816151801

2 Likes

This really drove me crazy… After trail-n-error for several configuration for over 18 hours, it keeping failure at second boot… no matter I’m using what computer, or VM.

I just use the “resmon” to watch the starting behavior of the Docker Desktop, no significantly problem, the traffic is not blocked by firewall also.

So frustrating…

1 Like

Same error just starting Docker Desktop V3.5.2. Tried removing all of Docker and installing 3.6. It worked until restart of PC then same error again.

Crash report ID: 49FEEE43-F0CA-4093-A027-352232114658/20210817063436

1 Like

During some investigation,

I found few articles mentioned the vEthernet (nat) may not be started automatically after Windows reboot, this phenomenon is similar from my case, the “turn-on of Windows Container” will create the “vEthernet (nat)” and the Windows container does well even I restart Docker several times:
image

And then, those virtual ethernet card are gone after reboot:
image

I don’t know if this is correct direction, I even compared the Windows Registry, the major difference after turning on the Windows container is some ethernet settings.

Reference

Set up a NAT network | Microsoft Docs
如何修復 Docker Desktop for Windows 各種奇怪的網路問題 | The Will Will Web

1 Like

I’m having the same issue where I’m not able to switch to windows containers.

  1. Re-installing Docker for Windows desktop (did not resolve the issue)
  2. Disabling Hyper-V and re-enabling it (including restart after disable and a restart after re-enable). Also did not resolve the issue.

I’ve uploaded a crash report, here’s the diag ID; 7DBE08D5-60BA-4D90-B924-9B84C2AF76CF/20210817111122

Hoping for a quick solution :slight_smile:

There is a solution available in this github issue; Crash while switching from Linux to Windows containers · Issue #11899 · docker/for-win · GitHub

In short;

  1. Go to C:\ProgramData\Docker
  2. Right click on panic.txt → Properties
  3. Uncheck ‘Read-Only’
14 Likes

Thank you very much for this solution. Yes, it worked for me. I unchecked the ‘Read-Only’ on the panic.txt file and then did the switch to windows containers, and it switched successfully.

Thanks @tomasslaman , you really saved my day. And finally, I can go sleep well XD

@tomasslaman thank you for the tip when there was no other possible solution.
I had panic.log in my local instead of panic.txt

Thank you @tomasslaman, this has been frustrating me for days.

Out of interest, how did you come across this fix? I have been trawling the net and this thread is the first i have found mentioning it.

I stumbled upon a post after carefully going through all git issues that seemed similar, it was buried a bit more down already with not a lot of traction on the thread. So little bit of luck :wink:

2 Likes

Thank you so much, it was driving me crazy, hope the docker team finds a permenant fix for this.
sorry I ment tomasslaman

Just to say thanks after hours of pulling my hair out I found your post…what a random fix!

Thank you very much. This resolved my issue as well!

Many thank the the suggestion, it works now.

Same again, thankyou.