安装ocp4.0失败,请教哪里出了问题

【 使用环境 】测试环境
【 OB or 其他组件 】
【 使用版本 】
【问题描述】初学,安装ocp4.0一直失败,不知道是哪里的问题,OceanBase 云平台安装文档也看了。
【复现路径】问题出现前后相关操作
【问题现象及影响】
[root@OceanBase-12834 ocp-4.0.0-ce-x86_64]# ./ocp_installer.sh install -c config.yaml -i ./ocp-installer.tar.gz -o ./ocp.tar.gz
install start
check docker on host
load installer docker image
c5974558e919: Loading layer [==================================================>] 298.7MB/298.7MB
0c1ce969e922: Loading layer [==================================================>] 2.048kB/2.048kB
fe09719433da: Loading layer [==================================================>] 3.584kB/3.584kB
92a4da7973a0: Loading layer [==================================================>] 2.048kB/2.048kB
11ba241bc6ba: Loading layer [==================================================>] 2.56kB/2.56kB
f73a056aeecd: Loading layer [==================================================>] 3.072kB/3.072kB
98c59d2aef5b: Loading layer [==================================================>] 3.072kB/3.072kB
d023669007c7: Loading layer [==================================================>] 5.12kB/5.12kB
618f6e952ad0: Loading layer [==================================================>] 2.56kB/2.56kB
d14f2e92c70b: Loading layer [==================================================>] 2.56kB/2.56kB
d7c925cc23a5: Loading layer [==================================================>] 2.56kB/2.56kB
8422da10b172: Loading layer [==================================================>] 407.4MB/407.4MB
574144b99534: Loading layer [==================================================>] 6.265MB/6.265MB
ec276a8cf09a: Loading layer [==================================================>] 3.072kB/3.072kB
f1d666eb5de7: Loading layer [==================================================>] 144.5MB/144.5MB
db181331214d: Loading layer [==================================================>] 49.61MB/49.61MB
c411fd0e0262: Loading layer [==================================================>] 162.3kB/162.3kB
a64258ff4ab1: Loading layer [==================================================>] 9.914MB/9.914MB
af073c54e247: Loading layer [==================================================>] 60.51MB/60.51MB
ef7ee04b9e03: Loading layer [==================================================>] 18.43kB/18.43kB
3e41eff2cfdb: Loading layer [==================================================>] 11.89MB/11.89MB
d5767be3f873: Loading layer [==================================================>] 24.43MB/24.43MB
879aebcc0533: Loading layer [==================================================>] 52.55MB/52.55MB
f5ba6c31cb6e: Loading layer [==================================================>] 5.12kB/5.12kB
6da1de090867: Loading layer [==================================================>] 172.5kB/172.5kB
19ea87a6f7bc: Loading layer [==================================================>] 150MB/150MB
e911243d2cbd: Loading layer [==================================================>] 5.777MB/5.777MB
1d0af4dc80f8: Loading layer [==================================================>] 3.072kB/3.072kB
e6aec86975d9: Loading layer [==================================================>] 1.612MB/1.612MB
Loaded image: reg.docker.alibaba-inc.com/ocp2/ocp-installer:4.0.0-ce-x86_64
make log dir
make obd dir
2023-01-12 18:58:58 - INFO - 1 - [ocp_precheck.py:25] - ocp precheck using command: sudo /tmp/precheck-499d1ade-635a-4061-af83-c235004d03a4.sh -m ocp
2023-01-12 18:58:58 - INFO - 1 - [ocp_precheck.py:29] - precheck for ocp on host 10.18.128.34 failed
2023-01-12 18:58:58 - INFO - 1 - [ocp_precheck.py:32] - ocp precheck result: Machine Role: ocp
Peer IP List:
Machine Type: PHY
Inspect Mode: FALSE

check CPU count: 8 > 8 … PASS
check total MEM: 15 GB < 32 GB … EXPECT >= 32 GB … FAIL
TIPS: replace another machine with more MEM
check linux version: Red Hat Enterprise Linux Server release 7.6 (Maipo) … PASS
check SELinux status: Disabled … PASS
check account [admin] and home dir, exist … PASS
check service [firewalld]: inactive … PASS
check service [firewalld]: disabled … PASS
check docker version: 18.06.3 … PASS

SUMMARY OF ISSUES IN PRE-CHECK

check total MEM: 15 GB < 32 GB … EXPECT >= 32 GB … FAIL
TIPS: replace another machine with more MEM
,
2023-01-12 18:58:59 - INFO - 1 - [image_load.py:21] - check image got result: 0
Traceback (most recent call last):
File “pipeline/install_ocp.py”, line 43, in
run(context)
File “pipeline/install_ocp.py”, line 33, in run
install_ocp_pipeline.run()
File “/root/installer/core/pipeline.py”, line 10, in run
task.run()
File “/root/installer/task/image_load.py”, line 28, in run
ssh_client.put_file(docker_image_path, remote_image_path)
File “/root/installer/common/ssh.py”, line 252, in put_file
return self._put_file(local_path, remote_path, stdio=stdio)
File “/root/installer/common/ssh.py”, line 257, in _put_file
if self.sftp.put(local_path, remote_path):
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_client.py”, line 759, in put
return self.putfo(fl, remotepath, file_size, callback, confirm)
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_client.py”, line 717, in putfo
reader=fl, writer=fr, file_size=file_size, callback=callback
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_client.py”, line 679, in _transfer_with_callback
writer.write(data)
File “/usr/local/lib/python3.6/site-packages/paramiko/file.py”, line 405, in write
self._write_all(data)
File “/usr/local/lib/python3.6/site-packages/paramiko/file.py”, line 522, in _write_all
count = self._write(data)
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_file.py”, line 208, in _write
t, msg = self.sftp._read_response(req)
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_client.py”, line 865, in _read_response
self._convert_status(msg)
File “/usr/local/lib/python3.6/site-packages/paramiko/sftp_client.py”, line 898, in _convert_status
raise IOError(text)
OSError: Failure
【附件】

