Service remoting in Java with Reliable Services Fails

Sakil Barbhuiya 1 Reputation point
2020-02-10T22:35:40.39+00:00

I have created a simple Stateless Reliable Service on a Service Fabric cluster set up on Azure. I have tried to access the service using Service Remoting as guided [here] (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-remoting-java). I have created the following Java files to implement the codes suggested in the guide:

  1. TestRemoteAccess: implements the following methods - helloWorldAsync() and createServiceInstanceListeners()
  2. TestRemoteAccessInterface: interface of the service that includes - CompletableFuture helloWorldAsync();
  3. TestClient: calls the remote service method using the following code -
    MyService helloWorldClient = ServiceProxyBase.create(MyService.class, new URI("fabric:/MyApplication/MyHelloWorldService"));
    CompletableFuture message = helloWorldClient.helloWorldAsync();
    System.out.println(" TEST -- " + message);

When I try to run the TestClient as a Java application from one of the nodes inside the service fabric cluster I get the following error message:
system.fabric.exception.FabricException:
TEST -- java.util.concurrent.CompletableFuture@7cd62f43[Completed exceptionally]

Can anyone please suggest what could be the reason for such error even when I am trying to access the service from within the service fabric cluster? I have been stuck with such a simple service access for days and so, I will appreciate any sort of help with regard to accessing a stateless service from within the service fabric cluster using a TestClient Java app.

Many thanks.

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
205 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. jakaruna-MSFT 591 Reputation points Microsoft Employee
    2020-03-02T08:55:37.863+00:00

    I see that you have raised a support case on this issue.
    For the benefit of the community, you can post the answer here once its resolved.

    Once the support case is resolved, Then i will check for the resolution and post here