暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

Canal+Kafka+ClientAdapter+Greenplum 报错:Outer adapter sync failed! Error sync but ACK!

原创 布衣 2022-11-02
2111

背景

  在搭建Mysql+Canal+Kafka+ClientAdapter+Greenplum架构时遇到Outer adapter sync failed! Error sync but ACK!不能同步。

报错

  数据消息能传到adapter,但是同步不到Greenplum。报错:Outer adapter sync failed! Error sync but ACK!
image.png

解决

  • 在adapter 日志发现:
    [root@CanalKafka adapter]# tail -f adapter.log
    image.png
  • 查看yml配置文件:
    [root@CanalKafka conf]# vim application.yml
    image.png
    发现Key:Greeenplum 多了一个“e”,细节决定坑有多少啊!!!!
  • 修改正确:Greenplum
vim application.yml 
      - name: rdb
        key: Greenplum
        properties:
          jdbc.driverClassName: org.postgresql.Driver
          jdbc.url: jdbc:postgresql://10.10.5.74:5432/two_dw
          jdbc.username: two
          jdbc.password: two
          threads: 10
          commitSize: 3000
  • 重启Canal Adapter
[root@CanalKafka bin]# pwd
/usr/local/canal-1.1.3/adapter/bin
[root@CanalKafka bin]# sh startup.sh 
  • 查看Canal adapter 日志正常:
[root@CanalKafka adapter]# tail -f adapter.log 
2022-10-29 16:11:37.327 [pool-22-thread-1] INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"name":"b","id":2}],"database":"pydb","destination":"example","es":1667031113000,"groupId":"g1","isDdl":false,"old":null,"pkNames":["id"],"sql":"","table":"t1","ts":1667031097215,"type":"INSERT"}
  • Mysql插入一条数据
mysql> use pydb
mysql> insert into t1 values(3,'ee'); 
Query OK, 1 row affected (0.00 sec)
  • 查看Greenplum :实现同步
two_dw=> select * from t1;
 id | name 
----+------
  3 | ee
(1 rows)

总结:

  Outer adapter sync failed! Error sync but ACK!这个报错让我明白了:认真程度决定了坑的多少!!
1、yml格式问题,此次过程因为ctrl+c => ctrl+v的原因,导致rdb目录下的t1.yml格式缩进多空格,
2、此报错80%左右为yml配置的问题,认真检查就完了。

最后修改时间:2022-11-02 08:49:12
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论