无法模拟C#Worker角色

时间:2015-09-23 22:42:37

标签: c# azure visual-studio-2015 azure-cloud-services azure-emulator

我有一个用VS2013创建的C#worker角色。这个工作正常一年多。

我最近将我的VS升级到版本 2015 (+ Azure SDK 2.7 ),现在我尝试使用Azure模拟器模拟我的代码或将此代码上传到云端,我有一个问题:

[fabric] Role Instance: deployment27(109).***.***.0
[fabric] Role state Busy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy
[fabric] Role state Unhealthy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Busy
[fabric] Role state Suspended
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Suspended
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy

您可以在此日志中读到该工作程序在启动时遇到了一些问题。因此,启动失败(然后调用OnStop ...)。这个循环永远不会结束

我试图了解问题所在但却一无所获。我尝试通过插入断点来调试代码:Run,RunAsync,OnStart和OnStop。这是无助的,因为这些断点从未在应用程序生命周期中被触发。

我正在阅读here这个问题在F#中众所周知,但我没有使用F#。

0 个答案:

没有答案