无法访问Azure DevSpaces容器

时间:2019-08-22 18:11:18

标签: .net asp.net-core azure-dev-spaces

当使用模板中的新gRPC项目时,启动Azure Dev Spaces调试器时出现异常。当我的示例项目不在同一个群集中时,Azure DevSpaces的快速入门.Net Core页面上的示例项目将正确调试。该示例项目似乎使用.Net Core 2.2,而我的项目使用3.0。以下步骤重现了该问题:

  1. 打开Visual Studio 2019(v16.2.3)
  2. 点击创建新项目
  3. 搜索 gRPC
  4. 点击 ASP.NET Core Web应用程序
  5. 为项目指定任何名称
  6. 在下一个屏幕上,单击 gRPC Service-一个项目 用于创建gRPC ASP.NET Core服务的模板。
  7. 创建项目
  8. 使用调试选项,选择 Azure开发空间并将项目配置为使用已设置的集群
  9. 使用 Azure开发空间
  10. 启动调试器

预期:在Docker步骤完成后,调试器仍保持连接状态。

实际:

  • Docker步骤完成,并且在输出窗口中显示一条消息,提示 Waiting for container ...
  • 过一会儿,输出窗口中会显示一条消息:服务[服务名称]端口80(HTTP)可通过[端口]处的端口转发使用。
  • 此后,调试器被拆离,并在输出窗口中出现以下异常,并伴随一个错误模式,指出 容器无法访问
An error occurred during warmup for project 'DebugSample':
System.InvalidOperationException: Container cannot be reached.
   at Microsoft.Azure.DevSpaces.Client.Connection.ContainerConnector.<EnsureDevHostAgentConnectionAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.DevSpaces.Client.Connection.ContainerConnector.<ConnectAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.DevSpaces.Client.ManagementClients.ServiceManagementClientImplementation.<EnsureContainerConnectors>d__102.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Azure.DevSpaces.Client.ManagementClients.ServiceManagementClientImplementation.<ExecuteNextIterationAsync>d__98.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Client.DevSpacesServiceClient.<>c__DisplayClass28_0.<<StartDebugAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Logging.PerfLoggerExtensions.<ExecuteOperationAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Client.DevSpacesServiceClient.<>c__DisplayClass28_0.<<StartDebugAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Logging.PerfLoggerExtensions.<ExecuteOperationAsync>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Logging.PerfLoggerExtensions.<ExecuteOperationAsync>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Package.Services.DebugService.<WarmupProjectAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Package.Services.BackgroundWarmupService.<>c__DisplayClass12_0.<<ExecuteWarmupAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Logging.PerfLoggerExtensions.<ExecuteOperationAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.Logging.PerfLoggerExtensions.<ExecuteOperationAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Package.Services.BackgroundWarmupService.<ExecuteWarmupAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Package.Services.BackgroundWarmupService.<>c__DisplayClass9_0.<<WarmupProject>b__5>d.MoveNext()

0 个答案:

没有答案