【 使用环境 】测试环境
【 OB or 其他组件 】 OCP
【 使用版本 】 ocp 4.0
【问题描述】 执行OCP部署是出现报错 1045 (42000): Access denied for user ‘root’
【复现路径】 执行命令: ./ocp_installer.sh install -c config.yaml -i ./ocp-installer.tar.gz -o ./ocp.tar.gz
【问题现象及影响】
OCP安装失败,但是OBserver和OBproxy安装成功了 可以正常连接登录
[root@ob-ocp ocp]# ./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
Loaded image: reg.docker.alibaba-inc.com/ocp2/ocp-installer:4.0.0-ce-x86_64
make log dir
make obd dir
2023-02-04 18:37:53 - INFO - 1 - [ob_precheck.py:28] - ob precheck using command: sudo /tmp/precheck-2ac63df9-1931-4bcd-8e9b-d117d122ac5e.sh -m ob
2023-02-04 18:37:53 - ERROR - 1 - [ob_precheck.py:32] - precheck for ocp on host 10.17.1.101 failed
2023-02-04 18:37:53 - INFO - 1 - [ob_precheck.py:35] - ob precheck result: Machine Role: ob
Peer IP List:
Machine Type: PHY
Inspect Mode: FALSE
check CPU count: 48 > 8 … PASS
check total MEM: 125 GB > 64 GB … PASS
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
check SELinux status: Disabled … PASS
check account [admin] and home dir, exist … PASS
check service [firewalld]: inactive … PASS
check service [firewalld]: disabled … PASS
SUMMARY OF ISSUES IN PRE-CHECK
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
,
2023-02-04 18:37:53 - INFO - 1 - [ob_precheck.py:28] - ob precheck using command: sudo /tmp/precheck-a2af98ac-c567-4cc9-95c4-4f8a224796aa.sh -m ob
2023-02-04 18:37:53 - ERROR - 1 - [ob_precheck.py:32] - precheck for ocp on host 10.17.1.102 failed
2023-02-04 18:37:53 - INFO - 1 - [ob_precheck.py:35] - ob precheck result: Machine Role: ob
Peer IP List:
Machine Type: PHY
Inspect Mode: FALSE
check CPU count: 48 > 8 … PASS
check total MEM: 125 GB > 64 GB … PASS
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
check SELinux status: Disabled … PASS
check account [admin] and home dir, exist … PASS
check service [firewalld]: inactive … PASS
check service [firewalld]: disabled … PASS
SUMMARY OF ISSUES IN PRE-CHECK
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
,
2023-02-04 18:37:54 - INFO - 1 - [ob_precheck.py:28] - ob precheck using command: sudo /tmp/precheck-56f8342f-d4b6-4542-a806-4dcbe873d23a.sh -m ob
2023-02-04 18:37:54 - ERROR - 1 - [ob_precheck.py:32] - precheck for ocp on host 10.17.1.103 failed
2023-02-04 18:37:54 - INFO - 1 - [ob_precheck.py:35] - ob precheck result: Machine Role: ob
Peer IP List:
Machine Type: PHY
Inspect Mode: FALSE
check CPU count: 48 > 8 … PASS
check total MEM: 125 GB > 64 GB … PASS
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
check SELinux status: Disabled … PASS
check account [admin] and home dir, exist … PASS
check service [firewalld]: inactive … PASS
check service [firewalld]: disabled … PASS
SUMMARY OF ISSUES IN PRE-CHECK
check linux version: Anolis OS release 8.6 … EXPECT release 7.x … WARN
TIPS: OS is not standard RedHat release, if it is compatible with RHEL 7.x, you can ignore this warnning
,
2023-02-04 18:37:54 - INFO - 1 - [ob_install.py:82] - clean obd dir
2023-02-04 18:37:54 - INFO - 1 - [ob_install.py:91] - install ob using obd
2023-02-04 18:37:54 - INFO - 1 - [ob_install.py:95] - deploy task with config:obproxy-ce:
depends:
- oceanbase-ce
global:
home_path: /home/admin/obproxy
listen_port: 2883
servers: - 10.16.2.117
- 10.16.2.118
- 10.16.2.119
oceanbase-ce:
global:
appname: obcluster
data_dir: /home/admin/data
devname: eno1
home_path: /home/admin/oceanbase
mysql_port: 2881
redo_dir: /home/admin/logs
root_password: 3eOKPBUN3
rpc_port: 2882
server1:
zone: zone1
server2:
zone: zone2
server3:
zone: zone3
servers: - ip: 10.17.1.101
name: server1 - ip: 10.17.1.102
name: server2 - ip: 10.17.1.103
name: server3
user:
key_file: /root/keys/id_rsa
password: oceabase#123
port: 22
timeout: 10
username: root
2023-02-04 18:37:54 - INFO - 1 - [ob_install.py:100] - deploy obcluster command: obd cluster autodeploy obcluster -c /tmp/ocp_cluster.yaml
2023-02-04 18:39:09 - INFO - 1 - [ob_install.py:71] - create meta tenant with command obd cluster tenant create obcluster -n meta --max-cpu 2 --min-cpu 2 --max-memory 8589934592 --min-memory 8589934592
2023-02-04 18:39:15 - INFO - 1 - [ob_install.py:76] - create monitor tenant with command obd cluster tenant create obcluster -n monitor --max-cpu 2 --min-cpu 2 --max-memory 8589934592 --min-memory 8589934592
2023-02-04 18:39:19 - INFO - 1 - [ob_install.py:124] - create meta user
2023-02-04 18:39:19 - INFO - 1 - [ob_install.py:126] - grant privilege to meta user
2023-02-04 18:39:19 - INFO - 1 - [ob_install.py:128] - set meta user password
2023-02-04 18:39:19 - INFO - 1 - [ob_install.py:137] - create monitor user
Traceback (most recent call last):
File “/root/installer/common/db_utils.py”, line 36, in run_sql_no_result
port=db_config[‘port’], database=db_config[‘database’], use_pure=True, autocommit=True)
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/init.py”, line 265, in connect
return MySQLConnection(*args, **kwargs)
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/connection.py”, line 104, in init
self.connect(**kwargs)
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/abstracts.py”, line 966, in connect
self._open_connection()
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/connection.py”, line 292, in _open_connection
self._ssl, self._conn_attrs)
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/connection.py”, line 212, in _do_auth
self._auth_switch_request(username, password)
File “/usr/local/lib64/python3.6/site-packages/mysql/connector/connection.py”, line 256, in _auth_switch_request
raise errors.get_exception(packet)
mysql.connector.errors.ProgrammingError: 1045 (42000): Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: NO)
During handling of the above exception, another exception occurred:
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/ob_install.py”, line 148, in run
self.create_user()
File “/root/installer/task/ob_install.py”, line 138, in create_user
db_utils.run_sql_no_result(create_monitor_user_sql, monitor_db_config)
File “/root/installer/common/db_utils.py”, line 41, in run_sql_no_result
traceback.format_exc()))
NameError: name ‘traceback’ is not defined
【附件】