开发者社区> 问答> 正文

求助: canal新增的destinations 启动时报错 server_id was not s

之前canal一直正常使用。为了联调新搭了一套环境,在之前的canal中增加了一个destination,zookeeper没有变动。启动时报错。

注:之前的destination仍然正常。

以下是错误信息,麻烦大神帮忙看看什么原因,非常感谢!

2019-03-01 15:08:39.965 [destination = audit_fql , address = /10.1.49.87:58195 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status 2019-03-01 15:08:40.846 [destination = audit_fql , address = /10.1.49.87:58195 , EventParser] ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading from client socket java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Misconfigured master - server_id was not set at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:131) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:731) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:386) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:441) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:360) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:184) [canal.parse-1.1.1.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144] 2019-03-01 15:08:40.846 [destination = audit_fql , address = /10.1.49.87:58195 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ERROR ## findAsPerTimestampInSpecificLogFile has an error java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Misconfigured master - server_id was not set at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:131) ~[canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:731) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:386) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:441) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:360) [canal.parse-1.1.1.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:184) [canal.parse-1.1.1.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144] 2019-03-01 15:08:40.847 [destination = audit_fql , address = /10.1.49.87:58195 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /10.1.49.87:58195 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.PositionNotFoundException: can't find start position for audit_fql 2019-03-01 15:08:40.847 [destination = audit_fql , address = /10.1.49.87:58195 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:audit_fql[com.alibaba.otter.canal.parse.exception.PositionNotFoundException: can't find start position for audit_fql

原提问者GitHub用户baibingzhi

展开
收起
古拉古拉 2023-05-08 13:58:01 239 0
2 条回答
写回答
取消 提交回答
  • errno = 1236, sqlstate = HY000 errmsg = Misconfigured master - server_id was not set

    原回答者GitHub用户agapple

    2023-05-09 17:55:29
    赞同 展开评论 打赏
  • 随心分享,欢迎友善交流讨论:)

    根据您提供的错误信息,Canal在启动时出现了“Misconfigured master - server_id was not set”错误。这个错误通常是由于Canal无法找到指定destination的启动位置信息。

    要解决这个问题,您可以尝试执行以下步骤:

    检查Canal Server的配置文件。您需要检查Canal Server的配置文件,确保您已经正确地配置了新的destination。您需要检查以下参数是否正确设置: canal.destinations = audit_fql canal.destination.audit_fql.zookeeper.address = 127.0.0.1:2181 canal.destination.audit_fql.zookeeper.session.timeout = 6000 canal.destination.audit_fql.zookeeper.connect.timeout = 6000 canal.destination.audit_fql.username = canal canal.destination.audit_fql.password = canal 其中,canal.destinations指定了所有的destination名称,canal.destination.<destination_name>.zookeeper.address指定了每个destination对应的Zookeeper地址。

    检查Zookeeper配置。请确保您的Zookeeper的配置文件正确配置,并且可以正常运行。您可以使用zkCli.sh或其他Zookeeper客户端工具来检查Zookeeper的状态和节点信息。

    检查MySQL配置。请确保您的MySQL数据库已经正确配置,并且Canal可以访问您的MySQL实例。您可以使用MySQL客户端工具来连接MySQL并检查数据库状态和表结构。

    尝试重启Canal Server。如果以上步骤都没有解决问题,您可以尝试重新启动Canal Server,并检查错误日志以查看是否有其他问题。

    如果您仍然无法解决问题,您可以提供更多信息,例如Canal版本、操作系统版本、Zookeeper版本和MySQL版本等,以便我们更好地帮助您解决问题。

    2023-05-08 13:58:56
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载