当Visual Studio启动dev-fabric Azure时,新的辅助角色实例会挂起

时间:2011-05-17 04:43:07

标签: azure

我创建了一个具有单个辅助角色的新Azure项目,其代码由Visual Studio Windows Azure项目向导生成。当我从Visual Studio中启动它(使用Ctrl-F5 - 不调试),然后使用csrun.exe增加实例数时,新实例无法正常启动。如果我使用csrun.exe启动部署,那么一切都按预期工作。

详情

原始实例开始正常:

[fabric] Role Instance: deployment(237).Recon.WorkerRole1.0
[fabric] Role state Busy
[runtime] Role entrypoint . CALLING   OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING   Run()
Information: WorkerRole1 entry point called
[fabric] Role state Started
Information: Working
Information: Working
....

要添加实例,请增加ServiceConfiguration.cscfg中的数字并运行

csrun /update:237;ServiceConfiguration.cscfg

我可以在Windows Azure Compute Emulator中看到一个带有绿点的新实例,但是新实例产生了这个:

[fabric] Role Instance: deployment(237).Recon.WorkerRole1.3
[fabric] Role state Busy
[Diagnostics]: UpdateState(Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorStartupInfo, Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration, )
[Diagnostics]: Acquired mutex
[Diagnostics] Information: C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor
[Diagnostics] Information: C:\Recon\bin\Debug\Recon.csx\roles\WorkerRole1\diagnostics\x64\monitor\MonAgentHost.exe -LocalPath "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor" -StaticConfigFile "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor\Configuration\mastaticconfig.xml" -ConfigFile "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor\Configuration\maconfig.xml" -ShutDownEvent WADDM-ShutDown-f5dba0349f5d45769204950f21e9c6a5 -InitializedEvent WADM-StartUp-f5dba0349f5d45769204950f21e9c6a5 -parent 2328 -events
[Diagnostics]: Creating config channel server
[MonAgentHost] Output: Agent will exit when WADDM-ShutDown-f5dba0349f5d45769204950f21e9c6a5 is signaled.
[MonAgentHost] Output: Will signal WADM-StartUp-f5dba0349f5d45769204950f21e9c6a5 after the agent is initialized.
[MonAgentHost] Output: Registered as an event consumer.
[MonAgentHost] Output: Agent will exit when parent process 2328 exits.
[MonAgentHost] Output: Monitoring Agent Started
[Diagnostics]: Starting configuration channel polling

请注意,角色状态永远不会变为“已启动”,并且不会调用OnStart()。所以我看到Microsoft's instructions并意识到新角色可能正在暂停,所以我点击了绿色箭头。不幸的是,我收到了这个短暂的错误消息,没有任何反应:

Failed to start service deploymentg deployment(237).  Start role failed for one or more roles.

我正在使用Visual Studio 2010 SP1 w / Azure SDK 1.4.1和Windows Azure Tools for Microsoft Visual Studio 2010 1.3(最新的AFAIK)。我重新安装了所有的Azure位都无济于事。

(过了一会儿我得到了额外的输出,这似乎是重新启动的诊断内容。我不知道为什么。我想我会经常看到其他项目的这些东西。

[Diagnostics]: Checking for configuration updates 17/05/2011 2:18:40 PM.
[Diagnostics]: Signalling process restart on event = WADDM-ShutDown-f5dba0349f5d45769204950f21e9c6a5
[MonAgentHost] Output: Exiting the monitoring agent after the shutdown event was signaled.
[MonAgentHost] Output: Monitoring Agent Stopped
[Diagnostics] Information: Diagnostic process exited with code: 0
[Diagnostics] Information: C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor
[Diagnostics] Information: C:\Recon\bin\Debug\Recon.csx\roles\WorkerRole1\diagnostics\x64\monitor\MonAgentHost.exe -LocalPath "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor" -StaticConfigFile "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor\Configuration\mastaticconfig.xml" -ConfigFile "C:\Users\oliver\AppData\Local\dftmp\s0\deployment(237)\res\deployment(237).Recon.WorkerRole1.3\directory\DiagnosticStore\Monitor\Configuration\maconfig.xml" -ShutDownEvent WADDM-ShutDown-96f71a44d4b0434b8da78f1ac6f802c3 -InitializedEvent WADM-StartUp-96f71a44d4b0434b8da78f1ac6f802c3 -parent 2328 -events
[MonAgentHost] Output: Agent will exit when WADDM-ShutDown-96f71a44d4b0434b8da78f1ac6f802c3 is signaled.
[MonAgentHost] Output: Will signal WADM-StartUp-96f71a44d4b0434b8da78f1ac6f802c3 after the agent is initialized.
[MonAgentHost] Output: Registered as an event consumer.
[MonAgentHost] Output: Agent will exit when parent process 2328 exits.
[MonAgentHost] Output: Monitoring Agent Started
[Diagnostics]: Starting configuration channel polling
[Diagnostics]: Checking for configuration updates 17/05/2011 2:19:42 PM.

2 个答案:

答案 0 :(得分:1)

当Azure放置网站的临时路径太长时,我已经看到了这一点。您可能需要检查EventViewer以查看发生的情况。您将在EventViewer中看到比计算模拟器中更多的信息。如果您遇到路径太长的问题,可以将_CSRUN_STATE_DIRECTORY环境变量设置为类似c:\ Azure的路径。您可以在其上查看更多信息here。您还可以查看Windows Azure here的疑难解答区域。

答案 1 :(得分:1)

我能够使用this post from 'Just another .NET guy'解决悬挂Azure角色的问题。

文章的要点是:

  • 检查EventViewer中是否存在与Azure相关的异常。在这里,您可能会看到类似Provider Microsoft-Windows-Application Server-System Services IIS Manager{{SOME-GUID}} is missing channels under the channelreferances registry key.(错字也存在:P)
  • 的内容
  • 导航至[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publisher],找到与上述GUID相同的文件夹。
  • 检查您的开发计算机是否具有与远程计算机上的辅助角色相同的值。

按照这些步骤后,我发现我有1个,而另一个机器有3个。一旦我纠正了我的注册表,一切都正常工作。