使用obd部署报错.data不存在

【 使用环境 】测试环境
【 OB or 其他组件 】操作系统为 Anolis OS23.2GA ,
obd --version
OceanBase Deploy: 3.1.1
REVISION: 94b5853a18ad1ad09d5afc30d9edb44643dd488c
【 使用版本 】4.3.5
【问题描述】按照 https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000002013496 步骤安装报错。拷贝default-components-min.yaml进行修改后,执行 obd cluster deploy -v obcluster -c default-components-min.yaml -f 命令,提示有错误:
Remote oceanbase-ce-4.3.5.0-100000202024123117.el7-48b61655aaa13e9b01b722928d1979c76b41937e repository install x
– Remote oceanbase-ce-4.3.5.0-100000202024123117.el7-48b61655aaa13e9b01b722928d1979c76b41937e repository integrity check
– server1(10.2.9.213) oceanbase-ce-4.3.5.0-100000202024123117.el7-48b61655aaa13e9b01b722928d1979c76b41937e repository integrity check
ocean@10.2.9.213 execute: echo ${OBD_HOME:-"$HOME"}/.obd – exited code 0
ocean@10.2.9.213 execute: cat /home/ocean/.obd/repository/oceanbase-ce/4.3.5.0/48b61655aaa13e9b01b722928d1979c76b41937e/.data – exited code 1, error output:
cat: /home/ocean/.obd/repository/oceanbase-ce/4.3.5.0/48b61655aaa13e9b01b722928d1979c76b41937e/.data: No such file or directory

【复现路径】obd display-trace xxx 显示为空
【附件及日志】请问是我配置有问题,还是别的问题,我需要怎么处理这个问题。

user:
  username: ocean
  password: yx@52527
oceanbase-ce:
  servers:
    - name: server1
      ip: 10.2.9.213
    - name: server2
      ip: 10.2.9.212
    - name: server3
      ip: 10.2.9.214
  global:
    cluster_id: 1
    memory_limit: 6G # The maximum running memory for an observer
    system_memory: 1G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
    datafile_size: 20G # Size of the data file.
    log_disk_size: 15G # The size of disk space used by the clog files.
    cpu_count: 16
    production_mode: false
    enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
    max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
    root_password: yx@6520
    proxyro_password: Yx@52527
    ocp_meta_tenant: # The config for ocp express meta tenant
      tenant_name: ocp
      max_cpu: 1
      memory_size: 2G
      log_disk_size: 7680M # The recommend value is (4608 + (expect node num + expect tenant num) * 512) M.
  server1:
    mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    obshell_port: 2886 # Operation and maintenance port for Oceanbase Database. The default value is 2886. This parameter is valid only when the version of oceanbase-ce is 4.2.2.0 or later.
    home_path: /home/oceanbase/observer
    zone: zone1
  server2:
    mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    obshell_port: 2886 # Operation and maintenance port for Oceanbase Database. The default value is 2886. This parameter is valid only when the version of oceanbase-ce is 4.2.2.0 or later.
    #  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
    home_path: /home/oceanbase/observer
    # The directory for data storage. The default value is $home_path/store.
    # data_dir: /data
    # The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
    # redo_dir: /redo
    zone: zone2
  server3:
    mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    obshell_port: 2886 # Operation and maintenance port for Oceanbase Database. The default value is 2886. This parameter is valid only when the version of oceanbase-ce is 4.2.2.0 or later.
    home_path: /home/oceanbase/observer
    zone: zone3
obproxy-ce:
  depends:
    - oceanbase-ce
  servers:
    - 10.2.9.222
  global:
    listen_port: 2883 # External port. The default value is 2883.
    prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
    home_path: /home/oceanbase/obproxy
    enable_cluster_checkout: false
    skip_proxy_sys_private_check: true
    enable_strict_kernel_release: false
    obproxy_sys_password: yanfa@52527
    observer_sys_password: Yanfa@52527
obagent:
  depends:
    - oceanbase-ce
  servers:
    - name: server1
      # Please don't use hostname, only IP can be supported
      ip: 10.2.9.213
    - name: server2
      ip: 10.2.9.212
    - name: server3
      ip: 10.2.9.214
  global:
    home_path: /home/oceanbase/obagent
ocp-express:
  depends:
    - oceanbase-ce
    - obproxy-ce
    - obagent
  servers:
    - 10.2.9.222
  global:
    home_path: /home/oceanbase/ocp-express
    memory_size: 1G

@论坛小助手

根据文档库中的信息,您遇到的问题是由于在部署 OceanBase 数据库时,obd 无法找到 .data 文件。具体错误信息如下:

cat: /home/ocean/.obd/repository/oceanbase-ce/4.3.5.0/48b61655aaa13e9b01b722928d1979c76b41937e/.data: No such file or directory

可能的原因及解决方法

  1. 镜像库中缺少必要的文件

    • 您的 obd 尝试从本地镜像库中读取 .data 文件,但该文件不存在。这可能是由于镜像库中缺少必要的文件或安装包不完整。
  2. 远程仓库未正确配置

    • 如果您使用的是远程仓库,确保远程仓库已正确启用并且可以访问。可以通过以下命令检查远程仓库的状态:
      obd mirror list
      
    • 如果远程仓库未启用,可以通过以下命令启用远程仓库:
      obd mirror enable remote
      
  3. 本地镜像库未正确初始化

    • 确保本地镜像库已正确初始化并包含所有必要的组件。可以通过以下命令克隆并添加本地镜像库:
      obd mirror clone <path_to_rpm>
      
  4. 重新下载并安装 OceanBase 组件

    • 尝试重新下载并安装 OceanBase 组件,确保所有文件都完整无误。可以参考官方文档中的步骤进行在线或离线安装。
  5. 检查配置文件

    • 确认您的配置文件 default-components-min.yaml 中的所有路径和依赖项是否正确。特别是 serversdepends 部分,确保它们与实际环境匹配。

