Canal.adapter报错
报错如下:
2021-09-09 15:56:33.669 [Thread-12] 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:648)
at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:150)
... 3 common frames omitted
此问题需修改canal.adapter
的application.yml
配置,将里面的canalServerHost:
地址修改为实际地址,刚开始我写的就是127.0.0.1地址,然后就一直访问被拒绝,改为真是IP后就正常不报错了。