{"record":{"id":"1f816ee4277ece86","repo":"SonarSource/sonarqube","slug":"distributed-cluster-action-in-cluster-nodes-othe","errorCode":null,"errorMessage":"Distributed cluster action in cluster nodes  (other nodes may have timed out)","messagePattern":"Distributed cluster action in cluster nodes  \\(other nodes may have timed out\\)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server/sonar-process/src/main/java/org/sonar/process/cluster/hz/DistributedAnswer.java","lineNumber":82,"sourceCode":"\n  public void setAnswer(Member member, T answer) {\n    this.answers.put(member, answer);\n  }\n\n  public void setTimedOut(Member member) {\n    this.timedOutMembers.add(member);\n  }\n\n  public void setFailed(Member member, Exception e) {\n    failedMembers.put(member, e);\n  }\n\n  public void propagateExceptions() {\n    if (!failedMembers.isEmpty()) {\n      String failedMemberNames = failedMembers.keySet().stream()\n        .map(m -> m.getAttribute(NODE_NAME.getKey()))\n        .collect(Collectors.joining(\", \"));\n      throw new IllegalStateException(\"Distributed cluster action in cluster nodes \" + failedMemberNames + \" (other nodes may have timed out)\",\n        failedMembers.values().iterator().next());\n    }\n\n    if (!timedOutMembers.isEmpty()) {\n      String timedOutMemberNames = timedOutMembers.stream()\n        .map(m -> m.getAttribute(NODE_NAME.getKey()))\n        .collect(Collectors.joining(\", \"));\n      throw new IllegalStateException(\"Distributed cluster action timed out in cluster nodes \" + timedOutMemberNames);\n    }\n  }\n\n  /**\n   * Returns any answer. No guarantees are made on the order. Use this method if you only expect exactly one answer.\n   * @return the first answer, if any\n   */\n  public Optional<T> getSingleAnswer() {\n    return answers.values().stream().findFirst();\n  }","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-process/src/main/java/org/sonar/process/cluster/hz/DistributedAnswer.java#L64-L100","documentation":"DistributedAnswer.propagateExceptions reports failures of a Hazelcast distributed action across cluster members. When some members returned a failure (failedMembers non-empty), it throws IllegalStateException naming those nodes and attaching the first failure as the cause.","triggerScenarios":"Executing a cluster-wide operation (e.g. via HazelcastMemberAddressables/distributed call) where one or more member nodes answered with an exception; propagateExceptions() is then called to surface the error to the caller.","commonSituations":"A node failing to apply a cluster operation due to local errors (disk full, deserialization failure, internal error) while others succeed; mixed-version cluster where one node cannot handle the action.","solutions":["Inspect the attached cause (first failed member's exception) and the named nodes' logs for the root error.","Restart or repair the failing cluster member(s) listed in the message.","Verify all nodes run the same SonarQube version and plugins to avoid handling incompatibilities."],"exampleFix":"// operator: check failing node\nkubectl logs <failed-node-pod> | tail -100  // find the root exception reported as cause\n// then restart the failing member so it re-joins the cluster","handlingStrategy":"try-catch","validationCode":"List<Member> healthy = cluster.getMembers().stream()\n  .filter(m -> m.getHealth() == MemberHealth.HEALTHY)\n  .collect(Collectors.toList());\nif (healthy.size() < expectedQuorum) {\n  throw new IllegalStateException(\"Refusing distributed action: insufficient healthy members\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  distributedAnswer.propagateExceptions();\n} catch (IllegalStateException e) {\n  logger.error(\"Cluster action failed on nodes: {}; cause: {}\", e.getMessage(), e.getCause());\n  // alert ops / retry after repairing nodes\n}","preventionTips":["Monitor node health and disk/memory on every cluster member.","Keep all nodes on the same SonarQube and plugin versions.","Log the failing member's stack trace (the attached cause) for diagnosis."],"tags":["cluster","hazelcast","distributed"],"backgroundTag":"upstream-api-error","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}