apache/dolphinscheduler · error · ServiceException
10144
10144
Error message
delete tenant by id fail, for there are {count} users using it What it means
Thrown in TenantServiceImpl.deleteTenantById when user accounts are still bound to the tenant ({count} users). A tenant with attached users cannot be deleted; the users must be reassigned to another tenant first.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java:240
Tenant tenant = tenantDao.queryDetailById(id);
if (Objects.isNull(tenant)) {
throw new ServiceException(Status.TENANT_NOT_EXIST);
}
List<WorkflowInstanceSummaryDto> workflowInstances = getWorkflowInstancesByTenant(tenant);
if (CollectionUtils.isNotEmpty(workflowInstances)) {
throw new ServiceException(Status.DELETE_TENANT_BY_ID_FAIL, workflowInstances.size());
}
List<Schedule> schedules = scheduleDao.queryScheduleListByTenant(tenant.getTenantCode());
if (CollectionUtils.isNotEmpty(schedules)) {
throw new ServiceException(Status.DELETE_TENANT_BY_ID_FAIL_DEFINES, schedules.size());
}
List<User> userList = userDao.queryUserListByTenant(tenant.getId());
if (CollectionUtils.isNotEmpty(userList)) {
throw new ServiceException(Status.DELETE_TENANT_BY_ID_FAIL_USERS, userList.size());
}
if (!tenantDao.deleteById(id)) {
throw new ServiceException(Status.DELETE_TENANT_BY_ID_ERROR);
}
workflowInstanceDao.updateWorkflowInstanceByTenantCode(tenant.getTenantCode(), Constants.DEFAULT);
}
private List<WorkflowInstanceSummaryDto> getWorkflowInstancesByTenant(Tenant tenant) {
return workflowInstanceDao.queryByTenantCodeAndStatus(
tenant.getTenantCode(),
WorkflowExecutionStatus.NOT_TERMINAL_STATES);
}
/**
* query tenant list
*View on GitHub (pinned to 02eac45a1b)
Solutions
- Reassign the affected users to a different tenant, then retry the delete.
- Delete or disable the user accounts bound to this tenant if appropriate.
- Query the user list by tenant to see which accounts block deletion.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java:240 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/3b7a5541905dea23.
Report an issue: GitHub.