alibaba/canal · error · CanalClientException
something goes wrong when doing authentication:
Error message
something goes wrong when doing authentication:
What it means
Error "something goes wrong when doing authentication: " thrown in alibaba/canal.
Source
Thrown at client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java:193
.setUsername(username != null ? username : "")
.setPassword(ByteString.copyFromUtf8(newPasswd != null ? newPasswd : ""))
.setNetReadTimeout(idleTimeout)
.setNetWriteTimeout(idleTimeout)
.build();
writeWithHeader(Packet.newBuilder()
.setType(PacketType.CLIENTAUTHENTICATION)
.setBody(ca.toByteString())
.build()
.toByteArray());
//
Packet ack = Packet.parseFrom(readNextPacket());
if (ack.getType() != PacketType.ACK) {
throw new CanalClientException("unexpected packet type when ack is expected");
}
Ack ackBody = Ack.parseFrom(ack.getBody());
if (ackBody.getErrorCode() > 0) {
throw new CanalClientException("something goes wrong when doing authentication: "
+ ackBody.getErrorMessage());
}
connected = true;
return new InetSocketAddress(channel.socket().getLocalAddress(), channel.socket().getLocalPort());
} catch (IOException | NoSuchAlgorithmException e) {
throw new CanalClientException(e);
}
}
private void doDisconnect() throws CanalClientException {
if (readableChannel != null) {
quietlyClose(readableChannel);
readableChannel = null;
}
if (writableChannel != null) {
quietlyClose(writableChannel);
writableChannel = null;View on GitHub (pinned to 87be50e876)
Solutions
- Check canal.user/canal.passwd on the client match the canal.adminUser/canal.adminPasswd (or instance auth) configured on the server.
- Inspect the server log for the underlying authentication error included after the message.
- If using canal admin, confirm the account exists and has permission for the destination.
When it happens
Trigger: Thrown at client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java:193 when the library encounters an invalid state.
Common situations: Authentication error. Never log the password, verify credentials and destination before retry, and limit auth retries to avoid account lockout on the server side.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14).
Data as JSON: /api/errors/71391c7e996108fc.
Report an issue: GitHub.