具体操作步骤

  1. 检查远程仓库状态

    obd mirror list
    

    如果远程仓库未启用,请启用它:

    obd mirror enable remote
    
  2. 重新克隆镜像库
    如果您有本地 RPM 包,可以尝试重新克隆镜像库:

    obd mirror clone <path_to_rpm>
    
  3. 重新下载并安装 OceanBase 组件
    如果您有网络连接,可以尝试在线安装:

    bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/installer.sh)"
    source ~/.oceanbase-all-in-one/bin/env.sh
    
  4. 验证配置文件
    确认 default-components-min.yaml 文件中的配置项是否正确,特别是 serversdepends 部分。

  5. 清理并重新部署
    如果上述步骤仍未解决问题,可以尝试清理现有部署并重新开始:

    obd cluster destroy obcluster
    obd cluster deploy -v obcluster -c default-components-min.yaml -f
    

通过以上步骤,应该能够解决 .data 文件不存在的问题。如果问题仍然存在,建议查看详细的日志信息以获取更多线索,并联系 OceanBase 的技术支持人员协助排查。

具体信息可参考以下文档:

  1. 4000 ~ 4499
  2. 错误码
  3. 9000 ~ 9499
  4. 集群诊断

你是要安装三个节点是么?是在线安装么?还是离线安装?用下面的命令查看一下
obd mirror list

obd mirror list
[WARN] Use centos 7 remote mirror repository for anolis 23.2
[WARN] Use centos 7 remote mirror repository for anolis 23.2
±----------------------------------------------------------------------------+
| Mirror Repository List |
±---------------------------±-------±--------±---------±-----------------+
| SectionName | Type | Enabled | Avaiable | Update Time |
±---------------------------±-------±--------±---------±-----------------+
| local | local | - | True | 2025-02-21 13:41 |
| oceanbase.community.stable | remote | True | True | 2025-02-21 12:05 |
| oceanbase.development-kit | remote | True | True | 2025-02-21 12:05 |
±---------------------------±-------±--------±---------±-----------------+
Use obd mirror list <section name> for more details
Trace ID: 8ca865c2-f016-11ef-9402-a08cfdda2e50
If you want to view detailed obd logs, please run: obd display-trace 8ca865c2-f016-11ef-9402-a08cfdda2e50

按照小助手的提示,也没有找到问题

根据您提供的 obd mirror list 输出信息,远程仓库已经启用并且可用。然而,您仍然遇到了 .data 文件不存在的问题。这可能意味着尽管远程仓库已启用,但本地镜像库中仍缺少必要的文件或安装包。

进一步排查步骤

  1. 检查本地镜像库中的 OceanBase 组件
    确认本地镜像库中是否确实存在所需的 OceanBase 组件版本。可以使用以下命令查看本地镜像库中的详细信息:

    obd mirror list local | grep oceanbase-ce
    
  2. 重新同步远程镜像库
    尝试重新同步远程镜像库以确保所有最新的组件都已下载到本地。可以使用以下命令更新远程镜像库:

    obd mirror update
    
  3. 验证 RPM 包的完整性
    如果您有离线环境,确保从可靠的源下载了完整的 RPM 包,并且这些包已正确添加到本地镜像库中。可以通过以下命令克隆并验证 RPM 包:

    obd mirror clone <path_to_rpm>
    
  4. 清理缓存并重新部署
    有时缓存中的旧数据可能会导致问题。可以尝试清理缓存并重新部署:

    obd cluster destroy obcluster
    obd mirror clean
    obd mirror update
    obd cluster deploy -v obcluster -c default-components-min.yaml -f
    
  5. 检查日志文件
    查看详细的日志文件以获取更多线索。可以使用以下命令查看详细的日志:

    obd display-trace 8ca865c2-f016-11ef-9402-a08cfdda2e50
    

具体操作步骤

1. 检查本地镜像库中的 OceanBase 组件

obd mirror list local | grep oceanbase-ce

确认输出中是否有 oceanbase-ce 相关条目及其版本号。

2. 重新同步远程镜像库

obd mirror update

等待同步完成后再次尝试部署。

3. 验证 RPM 包的完整性(如果适用)

如果您有离线环境,请确保从可靠源下载完整的 RPM 包,并将其添加到本地镜像库中:

obd mirror clone /path/to/oceanbase-ce-4.3.5.0-xxxx.rpm

4. 清理缓存并重新部署

obd cluster destroy obcluster
obd mirror clean
obd mirror update
obd cluster deploy -v obcluster -c default-components-min.yaml -f

5. 查看详细日志

obd display-trace 8ca865c2-f016-11ef-9402-a08cfdda2e50

通过以上步骤,应该能够进一步排查并解决 .data 文件不存在的问题。如果问题仍然存在,建议联系 OceanBase 的技术支持人员以获取更专业的帮助。

具体信息可参考以下文档:

  1. 镜像和仓库命令组
  2. 常见问题汇总
  3. 使用 obd 进行运维
  4. 通过 obdiag 工具进行诊断和分析
  5. OceanBase 安装部署工具 V1.2.0

(小助手的答复已结束,如未能解决您的问题,请继续提问并等待其他同学的回复,谢谢!)

应该是缺包,安装obd时候是否执行source /etc/profile.d/obd.sh
建议使用obd web白屏化安装吧可以自己选已有的rpm包。ocp-express不建议安装部署了,而且当前obd3.1版本应该是有相关ocp-express的bug。