实验 2 使用 OBD 黑屏部署 OceanBase(选做)

1、参考“OBCA实验指导手册_V4.0.pdf”,操作OBD黑屏安装

文档中安装包没有找到。
使用的软件包是:oceanbase-all-in-one-4.3.5_20250115.el7.x86_64.tar.gz

文档配置:

自己的配置:
[admin@localhost example]$ pwd
/home/admin/oceanbase-all-in-one/obd/usr/obd/example
[admin@localhost example]$ vim all-components.yaml

报错信息如下:
[admin@localhost example]$ obd cluster component add obtest -c all-components.yaml
Get local repositories and plugins ok
Open ssh connection ok
[ERROR] OBD-1019: component oceanbase-ce is already in cluster
[ERROR] Failed to add components for obtest
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 2abcd2c2-2008-11f0-a3b5-000c2918c312
If you want to view detailed obd logs, please run: obd display-trace 2abcd2c2-2008-11f0-a3b5-000c2918c312

这一步过不去,求助!!!

1 个赞

已经部署过一次了?

3 个赞

试了好几次了

2 个赞

先把环境清理了再部署吧~

2 个赞

[@论坛小助手]

2 个赞

根据您的问题描述和报错信息,以下是详细的分析与解决方法:

问题分析

  1. 报错信息

    [ERROR] OBD-1019: component oceanbase-ce is already in cluster
    

    这个错误表明您尝试添加的组件 oceanbase-ce 已经存在于集群中。OBD 不允许重复添加相同的组件到同一个集群。

  2. 可能原因

    • 您可能已经成功部署过一次集群,但没有正确清理环境。
    • 或者在多次尝试部署时,未移除已存在的组件或集群配置。

解决方案

方法一:检查并移除已存在的组件

  1. 查看当前集群的组件列表
    使用以下命令查看当前集群 obtest 的组件状态:

    obd cluster config obtest
    

    如果发现 oceanbase-ce 已经存在,则需要移除它。

  2. 移除已存在的组件
    使用以下命令从集群中移除 oceanbase-ce 组件:

    obd cluster component remove obtest oceanbase-ce
    
  3. 重新添加组件
    再次运行以下命令添加组件:

    obd cluster component add obtest -c all-components.yaml
    

方法二:清理整个集群并重新部署

如果上述方法无效,或者您不确定当前集群的状态,可以考虑清理整个集群并重新部署。

  1. 停止并销毁集群
    使用以下命令停止并销毁集群 obtest

    obd cluster destroy obtest
    
  2. 清理残留文件
    确保删除所有与集群相关的残留文件和目录。例如:

    rm -rf /home/admin/oceanbase-all-in-one/obd/usr/obd/example/obtest
    
  3. 重新初始化 OBD 环境
    初始化 OBD 环境以确保干净的状态:

    obd init
    
  4. 重新部署集群
    使用以下命令重新部署集群:

    obd cluster deploy obtest -c all-components.yaml
    

方法三:检查配置文件

确保您的配置文件 all-components.yaml 正确无误。以下是一些常见的检查点:

  1. 组件名称是否正确
    确保配置文件中指定的组件名称为 oceanbase-ce,并且版本与安装包匹配。

  2. 路径是否正确
    确保安装包路径 /home/admin/oceanbase-all-in-one/obd/usr/obd/example 存在且可访问。

  3. 示例配置文件
    以下是一个简单的 all-components.yaml 示例:

    oceanbase-ce:
      version: 4.3.5_20250115
      path: /home/admin/oceanbase-all-in-one/obd/usr/obd/example
    

总结

  • 如果您只是想解决问题并继续实验,请优先尝试 方法一
  • 如果您不确定当前环境状态,或者多次尝试失败,请使用 方法二 清理并重新部署。
  • 最后,确保配置文件正确无误(参考 方法三)。

