【问题标题】:Docker for window giving message-Time out has expired and the operation has not been completedDocker for window give message-Time out has expired and the operation has not been done
【发布时间】:2018-03-19 09:40:48
【问题描述】:

我一直在尝试为窗口机器设置 Docker 并在 Docker 中运行 Asp.Net core 2.0 应用程序。我已经设置了以下项目。

  1. 寡妇 10。
  2. Visual Studio 2017,社区版。
  3. 已安装 Core 2.0。

我已经创建了一个示例 Asp.Net Core2.0 应用程序并选择了 Docker 来运行这个应用程序。

以下是详细信息-

  1. 默认项目设置参考图像- Asp.Net core2.0 project setup

  2. Docker run status

以下是超时问题的详细信息。

   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

谁能建议超时可能出现的问题,我已经尝试并重置了 docker

【问题讨论】:

  • 您是否启动了“Docker for Windows”应用程序?它需要运行。当 Docker 运行时,会显示 Docker 鲸鱼。默认情况下,Docker 鲸鱼图标放置在通知区域中。如果它被隐藏,请单击任务栏上的向上箭头以显示它。
  • @alwayslearning 感谢您的快速响应,您能否建议在哪里检查,我正在添加屏幕截图以供参考。我无法添加屏幕截图,我已经从以下路径运行 Docker 终端 -C:\Users\jitendra\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Docker 并重置所有设置但仍然出现超时错误
  • 作为第一步,您能否尝试运行此处描述的“hello world”示例 - docs.docker.com/docker-for-windows/… 它运行时是否没有任何错误?
  • 您好,您检查过system requirements 吗?我遇到了同样的问题,我发现我的机器使用的是尚不支持的 Windows 10 Home
  • 这听起来很愚蠢。但我遇到了同样的错误:Docker for Windows installed on a Windows 10VM running on VMware Fusion on a Mac。退出 docker,并以管理员身份重新运行让它为我运行。

标签: docker asp.net-core window docker-machine


【解决方案1】:

我遇到了这个问题,并认为有必要确认我的系统上是否启用了虚拟化,因为它被禁用可能是问题所在。显然,这是我的问题。

所以基本上,因为我已经在“打开或关闭 Windows 功能”下打开了 Hyper-V,所以我只是在管理员模式下在 windows power-shell 上运行了脚本:

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

这强制重启,之后我就没事了。

以下是在 windows-10 上启用的参考指南: https://thebackroomtech.com/2019/03/11/how-to-enable-virtualization-in-windows-10/

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    我们遇到了同样的问题。我们必须卸载 Windows 的 docker,然后重新安装。但是这次我们没有选中“启用 Windows 容器”的框(在安装屏幕上)。所以我们只是做了下一步 -> 下一步,这意味着将使用 Linux 容器而不是 Windows,即使安装是在 Windows 机器上完成的。之后安装和启动成功。

    【讨论】:

      【解决方案3】:

      我想也许我们有同样的问题

      几个月后,我发现了我的问题

      正如您在 Crash while switching from Linux to Windows containers 中看到的,我的问题是 Docker Desktop 的一个错误,在我将其从 forums docker guideline 更改后,panic.txt 是 readonly

      简短的回答是

      1. 转到 C:\ProgramData\Docker(或数据根目录所在的任何其他位置)
      2. 右键panic.txt → 属性
      3. 取消选中“只读”

      我的问题已解决(非常感谢Tomas Slaman

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-09-19
        • 2011-10-05
        • 1970-01-01
        • 1970-01-01
        • 2013-05-04
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多