OCP创建备租户报错OBE10002

【 使用环境 】生产环境
【 OB or 其他组件 】ocp
【 使用版本 】OCP版本号: 4.3.4-20250114101305,OB版本4.2.2
【问题描述】创建备租户任务报错
【复现路径】创建备租户
【附件及日志】
subtask_11029141.log (26.3 KB)

错误码
OBE10002
错误信息
操作OceanBase失败,错误信息: (conn=3221818514) Unknown column ‘recover_scn_display’ in ‘field list’ If column exists but type cannot be identified (example ‘select ? field1 from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1 from dual’)
错误原因
连接 sys 执行 select * from (SELECT job_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display AS restore_finish_timestamp, IF(recover_scn_display != ‘’, recover_scn_display, NULL) AS restore_current_timestamp, start_timestamp AS start_time, finish_timestamp AS completion_time, restore_progress AS data_restore_progress, recover_progress AS log_restore_progress, status, comment AS error_msg, description FROM ( SELECT job_id, tenant_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display, recover_scn_display, start_timestamp, NULL AS finish_timestamp, status, restore_progress, recover_progress, NULL AS comment, description FROM CDB_OB_RESTORE_PROGRESS UNION SELECT job_id, tenant_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display, NULL as recover_scn_display, start_timestamp, finish_timestamp, status, NULL AS restore_progress, NULL AS recover_progress, comment, description FROM CDB_OB_RESTORE_HISTORY ) RIGHT JOIN (SELECT job_id AS _job_id, max(tenant_id) as _tenant_id FROM ( SELECT job_id, tenant_id FROM CDB_OB_RESTORE_PROGRESS UNION SELECT job_id, tenant_id FROM CDB_OB_RESTORE_HISTORY ) GROUP BY _job_id ) AS t ON job_id = t._job_id AND tenant_id = t._tenant_id WHERE description = ? ORDER BY start_time DESC) where restore_tenant_name = ‘mytenant’ 失败,错误信息: (conn=3221818514) Unknown column ‘recover_scn_display’ in ‘field list’ If column exists but type cannot be identified (example ‘select ? field1 from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1 from dual’)


2025-01-16 10:17:18.456 ERROR 1432603 — [manual-subtask-executor13,370c0d6e3f0229b8,746af3a226d1fdca] c.o.o.c.t.e.c.w.subtask.SubtaskExecutor : Unknown column ‘recover_scn_display’ in ‘field list’
If column exists but type cannot be identified (example ‘select ? field1 from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1 from dual’)

java.sql.SQLException: Unknown column ‘recover_scn_display’ in ‘field list’
If column exists but type cannot be identified (example ‘select ? field1 from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1 from dual’)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:2364)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:2229)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:2117)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:399)
at com.oceanbase.jdbc.JDBC4PreparedStatement.executeInternal(JDBC4PreparedStatement.java:248)
at com.oceanbase.jdbc.JDBC4PreparedStatement.execute(JDBC4PreparedStatement.java:171)
at com.oceanbase.jdbc.JDBC4PreparedStatement.executeQuery(JDBC4PreparedStatement.java:185)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:724)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:650)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:715)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:746)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:759)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:812)
at com.oceanbase.ocp.obsdk.connector.ConnectTemplate.query(ConnectTemplate.java:91)
at com.oceanbase.ocp.bac
kup.internal.obsdk.ObBackupConnectTemplate.query(ObBackupConnectTemplate.java:50)
at com.oceanbase.backup.core.obsdk.operator.MysqlPhysicalAdvancedBackupOperator.listRestoreTasks(MysqlPhysicalAdvancedBackupOperator.java:693)
at com.oceanbase.ocp.service.task.business.tenant.WaitRestoreStandbyTenantSuccessTask.lambda$run$0(WaitRestoreStandbyTenantSuccessTask.java:67)
at com.oceanbase.ocp.common.lang.pattern.Retry.executeUntilWithLimit(Retry.java:82)
at com.oceanbase.ocp.common.lang.pattern.Retry.executeUntilWithLimit(Retry.java:61)
at com.oceanbase.ocp.service.task.business.tenant.WaitRestoreStandbyTenantSuccessTask.run(WaitRestoreStandbyTenantSuccessTask.java:63)
at com.oceanbase.ocp.core.task.runtime.Subtask.retry(Subtask.java:49)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.retry(JavaSubtaskRunner.java:76)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.doRun(JavaSubtaskRunner.java:35)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.run(JavaSubtaskRunner.java:26)
at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.doRun(RunnerFactory.java:76)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.doRun(SubtaskExecutor.java:206)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.redirectConsoleOutput(SubtaskExecutor.java:200)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.lambda$submit$2(SubtaskExecutor.java:137)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

Set state for subtask: 11029141, operation:RETRY, state: FAILED
image

1 个赞

1、在备租户所在的ob集群上确认一下
show variables like ‘version_comment’;

2、当前ocp的任务完整截图和对应的任务日志附件。

3、基于网络的物理备库还是基于日志归档的物理备库,如果是日志归档物理备库,备份的源端ob版本也使用第一条show命令确认一下。

备租户
obclient(root@sys)[oceanbase]> show variables like ‘version_comment’;
±----------------±-----------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
±----------------±-----------------------------------------------------------------------------------------------------------------+
| version_comment | OceanBase_CE 4.2.2.0 (r100010012024022719-c984fe7cb7a4cef85a40323a0d073f0c9b7b8235) (Built Feb 27 2024 19:20:54) |
±----------------±-----------------------------------------------------------------------------------------------------------------+
1 row in set (0.008 sec)

源租户
obclient(root@(none))[oceanbase]> show variables like ‘version_comment’;
±----------------±-----------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
±----------------±-----------------------------------------------------------------------------------------------------------------+
| version_comment | OceanBase_CE 4.2.2.0 (r100010012024022719-c984fe7cb7a4cef85a40323a0d073f0c9b7b8235) (Built Feb 27 2024 19:20:54) |
±----------------±-----------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

麻烦确认下在OCP创建的是 基于网络的物理备库还是基于日志归档的物理备库呢?

基于网络的物理备库吧

好的,我们尝试复现下这个问题,有进展会尽快回复您

您好,经确认,OCP是不支持这个OB版本 4.2.2.0 的主备配置的,
OceanBase_CE 4.2.2.0 版本是下掉的版本,不建议使用,建议使用最新的LTS版本 4.2.5.1

文档这里描述不准确,后面我们更正下
https://www.oceanbase.com/docs/common-ocp-1000000002078094

1、在备租户所在的ob集群上确认一下
show variables like ‘version_comment’;

2、当前ocp的任务完整截图和对应的任务日志附件。

3、基于网络的物理备库还是基于日志归档的物理备库,如果是日志归档物理备库,备份的源端ob版本也使用第一条show命令确认一下。

请教,如果我们升级OB版本到4.2.5.1,比如主集群先升级,这时候主备版本不一致,对已经建立的备集群有影响吗?

有影响,
4.x为了避免集群中主租户升级导致低版本集群备租户回放到不认识的clog,备租户会识别升级过程中的特殊日志停止日志同步。这导致的问题是,集群升级主租户有版本变化而备租户所在集群binary版本落后时,备租户会停止同步日志。

若集群中用户租户(不含sys、meta租户)皆为主租户,我们称该集群为纯主库;若集群中用户租户皆为备租户,我们称该集群为纯备库。通过保证纯备库先于纯主库升级,可以规避主租户升级对备租户的影响。对于集群间租户互为主备的情况,调整集群间的升级顺序无意义。

那也就是备库版本可以高?在建立主备关系之前,备库是高版本也可以?