【报错详情】
Caused by: com.github.shyiko.mysql.binlog.network.ServerException: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event '' at 4, the last event read from '/home/mysql/dataxxx/mysql/mysql-bin.xxx' at xxx, the last byte read from '/home/mysql/dataxxx/mysql/mysql-bin.xxx' at xxx.
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:937) ~[?:?]
【报错原因】
出现这种错误是,作业里使用的server id和其他作业或其他同步工具使用的server id冲突了,server id需要全局唯一。
【解决方案】
出现这种错误是,作业里使用的server id和其他作业或其他同步工具使用的server id冲突了,server id需要全局唯一,server id是一个int类型整数。
在CDC 2.x版本中,source的每个并发都需要一个server id,建议合理规划好server id,比如作业的source设置成了四个并发,可以配置'server-id' = '5001-5004', 这样每个source task就不会冲突了。