apache/dolphinscheduler · error · ServiceException
response.getMessage()
Error message
response.getMessage()
What it means
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.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java:86
}
@Override
public List<Server> listServer(RegistryNodeType nodeType) {
return registryClient.getServerList(nodeType);
}
@Override
public List<WorkflowExecutorDTO> queryWorkflowExecutors(User loginUser, String masterAddress) {
if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {
throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);
}
WorkflowExecutorQueryResponse response = Clients
.withService(IWorkflowExecutorQueryClient.class)
.withHost(masterAddress)
.queryWorkflowExecutors(new WorkflowExecutorQueryRequest());
if (!response.isSuccess()) {
throw new ServiceException(response.getMessage());
}
return response.getWorkflowExecutors();
}
@Override
public List<TaskExecutorDTO> queryTaskExecutors(User loginUser, String serverAddress) {
if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {
throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);
}
TaskExecutorQueryResponse response = Clients
.withService(ITaskExecutorQueryClient.class)
.withHost(serverAddress)
.queryTaskInstances(new TaskExecutorQueryRequest());
if (!response.isSuccess()) {
throw new ServiceException(response.getMessage());
}
return response.getTaskExecutors();
}View on GitHub (pinned to 02eac45a1b)
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.
Example fix
// before List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, "bad-master-host:5678"); // after String masterAddress = registryClient.getServerList(NodeType.MASTER).get(0).getHost(); // valid master List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, masterAddress);
Defensive patterns
Strategy: try-catch
Validate before calling
List<Server> masters = registryClient.getServerList(NodeType.MASTER); // pick a live master host from masters before calling
Try / catch
try {
List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(adminUser, masterAddress);
} catch (ServiceException e) {
// e.getMessage() is the master-side failure; retry with another master
} Prevention
- Resolve masterAddress from the registry, not hardcoded config.
- Keep API and master versions aligned.
- Add health checks on the master before querying.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR
- NO_CURRENT_OPERATING_PERMISSION
- no master server available
- Backfill workflow failed: %s
- The workflow instance: %s status is %s, can not pause
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/4525f8fe2c37cef4.
Report an issue: GitHub.