-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binlog日志文件过期导致服务启动失败 #37
Comments
数据目录下还有binlog吗,比如/opt/log/polardb/polardb-bin.000001?如果还有的话,请贴一下binlog内容 |
一次完整启动的日志: |
我也遇到了同样问题,一但长时间未启动服务或者服务器出现时间波动,binlog就被自动删除了,导致服务无法启动,急需解决方案 |
1、启用binlog
2、配置日志过期时间为3天:binlog_expire_logs_seconds=259200
3、启动服务,建库建表产生一些日志
4、关闭服务,等日志过期(3天)后重新启动服务
5、服务启动失败:
2024-06-14T17:29:29.562028+08:00 0 [Warning] [MY-000000] [Server] log file /opt/log/polardb/polardb-bin.000001 cannot found last log term index, term is 5.
2024-06-14T17:29:29.562632+08:00 0 [Warning] [MY-000000] [Server] last log term is 5, last log term index is 0.
2024-06-14T17:29:29.563188+08:00 0 [ERROR] [MY-000000] [Server] init_last_index_of_term for recovery failed
2024-06-14T17:29:29.564252+08:00 0 [ERROR] [MY-010119] [Server] Aborting
2024-06-14T17:29:29.577102+08:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'polarx_rpc exit'
2024-06-14T17:29:30.342619+08:00 0 [System] [MY-010910] [Server] /usr/local/polardb/bin/mysqld: Shutdown complete (mysqld 8.0.30) Source distribution.
2024-06-14T17:29:31.309844+08:00 0 [System] [MY-013169] [Server] /usr/local/polardb/bin/mysqld (mysqld 8.0.30) initializing of server in progress as process 7
2024-06-14T17:29:31.312159+08:00 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-06-14T17:29:31.312205+08:00 0 [ERROR] [MY-013236] [Server] The designated data directory /opt/data/polardb/ is unusable. You can remove all files that the server added to it.
2024-06-14T17:29:31.312326+08:00 0 [ERROR] [MY-010119] [Server] Aborting
2024-06-14T17:29:31.317786+08:00 0 [System] [MY-010910] [Server] /usr/local/polardb/bin/mysqld: Shutdown complete (mysqld 8.0.30) Source distribution
请问这个问题如何修复?
The text was updated successfully, but these errors were encountered: