apache/seatunnel · critical · SeaTunnelEngineException
cluster have no master node
Error message
cluster have no master node
What it means
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.
Source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java:378
}
public boolean isMasterNode() {
// must retry until the cluster have master node
try {
return Boolean.TRUE.equals(
RetryUtils.retryWithException(
() -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()),
new RetryUtils.RetryMaterial(
Constant.OPERATION_RETRY_TIME,
true,
exception ->
isRunning && exception instanceof NullPointerException,
Constant.OPERATION_RETRY_SLEEP)));
} catch (InterruptedException e) {
LOGGER.info("master node check interrupted");
return false;
} catch (Exception e) {
throw new SeaTunnelEngineException("cluster have no master node", e);
}
}
private void printExecutionInfo() {
coordinatorService.printExecutionInfo();
if (coordinatorService.isCoordinatorActive() && this.isMasterNode()) {
coordinatorService.printJobDetailInfo();
}
}
public void updateMetrics(Map<TaskLocation, SeaTunnelMetricsContext> localMap) {
MetricsSnapshotStateStore metricsSnapshotStateStore =
engineContext.getStateStores().metricsSnapshotStore();
metricsSnapshotStateStore.merge(localMap);
}
public void removeMetrics(PipelineLocation pipelineLocation) {
MetricsSnapshotStateStore metricsSnapshotStateStore =View on GitHub (pinned to cf67b549a7)
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.
Defensive patterns
Strategy: retry
Try / catch
try {
boolean master = seaTunnelServer.isMasterNode();
} catch (SeaTunnelEngineException e) {
log.error("Master lookup failed: {}", e.getCause()); // inspect the wrapped cause
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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).
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- Node heartbeat timeout, disconnected for resource manager. N
- Cluster name is required. Please specify it using -cn or --c
- cluster: %s is not running, Please start the cluster first.
- Failed to get cluster members information
- NOT_FOUND_JAR
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9799f935e7d363e7.
Report an issue: GitHub.