开发者社区 问答 正文

报错:A slave with the same server_uuid/server_id as

已解决

报错:A slave with the same server_uuid/server_id as this slave has connected to the master

展开
收起
阿里云服务支持 2022-12-20 14:33:09 1091 分享 版权
1 条回答
写回答
取消 提交回答
  • 官方回答

    【报错详情】

    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就不会冲突了。

    2022-12-20 14:36:57
    赞同 展开评论