{"record":{"id":"f9c9fe004f58d1d0","repo":"apache/seatunnel","slug":"job-s-not-running","errorCode":null,"errorMessage":"Job %s not running","messagePattern":"Job (.+?) not running","errorType":"exception","errorClass":"JobNotFoundException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java","lineNumber":2080,"sourceCode":"                        taskExecutionState.getTaskGroupLocation(),\n                        taskExecutionState.getExecutionState()));\n        TaskGroupLocation taskGroupLocation = taskExecutionState.getTaskGroupLocation();\n        JobMaster runningJobMaster = runningJobMasterMap.get(taskGroupLocation.getJobId());\n\n        if (runningJobMaster == null && !restoreAllJobFromMasterNodeSwitchFuture.isDone()) {\n            // Restore still in progress, return early and let worker retry\n            // This is acceptable because worker already has retry logic\n            logger.info(\n                    String.format(\n                            \"Job %s not found and restore still in progress, worker will retry\",\n                            taskGroupLocation.getJobId()));\n            throw new JobRestoreInProgressException(\n                    String.format(\n                            \"Job %s not running (restore in progress)\",\n                            taskGroupLocation.getJobId()));\n        }\n        if (runningJobMaster == null) {\n            throw new JobNotFoundException(\n                    String.format(\"Job %s not running\", taskGroupLocation.getJobId()));\n        }\n        runningJobMaster.updateTaskExecutionState(taskExecutionState);\n    }\n\n    public void shutdown() {\n        isActive = false;\n        if (masterActiveListener != null) {\n            masterActiveListener.shutdown();\n        }\n        if (metricsFetchExecutor != null) {\n            metricsFetchExecutor.shutdownNow();\n        }\n        if (pipelineCleanupScheduler != null) {\n            pipelineCleanupScheduler.shutdown();\n        }\n        clearCoordinatorService();\n        awaitSchedulerTermination(\"master active listener\", masterActiveListener);","sourceCodeStart":2062,"sourceCodeEnd":2098,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java#L2062-L2098","documentation":"CoordinatorService.updateTaskExecutionState throws JobNotFoundException when neither a restore-in-progress marker nor a runningJobMaster exists for the job of the reported task group. The coordinator has no live JobMaster for this job, so the task state update cannot be applied.","triggerScenarios":"A worker sends UpdateTaskExecutionStateOperation for a task group whose jobId has no JobMaster on the coordinator — after the job was failed/cancelled and its JobMaster released, after job cleanup during failover, or if the coordinator restarted without restoring that job.","commonSituations":"Late task-state reports racing with job cancellation/termination; stale workers continuing to report after their job was removed during master failover; clock/binding mismatch where the worker was not told the job ended.","solutions":["Treat as benign if the job was cancelled/failed: the task's state update is no longer relevant once the JobMaster is gone.","Check coordinator logs for why the JobMaster was released (job finished, failover, manual stop-job) around the same timestamp.","If it recurs for live jobs, inspect cluster stability (network partitions, master failover storms) and ensure all nodes run the same SeaTunnel version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before sending a state update, confirm the job is still live on the coordinator\n// (poll running-jobs / check job state via the client API first)","typeGuard":null,"tryCatchPattern":"try {\n    coordinator.updateTaskExecutionState(state);\n} catch (JobNotFoundException e) {\n    log.info(\"Job {} already released; dropping late task state update\", state.getJobId());\n}","preventionTips":["Stop reporting task state once the job reaches terminal state locally","Treat this as benign during job cancellation/failover; log at info level","Keep coordinator/worker versions aligned to avoid stale task-group bindings"],"tags":["seatunnel","zeta-engine","job-not-found","task-execution"],"backgroundTag":"entity-not-found","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"}