oceanbase / obdeploy

A deployer and package manager for OceanBase open-source software.
https://open.oceanbase.com
GNU General Public License v3.0
87 stars 132 forks source link

[Bug]: 使用 OBD 白屏部署时,预检查时卡住,无失败项,错误提示 'int' object is not subscriptable #195

Closed CodePlayer closed 2 months ago

CodePlayer commented 4 months ago

Describe the bug 官方下载 OceanBase,使用 obd web 白屏部署,卡在了预检查这一步,应该是后端 Python 报错(错误堆栈在下面)

Environment CentOS 8.2 x86_64 OceanBase 4.2.2.0 社区版

Fast Reproduce Steps(Required)

Expected behavior 希望正常安装部署。

Actual Behavior error page

定位到日志中的 Python 错误堆栈为:

2024-04-23 19:54:26,076 ERROR wrapper (task.py:140) [21beea4e306d4cd7a8afe1418dd427c5] task test got exception
Traceback (most recent call last):
  File "service/common/task.py", line 126, in wrapper
  File "concurrent/futures/_base.py", line 444, in result
  File "concurrent/futures/_base.py", line 389, in __get_result
  File "concurrent/futures/thread.py", line 57, in run
  File "service/handler/deployment_handler.py", line 495, in _precheck
  File "service/handler/deployment_handler.py", line 549, in _do_precheck
  File "_plugin.py", line 305, in _new_func
  File "/home/admin/.obd/plugins/oceanbase-ce/4.2.1.0/generate_config.py", line 350, in generate_config
    disk_free = data_dir_disk['avail']
TypeError: 'int' object is not subscriptable
2024-04-23 19:54:26,077 INFO wrapper (task.py:143) [21beea4e306d4cd7a8afe1418dd427c5] task test finished failed
gys-git commented 4 months ago

How did you download the package?

1.Did you download ob-deploy and then obtain the OB package online? 2.Did you download the oceanbase-all-in-one package? 3.Did you download the ocp-all-in-one package?

Additionally, please provide the version of the package you downloaded.

CodePlayer commented 4 months ago

How did you download the package?

1.Did you download ob-deploy and then obtain the OB package online? 2.Did you download the oceanbase-all-in-one package? 3.Did you download the ocp-all-in-one package?

Additionally, please provide the version of the package you downloaded.

I have downloaded oceanbase-all-in-one package.

wget https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/8/x86_64/oceanbase-all-in-one-4.2.2.0-100010012024022719.el8.x86_64.tar.gz
gys-git commented 4 months ago

I used the CentOS 8 Docker image and followed your instructions but couldn't reproduce the issue. It might be an environmental problem. You could try uninstalling oceanbase-all-in-one and then reinstalling it, or alternatively try it on a different machine. image

gys-git commented 4 months ago

Could you package and provide the complete logs of OBD for further analysis? The log directory is: ~/.obd/log/.

CodePlayer commented 4 months ago

Could you package and provide the complete logs of OBD for further analysis? The log directory is: ~/.obd/log/.

我全部删除干净,换了一个安装目录后,重新安装就成功了。 当时没有保留任何全量日志。 image

不过看报错信息,应该还是哪里的 Python 代码判断有问题,建议参考我在反馈中采集到的错误堆栈信息(generate_config.py 文件第350行报错),应该能够逆向分析出导致出错的各种源因。

gys-git commented 2 months ago

The unexpected error may have been caused by plugin upgrades or other environmental issues. Currently, it is not reproducible and cannot be precisely pinpointed. If similar issues occur in the future, please retain the complete logs, configurations, and operating system information.