Azure Compute Emulator 中的角色卡在 Unknown 和 Destroyed 状态之间的循环 [英] Role in Azure Compute Emulator stuck cycling between Unknown and Destroyed states

查看:19
本文介绍了Azure Compute Emulator 中的角色卡在 Unknown 和 Destroyed 状态之间的循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Azure 云服务的 Web 角色在部署到 Azure 时工作正常,但无法与模拟器一起运行.

My Azure Cloud Service's Web Role works fine when deployed to Azure but can't get it running with the Emulator.

  • 从 Visual Studio (2015) 中启动角色时,窗口仅显示在 Microsoft Azure 计算模拟器中启动应用程序的角色...".
  • 从调试器开始时 OnStart() 似乎根本没有被击中,所以在此之前的某些事情会被卡住.该角色似乎未启动,因为应用的自定义日志也未创建.
  • 查看 Compute Emulator 的 UI 会发现该角色在 Unknown 和 Destroyed 状态之间持续(且非常缓慢)循环.
  • 除了有关 SSL 证书的消息外,事件日志中似乎没有任何相关记录(请参阅此答案)为 HTTPS 端点添加(见下文)
  • When starting the role from within Visual Studio (2015) the window just displays "Starting the roles for the application in the Microsoft Azure compute emulator...".
  • When starting with the debugger OnStart() doesn't seem to be hit at all, so something before that gets stuck. The role doesn't seem to be started because the app's custom logs are not created either.
  • Looking at the Compute Emulator's UI reveals that the role is continuously (and very slowly) cycling between Unknown and Destroyed states.
  • There seems to be nothing relevant logged to the Event Logs (see this answer) apart from messages about SSL certificates being added for the HTTPS endpoints (see below)

知道在哪里可以找到导致角色卡住的线索吗?

Any idea where can I look for clues on what makes the role stuck?

VS 中的输出窗口将此作为最后一条消息:

The Output window in VS has this as the last message:

Microsoft Azure Tools: Warning: Attempting to bind SSL Certificate with identity sha1:something for endpoint named HTTPS of role RoleName.

该角色定义了一些 SSL 证书以及一个 HTTP 和两个 HTTPS 端点.然而,删除这些似乎并没有解决问题,然后它就会卡在这个问题上(因为启用了 RDP 访问而自动添加):

The role has some SSL certificates defined as well as an HTTP and two HTTPS endpoints. However removing these didn't seem to solve the problem, then it gets stuck on this (added automatically because RDP access is enabled):

Microsoft Azure Tools: Warning: Certificate identification setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption' for role 'RoleName' specified in the service configuration file is not declared in the service definition file in the Certificate or as part of an SSL endpont

(注意最后的拼写错误 :-))

(Notice the typo at the end :-).)

我查看了 C:UsersMeAppDataLocaldftmp 下的日志.日志和 EmulatorRuntimeLogs 文件夹是空的,DFAgentLogsDFAgent.log 包含一些条目,这是重复的内容:

I've taken a look at the logs under C:UsersMeAppDataLocaldftmp. The logs and EmulatorRuntimeLogs folders are empty, DFAgentLogsDFAgent.log contains some entries, this is what gets repeated:

[2017/01/29, 21:27:55.532, ERROR, 00019400] <- RuntimeRole::CreateRoleProcess(0x00000224DE6EA670) =0x80070057[2017/01/29, 21:27:55.644, ERROR, 00019400] <- RuntimeRole::StartRoleProcess(0x00000224DE6EA670) =0x80070057[2017/01/29, 21:27:55.748, ERROR, 00019400] <- RuntimeRole::LaunchDevExRoleHost(0x00000224DE6EA670) =0x80070057[2017/01/29, 21:27:55.838, ERROR, 00019400] <- RuntimeRole::StartUnsafe(0x00000224DE6EA670) =0x80070057[2017/01/29, 21:27:55.922, ERROR, 00019400] <- RuntimeRole::Start(0x00000224DE6EA670) =0x80070057[2017/01/29, 21:27:56.021, ERROR, 00019400] <- RuntimeBaseContainer::StartRole_Unsafe(0x00000224DE681BE0) =0x80070057[2017/01/29, 21:27:56.055, ERROR, 00019400] <- RuntimeBaseContainer::StartRole(0x00000224DE681BE0) =0x80070057[2017/01/29,21:27:56.079,错误,00019400] <- RuntimeStartRole=0x80070057[2017/01/29, 21:27:56.110, INFO, 00019400] StartRoleResult deployment29(73).RoleName_IN_0, 80070057[2017/01/29, 21:27:56.110, INFO, 00019400] 收到通知[2017/01/29, 21:27:56.110, INFO, 00019400] DestroyRoleConfigResources: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a[2017/01/29, 21:27:56.110, INFO, 00019400] 收到通知[2017/01/29, 21:27:56.110, INFO, 00019400] StartRoleWorker 返回 0x80070057[2017/01/29, 21:27:56.114, INFO, 00013244] 调用 GetState[2017/01/29, 21:27:56.114, INFO, 00013244] 有 3 条通知.[2017/01/29, 21:27:56.114, INFO, 00013244] 角色通知 0,实例:RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a 状态:2[2017/01/29, 21:27:56.114, INFO, 00013244] 角色通知 1, Instance: RoleName_IN_0:0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a State: 10[2017/01/29, 21:27:56.114, INFO, 00013244] 角色通知 2,实例:RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a 状态:11[2017/01/29, 21:27:56.114, INFO, 00013244] 有1个完成事件.[2017/01/29, 21:27:56.114, INFO, 00013244] CompletionEvent 0,类型:StartRoleCompleted Id:deployment29(73).RoleName_IN_0 状态:0x2147942487[2017/01/29, 21:27:56.114, INFO, 00013244] GetState 返回.[2017/01/29, 21:27:56.115, INFO, 00015700] 称为 AcknowledgeNotifications[2017/01/29, 21:27:56.115, INFO, 00015700] 清理通知和完成事件,最后一个序列 = 3317[2017/01/29, 21:27:56.115, INFO, 00013244] 称为 StartRole[2017/01/29, 21:27:56.115, INFO, 00013244] StartRole 返回.[2017/01/29, 21:27:56.115, INFO, 00019400] StartRoleWorker, instance = deployment29(73).RoleName_IN_0[2017/01/29, 21:27:56.116, WARN, 00019400] 未找到角色部署 29(73).RoleName_IN_0.[2017/01/29,21:27:56.116,错误,00019400] <- RuntimeContainer::FindRoleUnsafe=0x80070490[2017/01/29, 21:27:56.135, INFO, 00019400] SetupRoleConfigResources: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a[2017/01/29, 21:27:56.136, INFO, 00019400] 收到通知[2017/01/29, 21:27:56.136, INFO, 00019400] 开始角色[2017/01/29, 21:27:56.140, INFO, 00019400] 运行时服务器命名管道名称 = .pipeRdRuntimeServer.[2017/01/29, 21:27:56.140, INFO, 00019400] 运行时服务器命名管道超时时间 = 30.[2017/01/29, 21:27:56.140, ERROR, 00019400] 无法创建进程path o oleproject'sfoldercsxDebug olesLombiq.Hosting.RequestRouter.RouterRoleasex64WaHostBootstrapper.exe" basex64WaIISHost.exe .

