{"record":{"id":"c6de255da49b7385","repo":"apache/dolphinscheduler","slug":"workflowinstance-s-pause-failed","errorCode":null,"errorMessage":"WorkflowInstance: %s pause failed","messagePattern":"WorkflowInstance: (.+?) pause failed","errorType":"exception","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/PauseWorkflowInstanceExecutorDelegate.java","lineNumber":106,"sourceCode":"    }\n\n    private void pauseInMaster(WorkflowInstance workflowInstance) {\n        try {\n            final WorkflowInstancePauseResponse pauseResponse = Clients\n                    .withService(IWorkflowControlClient.class)\n                    .withHost(workflowInstance.getHost())\n                    .pauseWorkflowInstance(new WorkflowInstancePauseRequest(workflowInstance.getId()));\n\n            if (pauseResponse != null && pauseResponse.isSuccess()) {\n                log.info(\"WorkflowInstance: {} pause success\", workflowInstance.getName());\n            } else {\n                throw new ServiceException(\n                        \"WorkflowInstance: \" + workflowInstance.getName() + \" pause failed: \" + pauseResponse);\n            }\n        } catch (ServiceException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new ServiceException(\n                    String.format(\"WorkflowInstance: %s pause failed\", workflowInstance.getName()), e);\n        }\n    }\n\n    public static class PauseWorkflowInstanceOperation {\n\n        private final PauseWorkflowInstanceExecutorDelegate pauseWorkflowInstanceExecutorDelegate;\n\n        private WorkflowInstance workflowInstance;\n\n        private User executeUser;\n\n        public PauseWorkflowInstanceOperation(PauseWorkflowInstanceExecutorDelegate pauseWorkflowInstanceExecutorDelegate) {\n            this.pauseWorkflowInstanceExecutorDelegate = pauseWorkflowInstanceExecutorDelegate;\n        }\n\n        public PauseWorkflowInstanceExecutorDelegate.PauseWorkflowInstanceOperation onWorkflowInstance(WorkflowInstance workflowInstance) {\n            this.workflowInstance = workflowInstance;","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/PauseWorkflowInstanceExecutorDelegate.java#L88-L124","documentation":"Wrapper exception for unexpected failures during the pause RPC itself. While calling pauseWorkflowInstance on the master, any non-ServiceException exception (network errors, timeouts, deserialization problems) is caught and rethrown as a ServiceException with this message and the original cause attached.","triggerScenarios":"pauseInMaster's RPC to the instance host throws — e.g. connection refused (master down), socket timeout, unknown host, or response unmarshalling failure.","commonSituations":"Master crashed or restarted between state check and pause call; network partition or firewall blocking API→master port; DNS/hostname resolution issues; master overloaded causing RPC timeout.","solutions":["Inspect the chained cause (getCause()) to identify the underlying network/RPC error","Verify the master host is reachable from the API server (ping/telnet host:port)","Restart or recover the failed master and retry the pause","Increase RPC timeouts if the master is under heavy load"],"exampleFix":"// before: no cause inspection, blind retry\ntry { api.pauseWorkflowInstance(id); } catch (ServiceException e) { retry(id); }\n// after: log root cause before retry\ntry { api.pauseWorkflowInstance(id); }\ncatch (ServiceException e) {\n    log.error(\"Pause failed, cause: {}\", e.getCause(), e);\n    retry(id); // only after master confirmed healthy\n}","handlingStrategy":"retry","validationCode":"// pre-check master reachability\nboolean reachable = ping(instance.getHost(), masterRpcPort);","typeGuard":null,"tryCatchPattern":"try { delegate.pause(op); } catch (ServiceException e) { Throwable cause = e.getCause(); if (cause instanceof java.net.ConnectException || cause instanceof java.net.SocketTimeoutException) { retryWithBackoff(op); } else { throw e; } }","preventionTips":["Monitor API→master network connectivity and RPC latency","Increase RPC timeout if masters are under load","Alert on master process restarts","Log the chained cause of ServiceException for diagnosis"],"tags":["dolphinscheduler","network","rpc-failure","pause"],"backgroundTag":"network-request-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}