安装单独OCP提示failded to create user root

【 使用环境 】 测试环境
【 OB or 其他组件 】OCP
【 使用版本 】ob的版本是4.3.3,ocp的版本是4.3.2
【问题描述】我这边的环境是本身就有ob,现在需要安装ocp独立的版本是管理ob,但是我之前安装的ob也集成了ocp,这次在安装ocp的时候就一直卡在这个页面不清楚是不是和我Ob集成的ocp有关系

1 个赞

你之前安装的是带ocp-express带吧?

1 个赞

是的呢,那个好多功能不支持,我就想单独在安装一个ocp去管理我现有的ob

1 个赞

我理解你这次想部署独立的ocp,并且ocp应用和ocp meta数据库分开部署,然后ocp meta数据库选择了之前已经部署过ocp的数据库了吗?

1 个赞

老师你理解的没有错,就是这样的
我不知道我选择的是不是之前的ocp的meta的数据库
我的这里是可以连接上的


这个图的ocp meta的用户名和密码是我新启动的,我没有找到之前的是多少,就新写的密码
我看了一下我原有的ocp上面是有ocp_monitor和ocp_meta创建时间是今天的

我又试了一下是这个报错了


我又点了重新部署之前的两个错没有了,换新的如下的报错

看上面的截图是创建root用户失败了,看下面截图租户都创建成功了,你用root可以登录ocp_meta和ocp_monitor租户吗?

另外发下obd.log

ocp_monitor租户连接失败,需要检查下黑屏 ocp_monitor租户是否创建成功

以及尝试下手动是否可以登录成功

这个obd的日志是发的新的ocp服务器上的对吧
obd.zip (59.3 KB)
黑屏连接ocp_monitor和ocp_meta报如下的错,我这边怎么能修改ocp_monitor的密码么?
image

yaml文件是否刷新出monitor租户的密码了呢

我在新部署的ocp的yml可以看到,但是我的黑屏部署的看不到

[2024-10-18 13:25:20.796] [48e5c01a-8d0f-11ef-b465-000c2995be58] [INFO] [ERROR] OBD-4367: The allocated memory for the provided meta database is currently insufficient for creating a tenant. Available: 5G, Need: 6G.
[2024-10-18 13:25:20.796] [48e5c01a-8d0f-11ef-b465-000c2995be58] [INFO] [ERROR] OBD-1002: Fail to init 10.0.5.17 home_path: /mnt/ocp is not empty.
[2024-10-18 13:25:20.796] [48e5c01a-8d0f-11ef-b465-000c2995be58] [INFO] [ERROR] OBD-1002: Fail to init 10.0.5.17 home_path: /mnt/ocp is not empty.
[2024-10-18 13:25:20.796] [48e5c01a-8d0f-11ef-b465-000c2995be58] [INFO] [ERROR] OBD-1002: Fail to init 10.0.5.17 soft_dir: /mnt/ocp/ is not empty.

[2024-10-18 13:29:15.049] [48e5c01a-8d0f-11ef-b465-000c2995be58] [ERROR] OBD-1004: Configuration conflict 10.0.5.17: /mnt/ocpdata/ocp is used for 10.0.5.17's home_path
[2024-10-18 13:29:15.049] [48e5c01a-8d0f-11ef-b465-000c2995be58] [DEBUG] -- opsuser@10.0.5.17 execute: sudo bash -c "[ -a /mnt/ocpdata/ocp ]" 

