OceanBase_CE 4.2.0.0 升级至4.2.5.0最后一刻报错。[已解决]

问题已解决,以下仅为记录。

【 使用环境 】测试环境
【 OB or 其他组件 】OceanBase_CE
【 使用版本 】4.2.0.0
【问题描述】

由4.2.0.0升级至4.2.5.0时曾出现
[1 tenant is merging, please check] 错误,依据问答后已解决,重新升级后,到最后步骤出现以下错误:
感觉是重新start时,脚本只通过判断pid,通过几分钟的重试连接,但此数据库还没完全起来连不上而导致的报错。

obd cluster upgrade xxxx -c oceanbase-ce -V 4.2.5.0 --usable=8889550d749ab7df7fa756839eb3ad2485e6e7c1e1e17248cc7fae03f0fa170b
Get local repositories and plugins ok
Open ssh connection ok
Get deployment connections ok
Get standbys info ok
Start observer ok
observer program health check ok
Connect to observer 172.16.0.58:2881 ok
Exec upgrade_checker.py ok
Exec upgrade_pre.py ok
Exec upgrade_health_checker.py ok
Upgrade ok
Exec upgrade_post.py ok
Start observer ok
observer program health check ok
Connect to observer 172.16.0.58:2881 ok
Exec upgrade_checker.py ok
Exec upgrade_pre.py ok
Exec upgrade_health_checker.py ok
Upgrade ok
[ERROR] OBD-1006: Failed to connect to oceanbase-ce

Exec upgrade_post.py x
[ERROR] 'NoneType' object has no attribute 'exec_script'

See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 0b83275e-ab90-11ef-85c6-b499bab66c38
If you want to view detailed obd logs, please run: obd display-trace 0b83275e-ab90-11ef-85c6-b499bab66c38

TRACE日志如下
trace_upgrade_error.txt (238.3 KB)

此时查询状态是upgrading

[root@node58 ~]# obd cluster list
+--------------------------------------------------------------+
|                         Cluster List                         |
+------------+-------------------------------+-----------------+
| Name       | Configuration Path            | Status (Cached) |
+------------+-------------------------------+-----------------+
| xxxx| /root/.obd/cluster/wisdombase | upgrading       |
+------------+-------------------------------+-----------------+
Trace ID: 7cc490d0-ab93-11ef-9f9b-b499bab66c38
If you want to view detailed obd logs, please run: obd display-trace 7cc490d0-ab93-11ef-9f9b-b499bab66c38

此时用obclient能连接上去,版本也已变化,用第三方工具navicat也能正常(就是查询时稍慢)?那究竟升级正常否?还需要执行哪些步骤。


[root@node58 ~]# obclient -h172.16.0.58 -P2881 -uroot@sys -p'xxxx' -Doceanbase -A
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221508710
Server version: OceanBase_CE 4.2.5.0 (r100000052024102022-e7c676806fda04726bbbcdfbf1758057bb465b59) (Built Oct 20 2024 23:06:30)

obclient [oceanbase]> select version();
+------------------------------+
| version()                    |
+------------------------------+
| 5.7.25-OceanBase_CE-v4.2.5.0 |
+------------------------------+
1 row in set (0.002 sec)

问题已解决,经过一段时间后,数据库的状态已自己变回了running
[root@node58 xxx]# obd cluster list
±-------------------------------------------------------------+
| Cluster List |
±-----------±------------------------------±----------------+
| Name | Configuration Path | Status (Cached) |
±-----------±------------------------------±----------------+
| xxx| /root/.obd/cluster/wisdombase | running |
±-----------±------------------------------±----------------+
Trace ID: 7b20df30-ab99-11ef-b472-b499bab66c38
If you want to view detailed obd logs, please run: obd display-trace 7b20df30-ab99-11ef-b472-b499bab66c38