microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

Service Fabric Upgrade Issue #221

Open asifshiraz opened 6 years ago

asifshiraz commented 6 years ago

We recently updated the runtime on our service fabric cluster to the latest version. As part of that we also updated the nuget packages on our application.

We have a service to service remoting call setup inside the application which is no longer working.

I have followed all the steps described in this article here: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-remoting#upgrade-from-remoting-v1-to-remoting-v2

After the changes, this is how the main areas (indicated to be modified in the above article) now look:

  1. In serviceManifest.xml, I have two endpoints, and I appended V2 at end of ServiceEndPoint. <Endpoint Name="RemotingEndpoint"/> <Endpoint Protocol="http" Name="ServiceEndpointV2" Type="Internal" Port="80" />

  2. In WebService, I have this startup code, in which I changed name to ServiceEndpointV2. var owinStartup = new Startup(); return new ServiceInstanceListener[] { new ServiceInstanceListener(serviceContext => new FabricTransportServiceRemotingListener(serviceContext, new MyInterfaceImpl(), new FabricTransportRemotingListenerSettings { EndpointResourceName = "RemotingEndpoint" }), "RemotingListener" ), new ServiceInstanceListener(serviceContext => new OwinCommunicationListener(owinStartup.Configuration, serviceContext, ServiceEventSource.Current, "ServiceEndpointV2"), "ServiceEndpointV2") };

  3. In AssemblyInfo.cs, I have added: [assembly: FabricTransportServiceRemotingProvider(RemotingListenerVersion = RemotingListenerVersion.V2, RemotingClientVersion = RemotingClientVersion.V2)]

Now, after doing above changes, Our existing code, which used to work before the upgrade, and stopped working afterwards, still does not work, which is as follows:

var proxyFactory = new ServiceProxyFactory(_ => new FabricTransportServiceRemotingClientFactory()); var webServiceClient = proxyFactory.CreateServiceProxy<IMyInterface>(_internalUri); var response = await webServiceClient.HandleEvent(arg1, arg2, serializedMessage);

What it does is that any break point here is hit for the first time, and then afterwards the application stops hitting the break point completely. It gets hung at the last HandleEvent call... never returns from it.. never hits the actual implementation method inside it if I put a break point there.

suhuruli commented 5 years ago

@amanbha @suchiagicha