Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric directory #674

Open
OlegKarasik opened this issue Nov 8, 2018 · 0 comments
Assignees

Comments

@OlegKarasik
Copy link

Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric directory (this usually happens if you have installed the servicefabricsdkcommon but didn't created a cluster - I had this use case when running application unit-tests that create instance of StatefulService class).

The exception is happening when reading value from configuration store (that doesn't exist).

NativeConfigStore.FabricGetConfigStore()
  .ReadUnencryptedString("NativeRunConfiguration", "EnableNativeReliableStateManager");

StackTrace:

Error Message:
 System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
   at System.Fabric.Interop.NativeTypes.FromNativeString(IFabricStringResult result)
   at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String functionArgs)
   at Microsoft.ServiceFabric.Data.ReliableStateManager..ctor(StatefulServiceContext serviceContext, ReliableStateManagerConfiguration configuration)
   at Microsoft.ServiceFabric.Services.Runtime.StatefulService..ctor(StatefulServiceContext serviceContext)
@OlegKarasik OlegKarasik changed the title Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric directory Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric` directory Nov 8, 2018
@OlegKarasik OlegKarasik changed the title Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric` directory Microsoft.ServiceFabric.Data.ReliableStateManager throws NullReferenceException on Linux when there is no /etc/servicefabric directory Nov 8, 2018
@gkhanna79 gkhanna79 transferred this issue from microsoft/service-fabric-issues Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants