java.lang.IllegalStateException: discoveryNodes must be set before calling toXContent with group_by=nodes

GitHub | dadoonet | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    discoveryNodes must be set before calling toXContent error when calling prepareListTasks().get()

    GitHub | 7 months ago | dadoonet
    java.lang.IllegalStateException: discoveryNodes must be set before calling toXContent with group_by=nodes

    Root Cause Analysis

    1. java.lang.IllegalStateException

      discoveryNodes must be set before calling toXContent with group_by=nodes

      at org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse.toXContent()
    2. org.elasticsearch.action
      ListTasksResponse.toXContent
      1. org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse.toXContent(ListTasksResponse.java:159)
      1 frame
    3. ElasticSearch
      Strings.toString
      1. org.elasticsearch.common.Strings.toString(Strings.java:901)
      2. org.elasticsearch.common.Strings.toString(Strings.java:887)
      2 frames
    4. org.elasticsearch.action
      ListTasksResponse.toString
      1. org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse.toString(ListTasksResponse.java:208)
      1 frame
    5. Java RT
      StringBuilder.append
      1. java.lang.String.valueOf(String.java:2994)
      2. java.lang.StringBuilder.append(StringBuilder.java:131)
      2 frames
    6. org.elasticsearch.test
      AssertingLocalTransport.handleParsedResponse
      1. org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertVersionSerializable(ElasticsearchAssertions.java:678)
      2. org.elasticsearch.test.transport.AssertingLocalTransport.handleParsedResponse(AssertingLocalTransport.java:85)
      2 frames
    7. ElasticSearch
      ThreadContext$ContextPreservingRunnable.run
      1. org.elasticsearch.transport.local.LocalTransport.handleResponse(LocalTransport.java:386)
      2. org.elasticsearch.transport.local.LocalTransport.processReceivedMessage(LocalTransport.java:292)
      3. org.elasticsearch.transport.local.LocalTransport.lambda$receiveMessage$0(LocalTransport.java:252)
      4. org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:450)
      4 frames
    8. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames