apache/dolphinscheduler · error · ServiceException
1300016
1300016
Error message
tenant's fullname is too long error
What it means
Status.TENANT_FULL_NAME_TOO_LONG_ERROR from createTenantValid: the tenantCode exceeds TENANT_FULL_NAME_MAX_LENGTH (64 characters). Since tenant codes become Linux user names, overly long values cannot be created on the OS and are rejected up front.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java:90
@Autowired
private ScheduleDao scheduleDao;
@Autowired
private UserDao userDao;
@Autowired
private QueueService queueService;
/**
* Check the tenant new object valid or not
*
* @param tenant The tenant object want to create
*/
private void createTenantValid(Tenant tenant) throws ServiceException {
if (StringUtils.isEmpty(tenant.getTenantCode())) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, tenant.getTenantCode());
} else if (StringUtils.length(tenant.getTenantCode()) > TENANT_FULL_NAME_MAX_LENGTH) {
throw new ServiceException(Status.TENANT_FULL_NAME_TOO_LONG_ERROR);
} else if (!RegexUtils.isValidLinuxUserName(tenant.getTenantCode())) {
throw new ServiceException(Status.CHECK_OS_TENANT_CODE_ERROR);
} else if (checkTenantExists(tenant.getTenantCode())) {
throw new ServiceException(Status.OS_TENANT_CODE_EXIST, tenant.getTenantCode());
}
}
/**
* Check tenant update object valid or not
*
* @param existsTenant The exists queue object
* @param updateTenant The queue object want to update
*/
private void updateTenantValid(Tenant existsTenant, Tenant updateTenant) throws ServiceException {
// Check the exists tenant
if (Objects.isNull(existsTenant)) {
log.error("Tenant does not exist.");
throw new ServiceException(Status.TENANT_NOT_EXIST);View on GitHub (pinned to 02eac45a1b)
Solutions
- Shorten the tenantCode to <= 64 characters before creating the tenant.
- Apply a truncation/hash scheme in automation: e.g. first 40 chars + short hash.
- Normalize SSO/LDAP-derived names to a compact tenant code mapping.
- Check for accidental duplication from repeated concatenation in your generator.
Example fix
// before String tenantCode = org + "-" + division + "-" + team + "-" + env; // may exceed 64 // after String tenantCode = (org + "-" + team).substring(0, Math.min(50, org.length() + team.length() + 1)) + "-" + env;
Defensive patterns
Strategy: validation
Validate before calling
if (tenantCode != null && tenantCode.length() > 64) {
throw new IllegalArgumentException("tenantCode must be <= 64 chars, got " + tenantCode.length());
} Try / catch
try {
tenantService.createTenant(loginUser, tenantCode, desc, queueId);
} catch (ServiceException e) {
if (e.getCode() == 1300016) { /* shorten tenantCode and retry */ }
} Prevention
- Cap generated tenant codes at 64 chars
- Truncate + hash long org-derived names
- Normalize SSO/LDAP names to compact codes
- Test your generator with worst-case long inputs
When it happens
Trigger: POST /tenants (or createTenantIfNotExists during user creation flows) with tenantCode longer than the 64-char limit.
Common situations: Auto-generating tenant codes from long org/domain names (e.g. 'company-division-longteamname-env' concatenated); LDAP/SSO sync that derives tenant codes from long distinguished names.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/4f713967326961da.
Report an issue: GitHub.