如果按照上述步骤仍然无法解决问题,请提供更多的上下文信息(如完整的配置文件内容、之前的部署日志等),以便进一步排查。

检索到的文档如下:

  1. 0001 ~ 3999
  2. 5000 ~ 5999
  3. 通过 obd 图形化界面部署 OceanBase 集群
  4. 4000 ~ 4499
  5. 部署 FAQ
2 个赞

OBCA实验指导手册_V4.0.pdf
实验 2 使用 OBD 黑屏部署 OceanBase(选做)
步骤 3 新增 ocp-express 和 obagent 组件(过不去)

安装包1:oceanbase-all-in-one-4.3.5_20250115.el7.x86_64.tar.gz
安装包2:oceanbase-all-in-one-4.3.5_bp1_20250320.el7.x86_64.tar.gz
配置文件:
all-components.txt (16.4 KB)
mini-single-example.txt (2.7 KB)

上面2个安装包都测试了,还是不行

安装过程步骤:
[admin@localhost example]$ pwd
/home/admin/oceanbase-all-in-one/obd/usr/obd/example
[admin@localhost example]$ obd cluster deploy obtest -c mini-single-example.yaml #部署
±-------------------------------------------------------------------------------------------+
| Packages |
±-------------±--------±-----------------------±-----------------------------------------+
| Repository | Version | Release | Md5 |
±-------------±--------±-----------------------±-----------------------------------------+
| oceanbase-ce | 4.3.5.1 | 101000042025031818.el7 | 8826bc816ae660198f9ca5fd7e96d93c1ce4fc84 |
±-------------±--------±-----------------------±-----------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes observer work home ok
Parameter check ok
Remote oceanbase-ce-4.3.5.1-101000042025031818.el7-8826bc816ae660198f9ca5fd7e96d93c1ce4fc84 repository install ok
Remote oceanbase-ce-4.3.5.1-101000042025031818.el7-8826bc816ae660198f9ca5fd7e96d93c1ce4fc84 repository lib check ok
obtest deployed
Please execute obd cluster start obtest to start
Trace ID: 7119ce12-2028-11f0-914a-000c2918c312
If you want to view detailed obd logs, please run: obd display-trace 7119ce12-2028-11f0-914a-000c2918c312

[admin@localhost example]$ obd cluster start obtest #启动
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-1011: (10.1.1.190) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[WARN] OBD-1007: (10.1.1.190) The recommended number of max user processes is 655350 (Current value: 120000)
[WARN] OBD-1017: (10.1.1.190) The value of the “vm.max_map_count” must be within [327600, 1310720] (Current value: 65530, Recommended value: 655360)
[WARN] OBD-1017: (10.1.1.190) The value of the “fs.file-max” must be greater than 6573688 (Current value: 761326, Recommended value: 6573688)
[WARN] OBD-1012: (10.1.1.190) clog and data use the same disk (/)
cluster scenario: htap
Start observer ok
observer program health check ok
Connect to observer 10.1.1.190:2881 ok
Cluster bootstrap ok
obshell start ok
obshell program health check ok
obshell bootstrap ok
Connect to observer 10.1.1.190:2881 ok
Wait for observer init ok
±---------------------------------------------+
| oceanbase-ce |
±-----------±--------±-----±------±-------+
| ip | version | port | zone | status |
±-----------±--------±-----±------±-------+
| 10.1.1.190 | 4.3.5.1 | 2881 | zone1 | ACTIVE |
±-----------±--------±-----±------±-------+
obclient -h10.1.1.190 -P2881 -uroot -p’oldboy123.com’ -Doceanbase -A

cluster unique id: 47bc880a-00c8-51fe-8ac9-bd6e1dec6a9f-19662111660-01050304

obtest running
Trace ID: 9dc45d4c-2028-11f0-81f9-000c2918c312
If you want to view detailed obd logs, please run: obd display-trace 9dc45d4c-2028-11f0-81f9-000c2918c312

