apache/seatunnel · error · SeaTunnelEngineException

This is not a master node now.

Error message

This is not a master node now.

What it means

SeaTunnelServer.getCoordinatorService throws SeaTunnelEngineException ("This is not a master node now.") when the caller believes this member hosts the coordinator (isCoordinatorActive true on the local coordinatorService), but this member is not the master node any more. This indicates a stale view of cluster topology after a master switch.

Source

Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java:309

            while (isRunning
                    && retryCount < maxRetry
                    && !coordinatorService.isCoordinatorActive()
                    && isMasterNode()) {
                try {
                    LOGGER.warning(
                            "This is master node, waiting the coordinator service init finished");
                    Thread.sleep(retryPause);
                    retryCount++;
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
            if (coordinatorService.isCoordinatorActive()) {
                return coordinatorService;
            }

            if (!isMasterNode()) {
                throw new SeaTunnelEngineException("This is not a master node now.");
            }
            // Return retryable exception to retry from the worker node, because the coordinator is
            // not ready yet. By this way, we can release the operation thread and retry later.
            throw new SeaTunnelEngineRetryableException(
                    "Can not get coordinator service from an active master node.");
        } else {
            throw new SeaTunnelEngineException(
                    "Please don't get coordinator service from an inactive master node");
        }
    }

    public RealtimeMetricsService getRealtimeMetricsService() {
        return realtimeMetricsService;
    }

    synchronized void startRealtimeMetricsService(CoordinatorService activeCoordinatorService) {
        if (realtimeMetricsService != null) {
            return;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Wait for cluster membership to converge and retry — this is usually transient during failover.
  2. Check Hazelcast logs on all nodes for membership events and split-brain merges; ensure stable networking and identical cluster name/group config.
  3. Ensure all nodes run a consistent SeaTunnel version to avoid coordinator-activity mismatches.
Defensive patterns

Strategy: retry

Try / catch

catch (SeaTunnelEngineException e) {
    if ("This is not a master node now.".equals(e.getMessage())) {
        // topology changed; re-resolve the master and retry the operation
        retryAfterBackoff(op);
    } else throw e;
}

Prevention

When it happens

Trigger: Any operation resolving the coordinator service (jobMaster, resourceManager, awaitJobReleasedByCoordinator, runningJobMasterMap) executed on a node whose local coordinatorService claims active membership while Hazelcast's master is a different member — a transient inconsistency during master failover.

Common situations: Split-brain or slow cluster membership propagation right after the master node died and a new master was elected; operations landing on the old coordinator member before it demotes.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/4ca61dacc9d92ca7. Report an issue: GitHub.