{"record":{"id":"4ca61dacc9d92ca7","repo":"apache/seatunnel","slug":"this-is-not-a-master-node-now","errorCode":null,"errorMessage":"This is not a master node now.","messagePattern":"This is not a master node now\\.","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java","lineNumber":309,"sourceCode":"            while (isRunning\n                    && retryCount < maxRetry\n                    && !coordinatorService.isCoordinatorActive()\n                    && isMasterNode()) {\n                try {\n                    LOGGER.warning(\n                            \"This is master node, waiting the coordinator service init finished\");\n                    Thread.sleep(retryPause);\n                    retryCount++;\n                } catch (InterruptedException e) {\n                    throw new RuntimeException(e);\n                }\n            }\n            if (coordinatorService.isCoordinatorActive()) {\n                return coordinatorService;\n            }\n\n            if (!isMasterNode()) {\n                throw new SeaTunnelEngineException(\"This is not a master node now.\");\n            }\n            // Return retryable exception to retry from the worker node, because the coordinator is\n            // not ready yet. By this way, we can release the operation thread and retry later.\n            throw new SeaTunnelEngineRetryableException(\n                    \"Can not get coordinator service from an active master node.\");\n        } else {\n            throw new SeaTunnelEngineException(\n                    \"Please don't get coordinator service from an inactive master node\");\n        }\n    }\n\n    public RealtimeMetricsService getRealtimeMetricsService() {\n        return realtimeMetricsService;\n    }\n\n    synchronized void startRealtimeMetricsService(CoordinatorService activeCoordinatorService) {\n        if (realtimeMetricsService != null) {\n            return;","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java#L291-L327","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Wait for cluster membership to converge and retry — this is usually transient during failover.","Check Hazelcast logs on all nodes for membership events and split-brain merges; ensure stable networking and identical cluster name/group config.","Ensure all nodes run a consistent SeaTunnel version to avoid coordinator-activity mismatches."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (SeaTunnelEngineException e) {\n    if (\"This is not a master node now.\".equals(e.getMessage())) {\n        // topology changed; re-resolve the master and retry the operation\n        retryAfterBackoff(op);\n    } else throw e;\n}","preventionTips":["Avoid hard-coding the coordinator/master member address; resolve it per operation","Keep Hazelcast membership stable (good networking, identical cluster configs)","Expect this transiently during failover and retry with backoff"],"tags":["seatunnel","zeta-engine","master-failover","cluster-topology"],"backgroundTag":"invalid-state-transition","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}