2024-10-18 14:44:16.267] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] -- execute sql: create resource unit ocp_meta_unit max_cpu 2.0, memory_size 1073741824, min_cpu 2.0. args: None
[2024-10-18 14:44:16.320] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] -- execute sql: create resource pool ocp_meta_pool unit='ocp_meta_unit', unit_num=1, zone_list=('myoceanbase1','myoceanbase2','myoceanbase3'). args: None
[2024-10-18 14:44:16.361] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] -- execute sql: create tenant ocp_meta replica_num=3,zone_list=('myoceanbase1','myoceanbase2','myoceanbase3'),primary_zone='RANDOM',resource_pool_list=('ocp_meta_pool')set ob_tcp_invited_nodes='%', ob_compatibility_mode = 'mysql'. args: None
[2024-10-18 15:00:56.704] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] -- alter user root IDENTIFIED BY %s
[2024-10-18 15:00:56.704] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] - execute sql: select a.SVR_IP,c.SQL_PORT from oceanbase.DBA_OB_UNITS as a, oceanbase.DBA_OB_TENANTS as b, oceanbase.DBA_OB_SERVERS as c  where a.TENANT_ID=b.TENANT_ID and a.SVR_IP=c.SVR_IP and a.svr_port=c.SVR_PORT and TENANT_NAME=%s. args: ('ocp_meta',)
[2024-10-18 15:00:56.720] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] - connect 10.0.4.7 -P2889 -uroot@ocp_meta -p
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] Traceback (most recent call last):
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "concurrent/futures/thread.py", line 57, in run
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "service/handler/ocp_handler.py", line 793, in _do_install
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "service/handler/ocp_handler.py", line 753, in _create_tenant
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "core.py", line 198, in call_plugin
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_plugin.py", line 348, in __call__
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_plugin.py", line 305, in _new_func
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "/home/opsuser/.obd/plugins/oceanbase-ce/4.3.0.0/create_tenant.py", line 396, in create_tenant
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]     if not exec_sql_in_tenant(sql=sql, cursor=cursor, tenant=name, mode=mode, args=[root_password], stdio=stdio) and not create_if_not_exists:
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "/home/opsuser/.obd/plugins/oceanbase-ce/4.3.0.0/create_tenant.py", line 51, in exec_sql_in_tenant
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]     tenant_cursor = cursor.new_cursor(tenant=tenant, user=user, password=password, ip=tenant_ip, port=tenant_port, print_exception=print_exception)
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 805, in new_cursor
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_stdio.py", line 969, in wrapper
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_stdio.py", line 956, in func_wrapper
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 767, in __init__
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 797, in _connect
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 353, in __init__
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 633, in connect
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 907, in _request_authentication
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 725, in _read_packet
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/protocol.py", line 221, in raise_for_error
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/err.py", line 143, in raise_mysql_exception
[2024-10-18 15:00:56.733] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] pymysql.err.OperationalError: (4013, 'No memory or reach tenant memory limit')
[2024-10-18 15:00:56.734] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] 
[2024-10-18 15:00:56.734] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] - fail to connect 10.0.4.7 -P2889 -uroot@ocp_meta  -p
[2024-10-18 15:00:56.734] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] - connect 10.0.4.8 -P2889 -uroot@ocp_meta -p
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] Traceback (most recent call last):
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "concurrent/futures/thread.py", line 57, in run
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "service/handler/ocp_handler.py", line 793, in _do_install
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "service/handler/ocp_handler.py", line 753, in _create_tenant
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "core.py", line 198, in call_plugin
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_plugin.py", line 348, in __call__
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_plugin.py", line 305, in _new_func
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "/home/opsuser/.obd/plugins/oceanbase-ce/4.3.0.0/create_tenant.py", line 396, in create_tenant
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]     if not exec_sql_in_tenant(sql=sql, cursor=cursor, tenant=name, mode=mode, args=[root_password], stdio=stdio) and not create_if_not_exists:
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "/home/opsuser/.obd/plugins/oceanbase-ce/4.3.0.0/create_tenant.py", line 51, in exec_sql_in_tenant
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]     tenant_cursor = cursor.new_cursor(tenant=tenant, user=user, password=password, ip=tenant_ip, port=tenant_port, print_exception=print_exception)
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 805, in new_cursor
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_stdio.py", line 969, in wrapper
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "_stdio.py", line 956, in func_wrapper
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 767, in __init__
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "tool.py", line 797, in _connect
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 353, in __init__
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 633, in connect
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 907, in _request_authentication
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/connections.py", line 725, in _read_packet
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/protocol.py", line 221, in raise_for_error
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR]   File "pymysql/err.py", line 143, in raise_mysql_exception
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] pymysql.err.OperationalError: (4013, 'No memory or reach tenant memory limit')
[2024-10-18 15:00:56.738] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [ERROR] 
[2024-10-18 15:00:56.739] [3a56b200-8d1b-11ef-aa2c-000c2995be58] [DEBUG] - fail to connect 10.0.4.8 -P2889 -uroot@ocp_meta  -p

这种部署方式应该是可行的,从日志看主要是环境问题以及资源问题

1.ocp_meta 内存给1G 导致连接不可用

2./mnt/ocp/ 非空

3.配置冲突 /mnt/ocpdata/ocp 目录被重用

你将环境准备好,重新部署一遍试下吧

参考这个操作
https://www.oceanbase.com/docs/common-ocp-1000000001406230

好的,我试试啊


这个需要多少的内存呢,我这台的测试机一共给了9G



老师想问一下这个内存是用的是我新部署的ocp的内存呢,还是我之前的白屏部署的ob的服务器的内存呢,是用的哪个?

ocp_meta租户和ocp_monitor租户都给2C4G吧

老师想问一下这个内存是用的是我新部署的ocp的内存呢,还是我之前的白屏部署的ob的服务器的内存呢,是用的哪个?

我理解是你新部署时 ocp_meta租户和ocp_monitor租户都给2C4G,你原来部署的ocp-express的租户是需要删除掉的

看上去是原来部署的带了OCP-Express,现在想换成OCP?

这样的话先卸载OCP-Express,执行obd cluster component del <deploy-name> ocp-express
然后登录sys租户,可以用obd tool db_connect <deploy-name> 登录后删除两个ocp-express的租户ocp_meta和ocp_monitor
最后在用白屏安装OCP。

如果你直接用黑屏命令部署OCP的话,可以不删除租户,OBD黑屏会复用原本的租户。黑屏命令需要自己写个简单的配置文件,参考 obdeploy/example/scale-out/ocp-component-add.yaml at master · oceanbase/obdeploy · GitHub ,如果打不开的话,我这里贴一个最简化的yaml可以贴走

ocp-server-ce:
  depends:
    - oceanbase-ce
  servers:
  - 192.168.0.3
  global:
    home_path: /root/ocp

把上面的ip和路径改成你的,然后执行obd cluster component add <deploy-name> -c addtional_component.yaml 命令文档 https://www.oceanbase.com/docs/community-obd-cn-1000000000955364#26-title-obd%20cluster%20component%20add

是的,老师,我是本身就有OCP-EXPRESS,现在换成OCP,我OCP是在另一台服务器也是这样的操作么?