Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8005

NPE on locator when connecting to ClusterManagementService using a cache.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: gfsh, management
    • Labels:
      None

      Description

      Starting a cluster in gfsh like this:

      gfsh> start locator
      gfsh> start server

      And creating a GeodeConnectionConfig like this:

       ClientCache clientCache = new ClientCacheFactory()
       .addPoolLocator("localhost", 10334)
       .create();
      
      ConnectionConfig connectionConfig = new GeodeConnectionConfig(clientCache);

      will result in the following exception on the client:

      Exception in thread "main" java.lang.IllegalStateException: Unable to discover a locator that has ClusterManagementService running.Exception in thread "main" java.lang.IllegalStateException: Unable to discover a locator that has ClusterManagementService running. at org.apache.geode.management.internal.api.GeodeConnectionConfig.setClientCache(GeodeConnectionConfig.java:126) at org.apache.geode.management.internal.api.GeodeConnectionConfig.<init>(GeodeConnectionConfig.java:74) at example.v2.Experiment.main(Experiment.java:42) 

       And this exception in the locator logs: 

      java.lang.NullPointerExceptionjava.lang.NullPointerException at org.apache.geode.management.internal.configuration.handlers.ClusterManagementServiceInfoRequestHandler.processRequest(ClusterManagementServiceInfoRequestHandler.java:56) at org.apache.geode.distributed.internal.membership.gms.locator.PrimaryHandler.processRequest(PrimaryHandler.java:70) at org.apache.geode.distributed.internal.tcpserver.TcpServer.processOneConnection(TcpServer.java:421) at org.apache.geode.distributed.internal.tcpserver.TcpServer.lambda$processRequest$0(TcpServer.java:326) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 

      A workaround for this is to set "--bind-address=localhost" when starting the locator.

       

      Despite this exception, the ClusterManagementService is running on the locator and the endpoints can still be accessed using hostname and port.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pjohnson Patrick Johnsn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: