以下是用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
重新訪問: