alibaba/canal · error · CanalException

load manager config failed.

Error message

load manager config failed.

What it means

Thrown by PlainCanalConfigClient.queryConfig as a catch-all wrapper around any Throwable raised while fetching remote canal/instance config from the Canal Admin server. It signals that the HTTP GET + JSON parse + post-process pipeline failed for an unhandled reason (network, timeout, malformed JSON, or the inner requestGet error 361). The original cause is attached as the exception's cause so the real failure is inspectable via getCause().

Source

Thrown at instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/plain/PlainCanalConfigClient.java:114

        if (StringUtils.isEmpty(md5)) {
            md5 = "";
        }
        String url = configURL + "/api/v1/config/instances_polling?md5=" + md5 + "&ip=" + localIp + "&port="
                     + adminPort;
        ResponseModel<CanalConfig> config = doQuery(url);
        if (config.data != null) {
            return config.data.content;
        } else {
            return null;
        }
    }

    private PlainCanal queryConfig(String url) {
        try {
            ResponseModel<CanalConfig> config = doQuery(url);
            return processData(config.data);
        } catch (Throwable e) {
            throw new CanalException("load manager config failed.", e);
        }
    }

    private ResponseModel<CanalConfig> doQuery(String url) {
        Map<String, String> heads = new HashMap<>();
        heads.put("user", user);
        heads.put("passwd", passwd);
        String response = httpHelper.get(url, heads, REQUEST_TIMEOUT);
        ResponseModel<CanalConfig> resp = JSON.parseObject(response,
            new TypeReference<ResponseModel<CanalConfig>>() {
            });

        if (!HttpHelper.REST_STATE_OK.equals(resp.code)) {
            throw new CanalException("requestGet for canal config error: " + resp.message);
        }

        return resp;
    }

View on GitHub (pinned to 87be50e876)

Solutions

  1. Inspect the attached cause (e.getCause()) in logs to see the real failure (ConnectException, SocketTimeoutException, JSONException) before changing anything.
  2. Verify the Admin server is up and reachable: curl the configURL endpoint /api/v1/config/server_polling from the Canal Server host with the same user/passwd headers.
  3. Correct canal.manager.* properties in canal.properties (configURL host/port, user, passwd) so they match the Canal Admin deployment.
  4. If the cause is JSON parse error, check the Admin server version matches the Canal Server version (the ResponseModel contract changed across releases) and that no proxy/interceptor is rewriting the response body.

Example fix

// before
canal.instance.global.manager.address = wrong-host:8089

// after (point at the running Canal Admin and supply credentials)
canal.manager.servers = admin-host:8089
canal.manager.user = admin
canal.manager.password = ********
Defensive patterns

Strategy: try-catch

Validate before calling

// before constructing the client, sanity-check the admin endpoint
java.net.URL u = new java.net.URL(configURL + "/api/v1/config/server_polling?ip=127.0.0.1&port=11110&md5=&register=0&cluster=&name=");
try (java.net.Socket s = new java.net.Socket()) {
    s.connect(new java.net.InetSocketAddress(u.getHost(), u.getPort() < 0 ? 80 : u.getPort()), 3000);
} // throws if unreachable -> do not start client

Try / catch

try {
    PlainCanal config = configClient.findServer(md5);
} catch (CanalException e) {
    log.error("admin config fetch failed (cause={})", e.getCause() == null ? e.getMessage() : e.getCause().toString());
    // fall back to last known-good local config or halt startup
}

Prevention

When it happens

Trigger: Calling PlainCanalConfigClient.findServer(md5), findInstance(destination, md5), or findInstances(md5). These build a URL against configURL and call queryConfig(url), which calls doQuery(url). Any Throwable escaping doQuery (httpHelper.get throwing, JSON.parseObject failing, REST_STATE_OK mismatch) or processData (IOException/NoSuchAlgorithmException) gets wrapped into this CanalException.

Common situations: Canal Server is configured with canal.manager configuration pointing at an Admin URL that is unreachable, wrong port, firewall blocking, TLS mismatch, wrong user/passwd, or the Admin server is down. Also when the Admin returns a non-200 JSON or HTML error page that fastjson2 cannot deserialize into ResponseModel<CanalConfig>.

Related errors


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