是否可以在备租户上创建 Binlog Service 任务

【 使用环境 】生产环境
【 OB or 其他组件 】obbinlog
【 使用版本 】obbinlog-ce-4.2.3-200000012025021315.el7
【问题描述】在备租户上创建了Binlog Service 任务,但一直没有产生 binlog;
【复现路径】问题出现前后相关操作
通过ODP 连接备租户,执行 SHOW MASTER STATUS 可以看到 Position 一直为0


通过Flink CDC 连接ODP 获取binlog,则提示 position > file size 错误
解决部分日志如下:

09:29:53 ERROR mysql.MySqlStreamingChangeEventSource: Error during binlog processing. Last offset stored = null, binlog reader near position = mysql-bin.000001/4
09:29:53 ERROR pipeline.ErrorHandler: Producer failure
io.debezium.DebeziumException: Client requested master to start replication from position > file size Error code: 1236; SQLSTATE: HY000.
	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1146)
	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1185)
	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:973)
	at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:606)
	at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:850)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Client requested master to start replication from position > file size
	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:937)
	... 3 more

在 Binlog 服务部署前提条件中,并未提及是否可以在备租户上创建 Binlog Service 任务

filesize出问题了?

我理解, 为租户创建binlog服务时,要求租户的 switchover_status为 normal。备租户理论上是日志同步状态,不符合创建要求。且备租户和binlog的核心功能也是冲突的,所以binlog不支持创建在备租户上。

1 个赞

不清楚是哪个环节出的问题

有可能是像你说的这样;
我们在备租户上创建 binlog service 时挺顺利,没有出现什么问题,就是想确认以下是否可以在备租户上创建 Binlog 任务,如果确实是不可以,我们再在主租户上创建 binlog

是的,备租户从原理上是不支持的。用主租户创建

好的,感谢老师解答

1 个赞