Reputation: 6606
I wanted to kick the tires of a service fabric stateful actor service, so I created a suitable project in VS2015.1 and made no change to the generated code. I then ran/debugged the solution. I received the following error:
System.Runtime.InteropServices.COMException was unhandled
Message: An exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Fabric.dll and wasn't handled before a managed/native boundary
Additional information: Exception from HRESULT: 0x80071BC5
Thinking that there may be some interference between existing services in my application, I also built a brand new service fabric solution and stateful actor service project (taking all the defaults). This project failed in the exact same way.
After dismissing the COMException, I also get:
---------------------------
Microsoft Visual Studio
---------------------------
Unable to start debugging 'C:\SfDevCluster\Data\_App\Node.3\Application1Type_App41\Actor1Pkg.Code.1.0.0\Actor1.exe'.
The process has been terminated.
Refresh the process list before attempting another attach.
---------------------------
OK
---------------------------
As I had an issue with the Visual Studio 2015.1 install/upgrade, I was unsure if that may have had something to do with this problem. Further, a co-worker followed the same steps and had no issue. So I just finished re-installing VS2015.1 directly, the SF SDK, and all prerequisites. Unfortunately there is no change. :(
I should also say that every time i hit this error, the Service Fabric Local Cluster Manager breaks as well. If i try to open the manager i get the notification: "Failed to open the local cluster manager"
Also, I do indeed have the SF application project as my startup project in the solution. (again, i have had other SF applications work...it just dies as soon as i try a stateful actor service in a new or existing SF application).
I should have thought to provide this earlier, but here is the callstack...something to do with reminders?
[Managed to Native Transition]
System.Fabric.dll!System.Fabric.KeyValueStoreItemEnumerator.MoveNextHelper() Unknown
System.Fabric.dll!System.Fabric.Interop.Utility.WrapNativeSyncInvoke<bool>(System.Func<bool> func, string functionTag, string functionArgs) Unknown
System.Fabric.dll!System.Fabric.KeyValueStoreItemEnumerator.MoveNext() Unknown
Microsoft.ServiceFabric.Actors.dll!Microsoft.ServiceFabric.Actors.KvsActorStateProvider.Enumerate<Microsoft.ServiceFabric.Actors.ActorReminderData>(string keyPrefix, System.Func<byte[], Microsoft.ServiceFabric.Actors.ActorReminderData> deserializeFunc) Unknown
Microsoft.ServiceFabric.Actors.dll!Microsoft.ServiceFabric.Actors.KvsActorStateProvider.Microsoft.ServiceFabric.Actors.IActorStateProvider.LoadRemindersAsync.AnonymousMethod__2a() Unknown
mscorlib.dll!System.Threading.Tasks.Task.Execute() Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
I used a more forceful (and less diagnostic) approach. I rebuilt my dev machine. Based on the odd behavior I experienced in the Update 1 install, I was worried I had compromised my build box. I rebuilt the OS, re-installed vs2015.1 and the SF SDK, and now it works fine. Your mileage may vary :|
Upvotes: 4
Views: 1389
Reputation: 326
The HRESULT mentioned above corresponds to fabric error code NoWriteQuorum. See https://msdn.microsoft.com/en-us/library/azure/system.fabric.fabricerrorcode.aspx for more on error codes. How is your cluster configured - how many nodes? And how is your actor service configured (how many partitions / min and target replica count)?
Can you deploy your app if you start without debugging? If so, did you try looking at the health of the application in service fabric explorer or Powershell?
Upvotes: 4
Reputation: 476
The startup project in the Visual Studio should be set to the Service Fabric application. The Console application project for the Actor for example, cannot be started directly as they need to be deployed and activated via Service Fabric.
Upvotes: 0