apache/dolphinscheduler · error · ServiceException

120021

120021

Error message

this cluster name [{0}] already exists

What it means

Thrown in createCluster when clusterDao.queryByClusterName finds an existing cluster with the same name. Cluster names must be unique; the faulting input is the name parameter that collides with a stored cluster.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java:88

     * create cluster
     *
     * @param loginUser login user
     * @param name      cluster name
     * @param config    cluster config
     * @param desc      cluster desc
     */
    @Transactional
    @Override
    public Long createCluster(User loginUser, String name, String config, String desc) {
        if (isNotAdmin(loginUser)) {
            throw new ServiceException(Status.USER_NO_OPERATION_PERM);
        }

        checkParams(name, config);

        Cluster clusterExistByName = clusterDao.queryByClusterName(name);
        if (clusterExistByName != null) {
            throw new ServiceException(Status.CLUSTER_NAME_EXISTS, name);
        }

        Cluster cluster = new Cluster();
        cluster.setName(name);
        cluster.setConfig(config);
        cluster.setDescription(desc);
        cluster.setOperator(loginUser.getId());
        cluster.setCreateTime(new Date());
        cluster.setUpdateTime(new Date());
        cluster.setCode(CodeGenerateUtils.genCode());

        if (clusterDao.insert(cluster) > 0) {
            return cluster.getCode();
        }
        throw new ServiceException(Status.CREATE_CLUSTER_ERROR);
    }

    /**

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Choose a different, unique cluster name.
  2. Query the existing cluster first; if it is stale or wrong, update or delete it instead of creating a duplicate.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java:88 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/ede1dd30f666c3c0. Report an issue: GitHub.