{"record":{"id":"4525f8fe2c37cef4","repo":"apache/dolphinscheduler","slug":"response-getmessage","errorCode":null,"errorMessage":"response.getMessage()","messagePattern":"response\\.getMessage\\(\\)","errorType":"exception","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java","lineNumber":86,"sourceCode":"    }\n\n    @Override\n    public List<Server> listServer(RegistryNodeType nodeType) {\n        return registryClient.getServerList(nodeType);\n    }\n\n    @Override\n    public List<WorkflowExecutorDTO> queryWorkflowExecutors(User loginUser, String masterAddress) {\n        if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {\n            throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);\n        }\n\n        WorkflowExecutorQueryResponse response = Clients\n                .withService(IWorkflowExecutorQueryClient.class)\n                .withHost(masterAddress)\n                .queryWorkflowExecutors(new WorkflowExecutorQueryRequest());\n        if (!response.isSuccess()) {\n            throw new ServiceException(response.getMessage());\n        }\n        return response.getWorkflowExecutors();\n    }\n\n    @Override\n    public List<TaskExecutorDTO> queryTaskExecutors(User loginUser, String serverAddress) {\n        if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {\n            throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);\n        }\n        TaskExecutorQueryResponse response = Clients\n                .withService(ITaskExecutorQueryClient.class)\n                .withHost(serverAddress)\n                .queryTaskInstances(new TaskExecutorQueryRequest());\n        if (!response.isSuccess()) {\n            throw new ServiceException(response.getMessage());\n        }\n        return response.getTaskExecutors();\n    }","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java#L68-L104","documentation":"Thrown by MonitorServiceImpl.queryWorkflowExecutors when the master-side IWorkflowExecutorQueryClient RPC returns an unsuccessful response; the response's message is used directly as the exception message.","triggerScenarios":"Calling queryWorkflowExecutors with a masterAddress whose RPC executes but reports failure - invalid/unreachable master hostname returning an error response, master-side exception while collecting workflow executors, protocol mismatch between API and master versions.","commonSituations":"Typo in masterAddress (still routed to a server that answers with failure); master overloaded or throwing during query; API and master versions incompatible so the request cannot be handled.","solutions":["Read the exception message (response.getMessage()) for the master-side failure cause.","Verify masterAddress points to a live master server (check /monitor or registry).","Ensure API server and master run compatible DolphinScheduler versions.","Retry after the master recovers; check master logs for the underlying error."],"exampleFix":"// before\nList<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, \"bad-master-host:5678\");\n// after\nString masterAddress = registryClient.getServerList(NodeType.MASTER).get(0).getHost(); // valid master\nList<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, masterAddress);","handlingStrategy":"try-catch","validationCode":"List<Server> masters = registryClient.getServerList(NodeType.MASTER);\n// pick a live master host from masters before calling","typeGuard":null,"tryCatchPattern":"try {\n    List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, masterAddress);\n} catch (ServiceException e) {\n    // e.getMessage() is the master-side failure; retry with another master\n}","preventionTips":["Resolve masterAddress from the registry, not hardcoded config.","Keep API and master versions aligned.","Add health checks on the master before querying."],"tags":["dolphinscheduler","rpc","monitor"],"backgroundTag":"upstream-api-error","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"}