apache/dolphinscheduler · error · ServiceException

CREATE_ALERT_GROUP_ERROR

CREATE_ALERT_GROUP_ERROR

Error message

CREATE_ALERT_GROUP_ERROR

What it means

Thrown in createAlertGroup when alertGroupDao.insert either returns 0 rows or throws an exception, meaning the new alert group could not be persisted (e.g., DB constraint violation, connection failure, or duplicate group name).

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java:170

        AlertGroup alertGroup = new AlertGroup();
        Date now = new Date();

        alertGroup.setGroupName(groupName);
        alertGroup.setAlertInstanceIds(alertInstanceIds);
        alertGroup.setDescription(desc);
        alertGroup.setCreateTime(now);
        alertGroup.setUpdateTime(now);
        alertGroup.setCreateUserId(loginUser.getId());

        // insert
        try {
            int insert = alertGroupDao.insert(alertGroup);
            if (insert > 0) {
                log.info("Create alert group complete, groupName:{}", alertGroup.getGroupName());
                return alertGroup;
            }
            log.error("Create alert group error, groupName:{}", alertGroup.getGroupName());
            throw new ServiceException(Status.CREATE_ALERT_GROUP_ERROR);
        } catch (DuplicateKeyException ex) {
            log.error("Create alert group error, groupName:{}", alertGroup.getGroupName(), ex);
            throw new ServiceException(Status.ALERT_GROUP_EXIST);
        }
    }

    /**
     * updateWorkflowInstance alert group
     *
     * @param loginUser login user
     * @param id alert group id
     * @param groupName group name
     * @param desc description
     * @param alertInstanceIds alertInstanceIds
     * @return update result code
     */
    @Override
    public AlertGroup updateAlertGroupById(User loginUser, int id, String groupName, String desc,

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Check that the group name does not already exist; group names must be unique.
  2. Inspect server logs and database health for the underlying insert failure.
  3. Retry the creation after fixing the data or database issue.
Defensive patterns

Strategy: try-catch

When it happens

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