alibaba/canal · error · IllegalArgumentException

canal.admin.passwd is empty , pls check https://github.com/a

Error message

canal.admin.passwd is empty , pls check https://github.com/alibaba/canal/issues/4941

What it means

Thrown by CanalLauncher during startup when canal.admin.manager is set (manager mode) but canal.admin.passwd is empty. This is the admin-credential counterpart to error 292: it validates that enabling the canal-manager integration requires a non-empty admin password. References the same issue #4941.

Source

Thrown at deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalLauncher.java:58

            System.setProperty("rocketmq.client.logUseSlf4j","true");

            logger.info("## load canal configurations");
            String conf = System.getProperty("canal.conf", "classpath:canal.properties");
            Properties properties = new Properties();
            if (conf.startsWith(CLASSPATH_URL_PREFIX)) {
                conf = StringUtils.substringAfter(conf, CLASSPATH_URL_PREFIX);
                properties.load(CanalLauncher.class.getClassLoader().getResourceAsStream(conf));
            } else {
                properties.load(new FileInputStream(conf));
            }

            final CanalStarter canalStater = new CanalStarter(properties);
            String managerAddress = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_MANAGER);
            if (StringUtils.isNotEmpty(managerAddress)) {
                String user = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_USER);
                String passwd = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_PASSWD);
                if (StringUtils.isEmpty(passwd)) {
                    throw new IllegalArgumentException(
                        "canal.admin.passwd is empty , pls check https://github.com/alibaba/canal/issues/4941");
                }
                String adminPort = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_PORT, "11110");
                boolean autoRegister = BooleanUtils.toBoolean(CanalController.getProperty(properties,
                    CanalConstants.CANAL_ADMIN_AUTO_REGISTER));
                String autoCluster = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_AUTO_CLUSTER);
                String name = CanalController.getProperty(properties, CanalConstants.CANAL_ADMIN_REGISTER_NAME);
                if (StringUtils.isEmpty(name)) {
                    name = AddressUtils.getHostName();
                }

                String registerIp = CanalController.getProperty(properties, CanalConstants.CANAL_REGISTER_IP);
                if (StringUtils.isEmpty(registerIp)) {
                    registerIp = AddressUtils.getHostIp();
                }
                final PlainCanalConfigClient configClient = new PlainCanalConfigClient(managerAddress,
                    user,
                    passwd,

View on GitHub (pinned to 87be50e876)

Solutions

  1. Set canal.admin.passwd to the canal-admin user's password (or hash).
  2. If you did not intend manager mode, clear canal.admin.manager.
  3. Ensure canal.admin.user is also set (the launcher reads it alongside passwd).
  4. Restart Canal after correcting the properties.

Example fix

# before (canal.properties)
canal.admin.manager = 127.0.0.1:8089
# canal.admin.passwd =
# after
canal.admin.manager = 127.0.0.1:8089
canal.admin.user = admin
canal.admin.passwd = yourPassword
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight check before launching
String manager = properties.getProperty(CanalConstants.CANAL_ADMIN_MANAGER);
String passwd = properties.getProperty(CanalConstants.CANAL_ADMIN_PASSWD);
if (StringUtils.isNotEmpty(manager) && StringUtils.isEmpty(passwd)) {
    throw new IllegalArgumentException(
        "canal.admin.manager is set but canal.admin.passwd is empty; set the password or clear the manager address.");
}

Prevention

When it happens

Trigger: canal.properties sets canal.admin.manager to a non-empty address but leaves canal.admin.passwd blank. CanalLauncher reads both and checks isNotEmpty(managerAddress) && isEmpty(passwd).

Common situations: Enabling canal-admin integration for the first time and forgetting the password; the password line commented out; an env override that set the manager address but not the password.

Related errors


AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14). Data as JSON: /api/errors/c7318ed4fa719000. Report an issue: GitHub.