用OBD部署OceanBase社区版的避坑指南
以下是用OBD黑屏部署 OceanBase社区版时容易碰到的几个问题及解决思路,供大家参考。
一、
遇坑步骤:用yaml文件部署集群:
obd cluster deploy obtest -c mini-single-example.yaml
报错:
Package oceanbase-ce-4.2.1.8-108000022024072217.el7 is available.
[ERROR] No such install plugin for oceanbase-ce-4.2.1.8
原因: 版本文件错误
解决:删除版本文件后重试
rm -rf ~/.obd/version
obd cluster deploy obtest -c mini-single-example.yaml ml
[WARN] Use centos 8 remote mirror repository for kylin V10
Update OceanBase-community-stable-el8 ok
[WARN] Use centos 8 remote mirror repository for kylin V10
Update OceanBase-development-kit-el8 ok
……省略……
报错:
Initializes observer work home x
[ERROR] OBD-1002: Fail to init 192.168.254.161 data dir: create /data/1 failed.
[ERROR] OBD-1002: Fail to init 192.168.254.161 data dir: /data/1.
原因:/data目录的属主和属组为root,而安装用户为admin
解决:更改/data目录的属主和属组,并删除/home/admin/observer/下的所有文件后重试
root# chown -R admin:admin /data[admin@KylinV10SP3 example]$ rm -rf /home/admin/observer/*
[admin@KylinV10SP3 example]$ obd cluster deploy obtest -c mini-single-example.yaml
二、
遇坑步骤:启动obtest集群
[admin@KylinV10SP3 example]$ obd cluster start obtest
报错:
[ERROR] OBD-1007: (192.168.254.161) The value of the ulimit parameter "open files" must not be less than 20000 (Current value: 1024), Please execute `echo -e "*soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf` as root in 192.168.254.161. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config.
[ERROR] OBD-1007: (192.168.254.161) The value of the ulimit parameter "max user processes" must not be less than 120000 (Current value: 26446), Please execute `echo -e "* soft nproc 120000\n* hard nproc 120000" >> /etc/security/limits.d/nproc.conf` as root in 192.168.254.161. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config.
原因:资源限制参数未设置或者设置不正确
解决:root用户修改参数文件后重新启动集群
echo -e "*soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf
echo -e "* soft nproc 120000\n* hard nproc 120000" >> /etc/security/limits.d/nproc.conf
三、
遇坑步骤:安装ocp-express后通过浏览器访问
报错:浏览器无法访问ocp-express的指定地址
+--------------------------------------------------------------------+
| obagent |
+-----------------+--------------------+--------------------+--------+
| ip | mgragent_http_port | monagent_http_port | status |
+-----------------+--------------------+--------------------+--------+
| 192.168.254.161 | 8089 | 8088 | active |
+-----------------+--------------------+--------------------+--------+
+--------------------------------------------------------------------+
| ocp-express |
+-----------------------------+----------+------------------+--------+
| url | username | initial password | status |
+-----------------------------+----------+------------------+--------+
| http://192.168.254.161:8180 | admin | gzL.#6A6 | active |
+-----------------------------+----------+------------------+--------+
原因:防火墙未关闭且未放行8180端口
解决:关闭防火墙,或者放行8180端口后即可正常访问
#关闭防火墙
systemctl disable firewalld --now
#或者放行8180端口
firewall-cmd --permanent --add-port=8180/tcp
重新访问: