之前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
errno = 1236, sqlstate = HY000 errmsg = Misconfigured master - server_id was not set
原回答者GitHub用户agapple
根据您提供的错误信息,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版本等,以便我们更好地帮助您解决问题。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。