OCP重启失败报 [ERROR] ocp-server-ce-py_script_start-4.2.1 RuntimeError: (2013, 'Lost connection to MySQL server during query') 错误

【 使用环境 】测试环境
【 OB or 其他组件 】OCP社区版
【 使用版本 】4.2.1
【问题描述】重启OCP报 [ERROR] ocp-server-ce-py_script_start-4.2.1 RuntimeError: (2013, ‘Lost connection to MySQL server during query’) 错误
【复现路径】使用OCP进行数据备份失败。删除失败的备份目录时,提示目录正在被使用无法删除,之后 kill 使用进程。但是刷新OCP页面失败,之后重启OCP报上述错误

【附件及日志】
[2024-05-14 14:23:52.296] [ERROR] ocp-server-ce-py_script_start-4.2.1 RuntimeError: (2013, ‘Lost connection to MySQL server during query’)
[2024-05-14 14:23:52.297] [ERROR] Traceback (most recent call last):
[2024-05-14 14:23:52.297] [ERROR] File “core.py”, line 2058, in start_cluster
[2024-05-14 14:23:52.297] [ERROR] File “core.py”, line 2152, in _start_cluster
[2024-05-14 14:23:52.297] [ERROR] File “core.py”, line 197, in call_plugin
[2024-05-14 14:23:52.297] [ERROR] File “_plugin.py”, line 347, in call
[2024-05-14 14:23:52.297] [ERROR] File “_plugin.py”, line 305, in _new_func
[2024-05-14 14:23:52.297] [ERROR] File “/root/.obd/plugins/ocp-server-ce/4.2.1/start.py”, line 457, in start
[2024-05-14 14:23:52.298] [ERROR] if not start_cluster():
[2024-05-14 14:23:52.298] [ERROR] File “/root/.obd/plugins/ocp-server-ce/4.2.1/start.py”, line 242, in start_cluster
[2024-05-14 14:23:52.298] [ERROR] meta_cursor = Cursor(jdbc_host, jdbc_port, meta_user, meta_tenant, meta_password, stdio)
[2024-05-14 14:23:52.298] [ERROR] File “_stdio.py”, line 908, in wrapper
[2024-05-14 14:23:52.298] [ERROR] File “tool.py”, line 766, in init
[2024-05-14 14:23:52.298] [ERROR] File “tool.py”, line 796, in _connect
[2024-05-14 14:23:52.298] [ERROR] File “pymysql/connections.py”, line 353, in init
[2024-05-14 14:23:52.298] [ERROR] File “pymysql/connections.py”, line 633, in connect
[2024-05-14 14:23:52.298] [ERROR] File “pymysql/connections.py”, line 907, in _request_authentication
[2024-05-14 14:23:52.299] [ERROR] File “pymysql/connections.py”, line 692, in _read_packet
[2024-05-14 14:23:52.299] [ERROR] File “pymysql/connections.py”, line 748, in _read_bytes
[2024-05-14 14:23:52.299] [ERROR] pymysql.err.OperationalError: (2013, ‘Lost connection to MySQL server during query’)
[2024-05-14 14:23:52.299] [ERROR]
[2024-05-14 14:23:52.

1 个赞

ps -ef |grep ob看下

netstat -lnutp |grep 288

1 个赞

进程和监听都正常

1 个赞

重启方式是什么

obd 重启的
obd cluster stop xxx
obd cluster start xxx

kill 掉的是什么进程

提供下ocp-observer日志吧

日志按顺序切分的
xaa.log (9 MB)
xab.log (9 MB)
xac.log (9 MB)
xad.log (9 MB)
xae.log (9 MB)
xaf.log (9 MB)
xag.log (9 MB)
xah.log (2.5 MB)

未kill之前有备份嘛?
major_data_turn_1_retry_0是ob_admin得一个子功能。
dump_backup

是不是把 observer 给 kill 了,这个是 OCP 的 metadb 吗

我这边也是同样的启动的问题,重启三个主机后,ocp就无法启动了,observer和proxy进程监听都在。

kill之前没有备份的

observer没有动

重新启动下ocp,上传下最新日志吧

最新日志提供下呢