adapter.log 报错信息如下
2023-02-23 21:59:13.192 [Thread-3] INFO c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - =============> Start to connect destination: example <============= 2023-02-23 21:59:13.192 [Thread-3] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - process error! com.alibaba.otter.canal.protocol.exception.CanalClientException: failed to subscribe with reason: something goes wrong with channel:[id: 0x15275b3b, /127.0.0.1:33126 => /127.0.0.1:11111], exception=com.alibab a.otter.canal.server.exception.CanalServerException: destination:example should start first
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.subscribe(SimpleCanalConnector.java:253) ~[na:na]
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.subscribe(SimpleCanalConnector.java:229) ~[na:na]
at com.alibaba.otter.canal.connector.tcp.consumer.CanalTCPConsumer.connect(CanalTCPConsumer.java:64) ~[na:na]
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.process(AdapterProcessor.java:185) ~[client-adapter.launcher-1.1.6.jar:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
canal-server 端口正常
ss -lnp | grep 1111 tcp LISTEN 0 50 *:11110 : users:(("java",pid=2332024,fd=85)) tcp LISTEN 0 50 *:11111 : users:(("java",pid=2332024,fd=94)) tcp LISTEN 0 3 *:11112 : users:(("java",pid=2332024,fd=89))
canal-server 日志如下
2023-02-23 22:05:42.127 [New I/O server worker #5-1] ERROR c.a.o.c.common.zookeeper.running.ServerRunningMonitor - start failed com.google.common.util.concurrent.UncheckedExecutionException: com.alibaba.otter.canal.server.exception.CanalServerException: can't find destination:example at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.get(LocalCache.java:4147) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140) ~[guava-22.0.jar:na] at com.google.common.collect.MigrateMap$MigrateConcurrentMap.get(MigrateMap.java:68) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded.start(CanalServerWithEmbedded.java:129) ~[canal.server-1.1.6.jar:na] at com.alibaba.otter.canal.deployer.CanalController$1.processActiveEnter(CanalController.java:152) ~[canal.deployer-1.1.6.jar:na] at com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.processActiveEnter(ServerRunningMonitor.java:242) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.start(ServerRunningMonitor.java:99) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.server.netty.handler.SessionHandler.messageReceived(SessionHandler.java:74) ~[canal.server-1.1.6.jar:na] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.SimpleChannelHandler.messageReceived(SimpleChannelHandler.java:154) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler.handleUpstream(IdleStateAwareChannelHandler.java:48) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.handler.timeout.IdleStateHandler.messageReceived(IdleStateHandler.java:276) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndfireMessageReceived(ReplayingDecoder.java:526) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:507) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:444) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:350) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.2.2.Final.jar:na] at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) ~[netty-3.2.2.Final.jar:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] Caused by: com.alibaba.otter.canal.server.exception.CanalServerException: can't find destination:example 2023-02-23 22:05:42.451 [New I/O server boss #2 ([id: 0x00e6516e, /0.0.0.0:11110])] INFO c.a.o.canal.admin.handler.HandshakeInitializationHandler - send handshake initialization packet to : [id: 0x388309c2, /192.168.23.250:62556 => /192.168.23.250:11110] 2023-02-23 22:05:42.452 [New I/O server worker #2-2] INFO c.a.o.canal.admin.handler.HandshakeInitializationHandler - remove unused channel handlers after authentication is done successfully. 2023-02-23 22:05:42.452 [New I/O server worker #2-2] INFO c.a.o.canal.admin.handler.ClientAuthenticationHandler - remove unused channel handlers after authentication is done successfully. 2023-02-23 22:05:42.492 [New I/O server worker #2-2] INFO com.alibaba.otter.canal.admin.handler.SessionHandler - message receives in session handler... 2023-02-23 22:05:42.735 [New I/O server boss #2 ([id: 0x00e6516e, /0.0.0.0:11110])] INFO c.a.o.canal.admin.handler.HandshakeInitializationHandler - send handshake initialization packet to : [id: 0x219d3e7e, /192.168.23.250:62558 => /192.168.23.250:11110] 2023-02-23 22:05:42.735 [New I/O server worker #2-3] INFO c.a.o.canal.admin.handler.HandshakeInitializationHandler - remove unused channel handlers after authentication is done successfully. 2023-02-23 22:05:42.735 [New I/O server worker #2-3] INFO c.a.o.canal.admin.handler.ClientAuthenticationHandler - remove unused channel handlers after authentication is done successfully. 2023-02-23 22:05:42.776 [New I/O server worker #2-3] INFO com.alibaba.otter.canal.admin.handler.SessionHandler - message receives in session handler...
原提问者GitHub用户mortalxu
adapter中的 Instance 需要跟 server中的instance名称一样
原回答者GitHub用户mortalxu
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。