{"record":{"id":"9799f935e7d363e7","repo":"apache/seatunnel","slug":"cluster-have-no-master-node","errorCode":null,"errorMessage":"cluster have no master node","messagePattern":"cluster have no master node","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"critical","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java","lineNumber":378,"sourceCode":"    }\n\n    public boolean isMasterNode() {\n        // must retry until the cluster have master node\n        try {\n            return Boolean.TRUE.equals(\n                    RetryUtils.retryWithException(\n                            () -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()),\n                            new RetryUtils.RetryMaterial(\n                                    Constant.OPERATION_RETRY_TIME,\n                                    true,\n                                    exception ->\n                                            isRunning && exception instanceof NullPointerException,\n                                    Constant.OPERATION_RETRY_SLEEP)));\n        } catch (InterruptedException e) {\n            LOGGER.info(\"master node check interrupted\");\n            return false;\n        } catch (Exception e) {\n            throw new SeaTunnelEngineException(\"cluster have no master node\", e);\n        }\n    }\n\n    private void printExecutionInfo() {\n        coordinatorService.printExecutionInfo();\n        if (coordinatorService.isCoordinatorActive() && this.isMasterNode()) {\n            coordinatorService.printJobDetailInfo();\n        }\n    }\n\n    public void updateMetrics(Map<TaskLocation, SeaTunnelMetricsContext> localMap) {\n        MetricsSnapshotStateStore metricsSnapshotStateStore =\n                engineContext.getStateStores().metricsSnapshotStore();\n        metricsSnapshotStateStore.merge(localMap);\n    }\n\n    public void removeMetrics(PipelineLocation pipelineLocation) {\n        MetricsSnapshotStateStore metricsSnapshotStateStore =","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java#L360-L396","documentation":"SeaTunnelServer.isMasterNode wraps failures of the underlying master-node lookup in SeaTunnelEngineException(\"cluster have no master node\", e). The exception carries the original cause from the cluster membership query (e.g. Hazelcast returning no master / distributed object failure). It means the cluster topology query could not identify any master node.","triggerScenarios":"The Hazelcast cluster operation used to determine the master throws or returns nothing — e.g. during cluster shutdown, split-brain, or membership instability — while isMasterNode is called by resolveCheckpointControl, memberRemoved, getCoordinatorService, printExecutionInfo, getSeaTunnelServer, getRunningJobDAGInfo paths.","commonSituations":"Cluster shutdown in progress; split-brain or network partition leaving members without a valid master; interrupted master check (note: interruption is handled gracefully and returns false, so this error means an actual lookup failure).","solutions":["Inspect the wrapped cause (`e`) in logs — fix the underlying Hazelcast issue (network partition, cluster restart) first.","Verify all members are connected to the same cluster (same cluster name, discovery config) and network is stable.","If during planned shutdown, ignore; otherwise restart the cluster cleanly once connectivity is restored."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    boolean master = seaTunnelServer.isMasterNode();\n} catch (SeaTunnelEngineException e) {\n    log.error(\"Master lookup failed: {}\", e.getCause()); // inspect the wrapped cause\n    throw e;\n}","preventionTips":["Keep Hazelcast networking healthy (stable TCP, identical cluster name/discovery config)","Avoid cluster-wide operations during shutdown or split-brain recovery","Always inspect e.getCause() — this exception wraps the real membership failure"],"tags":["seatunnel","zeta-engine","hazelcast","master-election","cluster"],"backgroundTag":"connection-refused","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}