开发者社区> 问答> 正文

canal-adapter 运行过程中一直报错无法连接server端

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

展开
收起
白夜行fighting 2023-04-25 19:55:18 276 0
1 条回答
写回答
取消 提交回答
  • adapter中的 Instance 需要跟 server中的instance名称一样

    原回答者GitHub用户mortalxu

    2023-04-26 17:04:29
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载