[2017/01/29, 21:27:55.532, ERROR, 00019400] <- RuntimeRole::CreateRoleProcess(0x00000224DE6EA670) =0x80070057 [2017/01/29, 21:27:55.644, ERROR, 00019400] <- RuntimeRole::StartRoleProcess(0x00000224DE6EA670) =0x80070057 [2017/01/29, 21:27:55.748, ERROR, 00019400] <- RuntimeRole::LaunchDevExRoleHost(0x00000224DE6EA670) =0x80070057 [2017/01/29, 21:27:55.838, ERROR, 00019400] <- RuntimeRole::StartUnsafe(0x00000224DE6EA670) =0x80070057 [2017/01/29, 21:27:55.922, ERROR, 00019400] <- RuntimeRole::Start(0x00000224DE6EA670) =0x80070057 [2017/01/29, 21:27:56.021, ERROR, 00019400] <- RuntimeBaseContainer::StartRole_Unsafe(0x00000224DE681BE0) =0x80070057 [2017/01/29, 21:27:56.055, ERROR, 00019400] <- RuntimeBaseContainer::StartRole(0x00000224DE681BE0) =0x80070057 [2017/01/29, 21:27:56.079, ERROR, 00019400] <- RuntimeStartRole=0x80070057 [2017/01/29, 21:27:56.110, INFO, 00019400] StartRoleResult deployment29(73).RoleName_IN_0, 80070057 [2017/01/29, 21:27:56.110, INFO, 00019400] Got Notify [2017/01/29, 21:27:56.110, INFO, 00019400] DestroyRoleConfigResources: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a [2017/01/29, 21:27:56.110, INFO, 00019400] Got Notify [2017/01/29, 21:27:56.110, INFO, 00019400] StartRoleWorker returned 0x80070057 [2017/01/29, 21:27:56.114, INFO, 00013244] Called GetState [2017/01/29, 21:27:56.114, INFO, 00013244] There are 3 notifications. [2017/01/29, 21:27:56.114, INFO, 00013244] Role notifications 0, Instance: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a State: 2 [2017/01/29, 21:27:56.114, INFO, 00013244] Role notifications 1, Instance: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a State: 10 [2017/01/29, 21:27:56.114, INFO, 00013244] Role notifications 2, Instance: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a State: 11 [2017/01/29, 21:27:56.114, INFO, 00013244] There are 1 completion events. [2017/01/29, 21:27:56.114, INFO, 00013244] CompletionEvent 0, Type: StartRoleCompleted Id: deployment29(73).RoleName_IN_0 Status: 0x2147942487 [2017/01/29, 21:27:56.114, INFO, 00013244] GetState returned. [2017/01/29, 21:27:56.115, INFO, 00015700] Called AcknowledgeNotifications [2017/01/29, 21:27:56.115, INFO, 00015700] Cleanup the notifications and completion events, last sequence = 3317 [2017/01/29, 21:27:56.115, INFO, 00013244] Called StartRole [2017/01/29, 21:27:56.115, INFO, 00013244] StartRole returned. [2017/01/29, 21:27:56.115, INFO, 00019400] StartRoleWorker, instance = deployment29(73).RoleName_IN_0 [2017/01/29, 21:27:56.116, WARN, 00019400] Role deployment29(73).RoleName_IN_0 not found. [2017/01/29, 21:27:56.116, ERROR, 00019400] <- RuntimeContainer::FindRoleUnsafe=0x80070490 [2017/01/29, 21:27:56.135, INFO, 00019400] SetupRoleConfigResources: RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a [2017/01/29, 21:27:56.136, INFO, 00019400] Got Notify [2017/01/29, 21:27:56.136, INFO, 00019400] Starting Role [2017/01/29, 21:27:56.140, INFO, 00019400] Runtime Server Named Pipe Name = .pipeRdRuntimeServer. [2017/01/29, 21:27:56.140, INFO, 00019400] Runtime Server Named Pipe Timeout Time = 30. [2017/01/29, 21:27:56.140, ERROR, 00019400] Failed to create process "path o oleproject'sfoldercsxDebug olesLombiq.Hosting.RequestRouter.RouterRoleasex64WaHostBootstrapper.exe" basex64WaIISHost.exe .

但是我不知道为什么无法创建该进程(文件在那里;虽然我的用户名中有一个重音字符,因此在路径中,但将文件夹移动到驱动器根目录并没有帮助) 并且似乎在任何地方都没有其他信息.否则,存储和计算模拟器将启动并工作.

However I have no idea why the process couldn't be created (the file is there; although my username has an accented character in it and thus in the path, it didn't help to move the folder to the drive root) and there seems to be no other information anywhere. The Storage and Compute Emulator otherwise starts and works.

这些都没有帮助:

  • 以管理员身份运行 VS.
  • 以管理员身份单独预启动计算模拟器.
  • 检查它是否必须对用户帐户执行某些操作:它也适用于我的另一台具有相同 Windows 用户帐户的计算机.
  • 禁用 Windows 防火墙.
  • 将 Azure SDK 从 2.9 更新到 3.0.
  • 将角色的(与 Azure 相关的)NuGet 包更新到最新版本.
  • 修复 VS 安装.

同样的解决方案适用于我同事的一台机器,所以我的机器和这个特定的机器应该有问题.

The same solution works on one of my colleague's machine, so it should be some issue with my machine, and this specific one.

我也用一个空的 ASP.NET 角色的空云服务项目尝试了这个,结果也是一样.

I also tried this with an empty Cloud Service project with an empty ASP.NET role and the same happens.

一个类似的问题:Azure 模拟器似乎挂在 Web 上角色启动.

更新,越来越近:

我也在 Windows 日志/系统下的事件日志中得到这些:

I'm also getting these in the Event Log under Windows Logs/System:

特定于应用程序的权限设置不会为具有 CLSID 的 COM 服务器应用程序授予本地激活权限{6B3B8D23-FA8D-40B9-8DBD-B950333E2C52}和APPID{4839DDB7-58C2-48F5-8283-E1D1807D0D7D}从在应用程序容器中运行的地址 LocalHost(使用 LRPC)到用户 NT AUTHORITYLOCAL SERVICE SID (S-1-5-19) 不可用 SID(不可用).可以使用组件服务管理工具修改此安全权限.

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {6B3B8D23-FA8D-40B9-8DBD-B950333E2C52} and APPID {4839DDB7-58C2-48F5-8283-E1D1807D0D7D} to the user NT AUTHORITYLOCAL SERVICE SID (S-1-5-19) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

