PolarDB为什么突然不能读取到binlog了?[16:47:25.080] ERROR 8210 - io.debezium.connector.mysql.MySqlStreamingChangeEventSource.logStreamingSourceState: Error during binlog processing. Last offset stored = null, binlog reader near position = /4
[16:47:25.080] ERROR 8210 - io.debezium.connector.mysql.MySqlStreamingChangeEventSource.logStreamingSourceState: Error during binlog processing. Last offset stored = null, binlog reader near position = /4
[16:47:25.084] ERROR 8210 - io.debezium.pipeline.ErrorHandler.setProducerThrowable: Producer failure
io.debezium.DebeziumException: Cannot replicate because the master purged required binary logs. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. To find the missing transactions, see the master's error log or the manual for GTID_SUBTRACT. Error code: 1236; SQLSTATE: HY000.
at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1194) ~[debezium-connector-mysql-1.9.7.Final.jar!/:1.9.7.Final]
at io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1239) [debezium-connector-mysql-1.9.7.Final.jar!/:1.9.7.Final]
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1079) [mysql-binlog-connector-java-0.27.2.jar!/:0.27.2]
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:631) [mysql-binlog-connector-java-0.27.2.jar!/:0.27.2]
at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:932) [mysql-binlog-connector-java-0.27.2.jar!/:0.27.2]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot replicate because the master purged required binary logs. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. To find the missing transactions, see the master's error log or the manual for GTID_SUBTRACT.
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1043) ~[mysql-binlog-connector-java-0.27.2.jar!/:0.27.2]
... 3 more
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
PolarDB突然不能读取到Binlog可能有多种原因,以下是一些常见的因素及相应解决方法:
权限问题
原因:数据库用户权限不足,可能导致无法读取Binlog。
解决方法:使用具有足够权限的管理员账号登录,检查并确保相关用户拥有读取Binlog的权限,必要时重新授权。
配置问题
原因:Binlog相关配置参数可能被修改,如 log_bin 参数被设置为禁用状态,或者 binlog_format 设置不正确。
解决方法:检查数据库配置文件,确保 log_bin 参数处于启用状态,并根据实际需求合理设置 binlog_format ,修改配置后需重启数据库使设置生效。
存储空间问题
原因:磁盘空间已满,导致Binlog无法正常写入和读取。
解决方法:检查磁盘空间使用情况,清理不必要的文件或扩展磁盘空间,以确保有足够的空间供Binlog使用。
数据库故障
原因:数据库发生故障,如节点崩溃、数据文件损坏等,可能影响Binlog的读取。
解决方法:查看数据库的错误日志,确定故障原因并进行修复。如果是节点崩溃,可能需要进行节点恢复操作;如果是数据文件损坏,可能需要使用备份进行恢复。
网络问题
原因:如果是分布式架构,网络连接中断或不稳定可能导致无法读取Binlog。
解决方法:检查网络连接情况,确保各个节点之间网络畅通,排查网络设备故障或网络配置错误。
如果以上方法都无法解决问题,建议联系PolarDB的官方技术支持,以便深入排查和解决故障。
阿里云关系型数据库主要有以下几种:RDS MySQL版、RDS PostgreSQL 版、RDS SQL Server 版、PolarDB MySQL版、PolarDB PostgreSQL 版、PolarDB分布式版 。