[admin@localhost example]$ obd cluster display obtest #查看 obtest 集群状态
Get local repositories and plugins ok
Open ssh connection ok
Connect to observer 10.1.1.190:2881 ok
Wait for observer init ok
±---------------------------------------------+
| oceanbase-ce |
±-----------±--------±-----±------±-------+
| ip | version | port | zone | status |
±-----------±--------±-----±------±-------+
| 10.1.1.190 | 4.3.5.1 | 2881 | zone1 | ACTIVE |
±-----------±--------±-----±------±-------+
obclient -h10.1.1.190 -P2881 -uroot -p’oldboy123.com’ -Doceanbase -A

cluster unique id: 47bc880a-00c8-51fe-8ac9-bd6e1dec6a9f-19662111660-01050304

Trace ID: 3f237920-2029-11f0-8f55-000c2918c312
If you want to view detailed obd logs, please run: obd display-trace 3f237920-2029-11f0-8f55-000c2918c312

[admin@localhost example]$ obd cluster component add obtest -c all-components.yaml #执行组件加载
Get local repositories and plugins ok
Open ssh connection ok
[ERROR] OBD-1019: component oceanbase-ce is already in cluster
[ERROR] Failed to add components for obtest
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 7773c0be-2029-11f0-8cdf-000c2918c312
If you want to view detailed obd logs, please run: obd display-trace 7773c0be-2029-11f0-8cdf-000c2918c312
[admin@localhost example]$

3 个赞

显示已经安装喔,实在不行用docker版,活着拿台空机器来完成?

1 个赞

看了下你的配置,第一步“mini-single-example”用obd在10.1.1.190上部署了oceanbase-ce,第二步”all-components“在172.19.33.2、3、4上部署oceanbase-ce和其他组件?但是第二步的ocp-express又在10.1.1.190部署了oceanbase-ce,所以提示10.1.1.190上存在oceanbase-ce了吧

2 个赞

component add 这一步是添加组件,你已经安装ob了再添加肯定会报错。 all-components.yaml里面存在ob配置信息

2 个赞

windows中Docker版本已经搭建成功,这里是练习linux版本白屏和黑屏安装

2 个赞

我现在是练习linux版本单机安装,白屏和黑屏安装,(仅有一台linux主机),“OBCA实验指导手册_V4.0.pdf”,文档中,all-components和mini-single-example完整配置能给一下吗?

2 个赞

单机linux安装进行黑屏和白屏测试中mini-single-example、all-components完整的配置能提供一下吗?

2 个赞

obd提供配置方案提供的只是参考的。并不能直接使用deploy进行部署 需要你自己根据自己的环境进行修改

2 个赞

提供参考是可以理解的
1、单机版本安装,安装包解压后应该预设单机的配置文件,提供出来的文档至少应该有配置文件注释说明
2、集群版本安装,安装包解压后应该预设集群的配置文件,提供出来的文档至少应该有配置文件注释说明
3、学习者,根据这些基本的信息,再去尝试和学习

4,、现在的问题“OBCA实验指导手册_V4.0.pdf”,白屏和黑屏安装中,配置文件只是2张截图,让学习者有些为难。

5、另外学习中遇到问题,目前我了解到的途径只能在这里发送文档去沟通问题,让大家在测试和学习中处于等待的状态,体验感不太好…

2 个赞

感谢反馈。配置文件说明在obd官方文档中有
https://www.oceanbase.com/docs/community-obd-cn-1000000002691254

2 个赞

ob的学习并不是只要看obca就可以了 必要时候还是需要根据ob官方文档进行学习的

2 个赞

系统要求
操作系统:CentOS 7.x/8.x、Ubuntu 20.x、openEuler 等
资源要求:建议内存 ≥ 8GB,磁盘 ≥ 100GB(单机测试环境);生产环境需根据数据量调整

1 个赞

测试用到的资源是够的

1 个赞

部署冲突了