apache/dolphinscheduler · error · ServiceException
QUEUE_NOT_EXIST
QUEUE_NOT_EXIST
Error message
QUEUE_NOT_EXIST: queue {queue} does not exist What it means
QUEUE_NOT_EXIST is thrown by updateQueueValid() when the existsQueue argument is null, meaning the queue targeted for update was not found in storage. updateQueue() looks up the existing record first and passes null when absent. The update is aborted to avoid updating a phantom record.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java:95
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE_NAME);
} else if (checkQueueExist(queue.getQueue())) {
throw new ServiceException(Status.QUEUE_VALUE_EXIST, queue.getQueue());
} else if (checkQueueNameExist(queue.getQueueName())) {
throw new ServiceException(Status.QUEUE_NAME_EXIST, queue.getQueueName());
}
}
/**
* Check queue update object valid or not
*
* @param existsQueue The exists queue object
* @param updateQueue The queue object want to update
*/
private void updateQueueValid(Queue existsQueue, Queue updateQueue) throws ServiceException {
// Check the exists queue and the necessary of update operation, in not exist checker have to use updateQueue to
// avoid NPE
if (Objects.isNull(existsQueue)) {
throw new ServiceException(Status.QUEUE_NOT_EXIST, updateQueue.getQueue());
} else if (Objects.equals(existsQueue, updateQueue)) {
throw new ServiceException(Status.NEED_NOT_UPDATE_QUEUE);
}
// Check the update queue parameters
else if (StringUtils.isEmpty(updateQueue.getQueue())) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE);
} else if (StringUtils.isEmpty(updateQueue.getQueueName())) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE_NAME);
} else if (!Objects.equals(updateQueue.getQueue(), existsQueue.getQueue())
&& checkQueueExist(updateQueue.getQueue())) {
throw new ServiceException(Status.QUEUE_VALUE_EXIST, updateQueue.getQueue());
} else if (!Objects.equals(updateQueue.getQueueName(), existsQueue.getQueueName())
&& checkQueueNameExist(updateQueue.getQueueName())) {
throw new ServiceException(Status.QUEUE_NAME_EXIST, updateQueue.getQueueName());
}
}
/**View on GitHub (pinned to 02eac45a1b)
Solutions
- Re-fetch the queue list and confirm the target exists
- Create the queue instead if it should exist
- Catch ServiceException with Status.QUEUE_NOT_EXIST and reconcile state
Example fix
// before
queueService.updateQueue(loginUser, missingId, "default", "DefaultQueue");
// after
Map<String, Object> check = queueService.queryQueue(loginUser, missingId);
if (Status.SUCCESS.getCode() == (int) check.get(Constants.STATUS)) {
queueService.updateQueue(loginUser, missingId, "default", "DefaultQueue");
} Defensive patterns
Strategy: validation
Validate before calling
Queue existing = queueMapper.selectById(id);
if (existing == null) {
throw new IllegalStateException("Queue " + id + " does not exist; cannot update");
} Type guard
boolean queueExists(Queue q) { return q != null && q.getId() != null; } Try / catch
try {
queueService.updateQueue(loginUser, id, queue, queueName);
} catch (ServiceException e) {
if (e.getCode() == Status.QUEUE_NOT_EXIST.getCode()) { /* re-sync or create */ }
throw e;
} Prevention
- Re-fetch queues before updating rather than trusting stale ids
- Handle concurrent deletion gracefully
- Use verifyQueue/query before mutations
When it happens
Trigger: Calling updateQueue with a queue id/name that no longer exists; stale UI page holding a queue deleted by another user; wrong id typed into an API script.
Common situations: Concurrent deletion between listing and updating; environment sync where ids differ between dev and prod; updates issued after a queue was removed during cleanup.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- NEED_NOT_UPDATE_QUEUE
- Can not find any datasource by name %s
- Can not find valid workflow by name %s
- Can not find valid project by name %s
- Can not find valid resource by name %s
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/f676a88dcc7da650.
Report an issue: GitHub.