{"record":{"id":"be47517c13bd28c6","repo":"alibaba/canal","slug":"unsupported-version-at-this-client","errorCode":null,"errorMessage":"unsupported version at this client.","messagePattern":"unsupported version at this client\\.","errorType":"exception","errorClass":"CanalClientException","httpStatus":null,"severity":"error","filePath":"admin/admin-web/src/main/java/com/alibaba/otter/canal/admin/connector/SimpleAdminConnector.java","lineNumber":73,"sourceCode":"        this.user = user;\n        this.passwd = passwd;\n    }\n\n    @Override\n    public void connect() throws ServiceException {\n        try {\n            if (connected) {\n                return;\n            }\n\n            channel = SocketChannel.open();\n            channel.socket().setSoTimeout(soTimeout);\n            channel.connect(address);\n            readableChannel = Channels.newChannel(channel.socket().getInputStream());\n            writableChannel = Channels.newChannel(channel.socket().getOutputStream());\n            Packet p = Packet.parseFrom(readNextPacket());\n            if (p.getVersion() != 1) {\n                throw new CanalClientException(\"unsupported version at this client.\");\n            }\n\n            if (p.getType() != PacketType.HANDSHAKE) {\n                throw new CanalClientException(\"expect handshake but found other type.\");\n            }\n\n            Handshake handshake = Handshake.parseFrom(p.getBody());\n            ByteString seed = handshake.getSeeds(); // seed for auth\n            String newPasswd = passwd;\n            if (passwd != null) {\n                // encode passwd\n                newPasswd = SecurityUtil.byte2HexStr(SecurityUtil.scramble411(passwd.getBytes(), seed.toByteArray()));\n            }\n\n            ClientAuth ca = ClientAuth.newBuilder()\n                .setUsername(user != null ? user : \"\")\n                .setPassword(ByteString.copyFromUtf8(newPasswd != null ? newPasswd : \"\"))\n                .setNetReadTimeout(idleTimeout)","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/admin/admin-web/src/main/java/com/alibaba/otter/canal/admin/connector/SimpleAdminConnector.java#L55-L91","documentation":"Thrown by SimpleAdminConnector.doConnect() after reading the first protobuf Packet from the canal-server socket: the packet's version field does not equal 1, so the client and server speak incompatible protocol versions.","triggerScenarios":"Admin connector opens a TCP channel to a canal-server admin port, parses the opening Packet, and finds p.getVersion() != 1. Happens when an older/newer server build talks to an incompatible admin-web build.","commonSituations":"Upgrading canal-admin and canal-server to mismatched versions; pointing the admin connector at a non-canal port (e.g. a ZooKeeper or MySQL port) that returns arbitrary bytes parsed as version != 1; running a fork with a bumped protocol version.","solutions":["Align canal-admin and canal-server to the same release version (check pom.xml / release tags).","Confirm the configured address points to the server's admin port (canal.admin.tcp.port / admin port), not the data port or another service.","If interoperating across versions, downgrade/upgrade one side so both use protocol version 1.","Inspect the raw handshake bytes to rule out a port misconfiguration returning non-canal data."],"exampleFix":"// before: admin connector pointed at wrong/old server\nadminConnector.connect(new InetSocketAddress(serverIp, 11111)); // data port\n\n// after: use the admin port and matching version\nadminConnector.connect(new InetSocketAddress(serverIp, 11110)); // admin port","handlingStrategy":"validation","validationCode":"// Validate target before connecting\nif (serverVersionKnownIncompatible(adminBuildVersion, serverBuildVersion)) {\n    throw new IllegalStateException(\"Align canal-admin and canal-server versions before connecting\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    connector.connect();\n} catch (CanalClientException e) {\n    if (e.getMessage().contains(\"unsupported version\")) {\n        // surface version-mismatch guidance to operator\n    }\n    throw e;\n}","preventionTips":["Pin canal-admin and canal-server to the same release in your deployment manifest.","Add a version-compat smoke test in CI that performs a handshake.","Sanity-check the admin port with a raw socket before pointing the connector."],"tags":["network","protocol","version-mismatch","canal-admin","protobuf"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}