开发者社区> 问答> 正文

mysql到hbase 同步数据,提示java.net.ConnectException: Conn

adapter 提示加载成功,随后提示Start to connect destination: 访问拒绝,

请问是什么原因呢?hbase 跟canal都部署在相同虚拟机上,adapter 版本1.1.4,

t-adapter.common-1.1.4.jar:/usr/local/canaladapter/bin/../lib/classmate-1.3.4.jar:/usr/local/canaladapter/bin/../lib/canal.protocol-1.1.4.jar:/usr/local/canaladapter/bin/../lib/canal.common-1.1.4.jar:/usr/local/canaladapter/bin/../lib/canal.client-1.1.4.jar: 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.io.tmpdir=/tmp 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.compiler= 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.name=Linux 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.arch=amd64 2020-04-24 13:47:26.443 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.version=2.6.32-754.el6.x86_64 2020-04-24 13:47:26.444 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.name=root 2020-04-24 13:47:26.444 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.home=/root 2020-04-24 13:47:26.444 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.dir=/usr/local/canaladapter/bin 2020-04-24 13:47:26.444 [main] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=hconnection-0x468dda3e0x0, quorum=localhost:2181, baseZNode=/hbase 2020-04-24 13:47:26.494 [main-SendThread(localhost:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-04-24 13:47:26.516 [main-SendThread(localhost:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to localhost/127.0.0.1:2181, initiating session 2020-04-24 13:47:26.527 [main-SendThread(localhost:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x171aa1bf1c80010, negotiated timeout = 90000 2020-04-24 13:47:26.750 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Load canal adapter: hbase succeed 2020-04-24 13:47:26.776 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterLoader - Start adapter for canal instance: example succeed 2020-04-24 13:47:26.776 [main] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterService - ## the canal client adapters are running now ...... 2020-04-24 13:47:26.784 [Thread-6] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Start to connect destination: example <============= 2020-04-24 13:47:26.787 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8081"] 2020-04-24 13:47:26.793 [main] INFO org.apache.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read 2020-04-24 13:47:26.797 [Thread-6] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - process error! com.alibaba.otter.canal.protocol.exception.CanalClientException: java.net.ConnectException: Connection refused at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:198) at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.connect(SimpleCanalConnector.java:115) at com.alibaba.otter.canal.adapter.launcher.loader.CanalAdapterWorker.process(CanalAdapterWorker.java:88) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) at sun.nio.ch.Net.connect(Net.java:454) at sun.nio.ch.Net.connect(Net.java:446) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:645) at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:150) ... 3 common frames omitted 2020-04-24 13:47:26.798 [Thread-6] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Disconnect destination: example <============= 2020-04-24 13:47:26.898 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8081 (http) with context path '' 2020-04-24 13:47:26.910 [main] INFO c.a.otter.canal.adapter.launcher.CanalAdapterApplication - Started CanalAdapterApplication in 12.243 seconds (JVM running for 15.609) 2020-04-24 13:47:27.799 [Thread-6] INFO c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Start to connect destination: example <============= 2020-04-24 13:47:27.801 [Thread-6] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - process error! com.alibaba.otter.canal.protocol.exception.CanalClientException: java.net.ConnectException: Connection refused

配置文件,hbase 版本1.3.6

原提问者GitHub用户jrzx-gaoyang

展开
收起
Java工程师 2023-05-03 10:33:48 169 0
1 条回答
写回答
取消 提交回答
  • 应该是 canal server异常导致的。

    原回答者GitHub用户jrzx-gaoyang

    2023-05-04 14:38:55
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载

相关镜像