PolarDB-X 上启动报错什么问题?

PolarDB-X 上启动报错什么问题?2024-01-09 10:15:13.253 [main] INFO o.f.c.i.database.base.DatabaseType - Database: jdbc:mysql://127.0.0.1:4886/polardbx_meta_db_polardbx (MySQL 8.0)
2024-01-09 10:15:13.315 [main] INFO o.f.core.internal.command.DbBaseline - Schema history table polardbx_meta_db_polardbx.binlog_schema_history already initialized with (1,<< Flyway Baseline >>). Skipping.
2024-01-09 10:15:13.323 [main] INFO o.f.c.i.license.VersionPrinter - Flyway Community Edition 7.3.0 by Redgate
2024-01-09 10:15:13.353 [main] INFO o.f.c.i.s.JdbcTableSchemaHistory - Repair of failed migration in Schema History table polardbx_meta_db_polardbx.binlog_schema_history not necessary. No failed migration detected.
2024-01-09 10:15:13.378 [main] INFO o.f.core.internal.command.DbRepair - Successfully repaired schema history table polardbx_meta_db_polardbx.binlog_schema_history (execution time 00:00.038s).
2024-01-09 10:15:13.381 [main] INFO o.f.c.i.license.VersionPrinter - Flyway Community Edition 7.3.0 by Redgate
2024-01-09 10:15:13.407 [main] INFO o.f.core.internal.command.DbValidate - Successfully validated 26 migrations (execution time 00:00.014s)
2024-01-09 10:15:13.416 [main] INFO o.f.core.internal.command.DbMigrate - Current version of schema polardbx_meta_db_polardbx: 26
2024-01-09 10:15:13.417 [main] INFO o.f.core.internal.command.DbMigrate - Schema polardbx_meta_db_polardbx is up to date. No migration necessary.
2024-01-09 10:15:13.524 [main] ERROR c.a.p.binlog.daemon.DaemonBootStrap - ## Something goes wrong when starting up the daemon process:
org.apache.ibatis.exceptions.PersistenceException:

Error updating database. Cause: java.sql.SQLException: The consensus leader is not allowed to do current operation.

The error may exist in com/aliyun/polardbx/binlog/dao/BinlogPhyDdlHistoryMapper.java (best guess)

The error may involve com.aliyun.polardbx.binlog.dao.BinlogPhyDdlHistoryMapper.update-Inline

The error occurred while setting parameters

SQL: update binlog_phy_ddl_history set cluster_id = ? where cluster_id = ?

Cause: java.sql.SQLException: The consensus leader is not allowed to do current operation.

    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
    at com.sun.proxy.$Proxy22.update(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:67)
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)
    at com.sun.proxy.$Proxy38.update(Unknown Source)
    at org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils.update(MyBatis3Utils.java:158)
    at com.aliyun.polardbx.binlog.dao.BinlogPhyDdlHistoryMapper.update(BinlogPhyDdlHistoryMapper.java:200)
    at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
    at org.apache.ibatis.binding.MapperProxy$DefaultMethodInvoker.invoke(MapperProxy.java:166)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)
    at com.sun.proxy.$Proxy38.update(Unknown Source)

展开
收起
小小鹿鹿鹿 2024-01-17 22:44:48 128 分享 版权
1 条回答
写回答
取消 提交回答
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    从日志中可以看出,启动PolarDB-X时出现了错误。具体的错误信息是:

    org.apache.ibatis.exceptions.PersistenceException:
    
    Error updating database. Cause: java.sql.SQLEx
    

    这个错误是由于在更新数据库时发生了异常。可能的原因有很多,例如数据库连接问题、表结构问题等。为了解决这个问题,你可以尝试以下方法:

    1. 检查数据库连接配置是否正确,确保PolarDB-X实例可以正常连接到数据库。
    2. 检查数据库表结构是否正确,确保与PolarDB-X的配置文件相匹配。
    3. 查看PolarDB-X的日志文件,以获取更详细的错误信息。日志文件通常位于/var/log/polardbx目录下。
    4. 如果问题仍然存在,可以考虑联系PolarDB-X的技术支持寻求帮助。
    2024-01-18 12:56:20
    赞同 展开评论

PolarDB 分布式版 (PolarDB for Xscale,简称“PolarDB-X”) 采用 Shared-nothing 与存储计算分离架构,支持水平扩展、分布式事务、混合负载等能力,100%兼容MySQL。 2021年开源,开源历程及更多信息访问:OpenPolarDB.com/about

还有其他疑问?
咨询AI助理