问题
I'm working on azure WorkerRole project in VS2015
, SDK 2.9
. The role works good in cloud, but when i'm trying to run it locally with FullEmulator, role can't be started:
[fabric] Role Instance: deployment29(116).MyComp.Engine.Deploy.MyProject.Engine.Azure.0
[fabric] Role state Unknown
[fabric] Role state Busy
[fabric] Role state Unknown
[fabric] Role state Busy
[fabric] Role state Unknown
[fabric] Role state Busy
[fabric] Role state Destroyed
[fabric] Role state Busy
looks like role is restarting endlesly, the interesting thing is, that break point at the begining of the OnStart()
doesn't hit
How to detect the reason of such behaviour?
回答1:
I found only one way to detect the reason - to look into event logs. There were a lot of errors from emulator. I suugest to check these categories:
Windows Logs\Application event log
Applications and Services Logs\Windows Azure event log
Windows Logs\System event log
I have found the reason - the role was misconfigured.
this article can be useful
回答2:
Looking through my event logs I noticed the following error,
Retrieving the COM class factory for component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the following error: 80040154 Class not registered
After googling for that I found this stackoverflow answer that told me I had to install IIS. I had recently gotten a new computer and this doesn't seem to be part of the basic Windows install. After installing IIS it started right up.
来源:https://stackoverflow.com/questions/40854846/azure-emulator-stuck