机器默认权限设置不会为具有 CLSID 的 COM 服务器应用程序授予本地激活权限{C2F03A33-21F5-47FA-B4BB-156362A2F239}和APPID{316CDED5-E4AE-4B15-9113-7055D84DCC97}从在应用程序容器中运行的地址 LocalHost(使用 LRPC)到用户 NT AUTHORITYLOCAL SERVICE SID (S-1-5-19) 不可用 SID(不可用).可以使用组件服务管理工具修改此安全权限.

The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {C2F03A33-21F5-47FA-B4BB-156362A2F239} and APPID {316CDED5-E4AE-4B15-9113-7055D84DCC97} to the user NT AUTHORITYLOCAL SERVICE SID (S-1-5-19) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

这是这里描述和解决的问题:https://sajiviswam.wordpress.com/2011/04/15/the-machine-default-permission-settings-do-not-grant-local-activation-permission-for-the-com-server-application-with-clsid-000c101c-0000-0000-c000-000000000046-sharepoint-2010/ 就我而言,受影响的服务是 ShellServiceHost 和 Immersive Shell(与博文所说的相反,我必须在 HKCRCLSID 下的注册表中查找 CLSID 条目.我重新启动了计算机设置了Registry项的权限后,两个组件的安全设置还是灰显.

This is the issue described and solved here: https://sajiviswam.wordpress.com/2011/04/15/the-machine-default-permission-settings-do-not-grant-local-activation-permission-for-the-com-server-application-with-clsid-000c101c-0000-0000-c000-000000000046-sharepoint-2010/ In my case the affected services are ShellServiceHost and Immersive Shell (contrary to what the blogpost says, I had to look up the CLSID entries in the registry under HKCRCLSID. I restarted my computer after setting the permissions for the Registry entries, but the security settings of the two components are still grayed out.

除了更改组件服务所有者和权限"下的博客文章中的内容外,我尝试了多种方法来解决此问题,但没有成功:为 Administrator_s_ 组设置它,然后还为管理员提供完全控制权(重新启动后)(单数)用户;启用权限继承;将所有者更改为我的(管理员级别)用户.我还尝试用 Administrator_s_ 替换所有者,并选择替换所有子对象权限条目.

Apart from what's in the blogpost under "Change Component Service Owner and Permission" I tried multiple ways to resolve this, without success: setting this up for the Administrator_s_ group, then also giving full control (after a restart) for the Administrator (singular) user; enabling permission inheritance; changing the owner to my (administrator-level) user. I also tried to replace owner with Administrator_s_, and opt to replace all child object permission entries as well.

两个组件的安全设置仍然是灰色的.

Still the security settings of the two components are grayed out.

更新 2:

根据我在问题下详细说明的内容,这是有帮助的:

Building on what I've elaborated to be tried under the question this is what helped:

我还需要在 Regedit 中设置 AppID 的权限(请参阅错误消息中不仅存在 CLSID,还存在 APPID),以便管理员组完全控制它们.此后,组件服务中受影响组件的安全选项卡选项不再变灰.

I needed to also set the permissions for the AppIDs in Regedit (see that not just CLSIDs but also APPIDs are present in the error messages) to have full control over them for the Administrators group. After this the Security tab's options weren't grayed out any more for the affected components in Component Services.

因此,我可以在两个组件下为本地服务用户设置本地激活权限.

Thus I could set Local Activation permission under both components for the Local Service user.

虽然这消除了事件日志中的错误,但模拟器启动仍然停留在同一步骤,但是这次没有任何关于可能出错的提示.

While this gets rid of the errors in the Event Log the Emulator start is still stuck at the same step, however this time without any hint on what may be wrong.

更新 3:

重新安装 3.0 之前的 Azure SDK 版本没有帮助.在我的笔记本电脑上,云服务可以启动,我的预感是因为那台机器只安装了 v2.9 的 SDK.

Re-installing pre-3.0 Azure SDK version didn't help. On my laptop the Cloud Service can start and my hunch is that this is because that machine only has v2.9 of the SDK installed.

相关问题:Azure 辅助角色卡在角色状态未知(没有解决方案有帮助).

Related question: Azure worker role getting stuck in Role state Unknown (no solution there helped).

推荐答案

注释掉 csdef 文件中的启动任务.它帮助了我.

Comment out the Startup Task in the csdef file. It helped me.

这篇关于Azure Compute Emulator 中的角色卡在 Unknown 和 Destroyed 状态之间的循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