用绝对路径启动试试

你好,
改成绝对路径变成这种报错了,
并且提前建立了mete_user和mete_monitor两个租户及相应的database(部署文档没提及需要提前建,但是不管我建没建都报错),
新的报错日志我也上传了【2023-01-17.log】,麻烦看看我还应该从哪里来排查呢?谢谢
2023-01-17.log (10.1 KB)

mysql.connector.errors.ProgrammingError: 1045 (42000): Access denied for user ‘meta_user’@‘xxx.xxx.xxx.xxx’ (using password: YES)
报错是权限问题,应该是配置里的信息和实际metadb里不符合,使用配置里的信息后台连下数据库是否能正常登录。

你好,通过mysql或者ob客户端都可以连接。

[root@nhzb-mysql-19269 ~]# mysql -h10.18.128.34 -umeta_user@meta_tenant -P2881 -pmeta_user -c -A
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3221558336
Server version: 5.7.25 OceanBase 3.1.4 (r102000012022120715-0fda7c08f44ba23dcaf64ce7689b196ab046f7fb) (Built Dec 7 2022 16:28:15)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

[root@OceanBase-12834 ~]# obclient -h10.18.128.34 -umeta_user@meta_tenant -P2881 -pmeta_user -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221558316
Server version: OceanBase 3.1.4 (r102000012022120715-0fda7c08f44ba23dcaf64ce7689b196ab046f7fb) (Built Dec 7 2022 16:28:15)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

obclient [(none)]>

提供下配置文件看看;

config.rar (1.4 KB)
你好,已上传附件

查看配置采用2881直连metadb数据库,可以换成2883,代理连接方式,或者下面的用户参数去掉#obocp集群名称,因为直连时不能带集群名称信息。

1 个赞

你好,前面的问题按照您的解答去掉#obocp已经解决了,现在又报了新的错误:
ProgrammingError: 1227 (42501): Access denied; you need (at least one of) the CREATE privilege(s) for this operation
查了问题帖子:OB4.0社区版管理工具初体验- ocp meta db 初始化失败 - #17,来自 玩转数据库
这位同学有提到,但是我能力不够,没找到那个执行的脚本,就算我找到了,然后安装程序重新执行一遍就可以吗?

在安装ocp之前,租户用户数据库我也是提前建立了
obclient -h10.18.128.34 -uroot@meta_tenant -P2881 -A -Doceanbase
create user meta_user@’%’ identified by ‘meta_user’;
grant select on oceanbase.* to meta_user@’%’;
alter user root@’%’ identified by ‘qweASD!@#123’;
create database meta_database;
grant all privileges on meta_database.* to meta_user@’%’;

obclient -h10.18.128.34 -uroot@monitor_tenant -P2881 -A -Doceanbase
create user monitor_user@’%’ identified by ‘monitor_user’;
grant select on oceanbase.* to monitor_user@’%’;
alter user root@’%’ identified by ‘qweASD!@#123’;
create database monitor_database;
grant all privileges on monitor_database.* to monitor_user@’%’;

我新的报错的日志已上传,麻烦也帮我看看吧,谢谢
2023-01-18.log (15.4 KB)

看了你创建了数据库,并赋予了权限,权限只有oceanbase库下的表权限;
我大致解释下:需要创建meta_tenant租户并在这个租户下创建meta_user用户,库名无需创建,会自动创建,赋予用户访问库的权限不正确,可以把库去掉,让ocp自己去创建即可;

权限只有oceanbase库下的表权限=======>>>>>>>>是的,因为之前没给oceanbase权限也报错了,我试了几个权限,好像只有select能赋予。然后这个报错就通过了。
我这回删掉了数据库名,meta_database和monitor_database,还是提示这个问题,ProgrammingError: 1227 (42501): Access denied; you need (at least one of) the CREATE privilege(s) for this operation
日志已经上传,麻烦再看看,谢谢。

2023-01-18-02.log (15.4 KB)

权限有问题,你重新赋权,可以按这个文档的操作进行一下 https://www.oceanbase.com/docs/community-ocp-cn-10000000000012378

1 个赞

感谢您的耐心解答,确实按照ocp3.1的文档的权限赋权后,安装很顺利的,已经安装好ocp4了,感谢~

ps:ocp4.0的文档可能更适合老手,我这个新手应该从3.1开始,上来就4.0有点步子迈大了

感谢您的反馈,关于ocp4.0和3.1文档部署差异问题,已反馈文档组进行修订。