报错:A slave with the same server_uuid/server_id as this slave has connected to the master
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
【报错详情】
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就不会冲突了。