Azure Compute Emulator中的角色卡住了未知状态和销毁状态之间的循环 [英] Role in Azure Compute Emulator stuck cycling between Unknown and Destroyed states

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

问题描述

我的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,可以发现该角色在未知和销毁状态之间连续(且非常缓慢)循环.
  • 似乎没有与事件日志相关的记录(请参阅此答案),除了有关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:\ Users \ Me \ AppData \ Local \ dftmp下的日志.日志和EmulatorRuntimeLogs文件夹为空,DFAgentLogs \ DFAgent.log包含一些条目,以下是重复的内容:

I've taken a look at the logs under C:\Users\Me\AppData\Local\dftmp. The logs and EmulatorRuntimeLogs folders are empty, DFAgentLogs\DFAgent.log contains some entries, this is what gets repeated:

[2017/01/29,21:27:55.532,错误,00019400]<-RuntimeRole :: CreateRoleProcess(0x00000224DE6EA670)= 0x80070057 [2017/01/29,21:27:55.644,错误,00019400]<-RuntimeRole :: StartRoleProcess(0x00000224DE6EA670)= 0x80070057 [2017/01/29,21:27:55.748,错误,00019400]<-RuntimeRole :: LaunchDevExRoleHost(0x00000224DE6EA670)= 0x80070057 [2017/01/29,21:27:55.838,错误,00019400]<-RuntimeRole :: StartUnsafe(0x00000224DE6EA670)= 0x80070057 [2017/01/29,21:27:55.922,错误,00019400]<-RuntimeRole :: Start(0x00000224DE6EA670)= 0x80070057 [2017/01/29,21:27:56.021,错误,00019400]<-RuntimeBaseContainer :: StartRole_Unsafe(0x00000224DE681BE0)= 0x80070057 [2017/01/29,21:27:56.055,错误,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部署29(73).RoleName_IN_0,80070057 [2017/01/29,21:27:56.110,INFO,00019400]得到通知 [2017/01/29,21:27:56.110,INFO,00019400] DestroyRoleConfig资源: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,实例:RoleName_IN_0:0:cb0b9125-93b1-43e7-9780-f5c6a15f435a状态: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,类型:StartRole已完成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,实例= 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] SetupRoleConfig资源: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]名为管道名称的运行时服务器= \.\ pipe \ RdRuntimeServer. [2017/01/29,21:27:56.140,INFO,00019400]名为管道超时时间的运行时服务器= 30. [2017/01/29,21:27:56.140,错误,00019400]无法创建进程路径\到\角色\项目的\文件夹\ csx \ Debug \ roles \ Lombiq.Hosting.RequestRouter.RouterRole \ base \ x64 \ WaHostBootstrapper.exe"base \ x64 \ WaIISHost.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 = \.\pipe\RdRuntimeServer. [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\to\role\project's\folder\csx\Debug\roles\Lombiq.Hosting.RequestRouter.RouterRole\base\x64\WaHostBootstrapper.exe" base\x64\WaIISHost.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.
  • 以管理员身份单独预启动Compute Emulator.
  • 检查它是否必须使用用户帐户执行某项操作:它还可以在我的另一台具有相同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角色的空Cloud Service项目尝试了此操作,并且发生了同样的情况.

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

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

更新,越来越近:

我也在Windows日志/系统下的事件日志中获取了这些信息:

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

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

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 AUTHORITY\LOCAL 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 Server应用程序本地激活权限 {C2F03A33-21F5-47FA-B4BB-156362A2F239} 和APPID {316CDED5-E4AE-4B15-9113-7055D84DCC97} 从在应用程序容器不可用SID(不可用)中运行的地址LocalHost(使用LRPC)发送给用户NT AUTHORITY \ LOCAL SERVICE SID(S-1-5-19).可以使用组件服务管理工具来修改此安全权限.

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 AUTHORITY\LOCAL 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/机器的默认权限设置不授予带有clsid-000c101c-0000-0000-c000的COM服务器应用程序的本地激活权限-000000000046-sharepoint-2010/在我的情况下,受影响的服务是ShellServiceHost和Immersive Shell(与博客文章所说的相反,我必须在注册表中HKCR \ CLSID下查找CLSID条目.我重新启动计算机设置注册表项的权限后,但是两个组件的安全设置仍显示为灰色.

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 HKCR\CLSID. 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),以完全控制Administrators组.此后,组件服务"中受影响组件的安全性"选项卡的选项不再显示为灰色.

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版本没有帮助.在我的笔记本电脑上,Cloud Service可以启动,我的直觉是这是因为该计算机仅安装了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).

推荐答案

我还发现,通过在Microsoft.PowerShell_profile中的命令C:\ Users \ MyUserName \ Documents \ WindowsPowerShell中输入提示,导致仿真器卡住因为它像其他任何PowerShell会话一样使用该配置文件.删除提示可以使其正常工作.

I also found that by having a command in Microsoft.PowerShell_profile in C:\Users\MyUserName\Documents\WindowsPowerShell that prompted for input caused the Emulator to get stuck because it uses that profile just like any other PowerShell session. Removing the prompt allowed it to work properly.

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

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