题记:

由于来了近十年首个全市大风橙色预警,有说是 风速突破1951年以来历史同期极值的大风,总之至少是10年难得一见的大风,把亦马当先半马给吹到了下周(4/19)**与君共御疾风后,再叙亦庄半马情!北京亦庄半马延期至4月19日**。

各路媒体都在宣传:本周末尽量不出门,然后屁天盖地的新闻,公园关门、地铁不营业。

其实我还是要佩服我大烟台的新闻标题:今天不建议出门,出门也没什么可玩的地方

介于此,只好猫在家里,正好最近 OceanBase 企业版(单机版) 发布了,闲来测试一下。

今天测试的时候仍然是邀测才能下载,但是呢,这个下载地址没有经过安全验证可以随便下载:https://file.oceanbase.com/download-center/opensource/ob-standalone/7/oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz

1
2
3
4
5
6
7
8
9
[opc@ydora01 ~]$ wget https://file.oceanbase.com/download-center/opensource/ob-standalone/7/oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz
--2025-04-12 20:41:15-- https://file.oceanbase.com/download-center/opensource/ob-standalone/7/oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz
Resolving file.oceanbase.com (file.oceanbase.com)... 47.102.9.101
Connecting to file.oceanbase.com (file.oceanbase.com)|47.102.9.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 690829146 (659M) [application/gzip]
Saving to: ‘oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz’

l7.aarch64.tar.gz 19%[=========> ] 131.69M 6.95MB/s eta 1m 56s
image-20250412202351102
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[opc@ydora01 ~]$ free -h
total used free shared buff/cache available
Mem: 10Gi 3.6Gi 989Mi 2.6Gi 6.1Gi 4.3Gi
Swap: 4.0Gi 61Mi 3.9Gi
[opc@ydora01 ~]$ ls -lhrt oceanbase*
-rw-rw-r--. 1 opc opc 659M Apr 7 17:58 oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz
[opc@ydora01 ~]$ sudo tar -xzf oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz
[opc@ydora01 ~]$ cd oceanbase-standalone-all-in-one/
[opc@ydora01 oceanbase-standalone-all-in-one]$ ll
total 12
drwxr-xr-x. 2 root root 87 Apr 2 16:26 bin
drwxr-xr-x. 4 root root 28 Apr 2 16:26 obclient
drwxr-xr-x. 4 root root 28 Apr 2 16:26 obd
-rw-r--r--. 1 root root 666 Apr 2 16:26 README.md
drwxr-xr-x. 2 root root 4096 Apr 2 16:27 rpms
-rw-r--r--. 1 root root 27 Apr 2 16:26 VERSION
## 首先看下 readme
[opc@ydora01 oceanbase-standalone-all-in-one]$ cat README.md

What is OceanBase Database

OceanBase Database is a native distributed relational database. It is developed entirely by Ant Group. OceanBase Database is built on a common server cluster. Based on the Paxos protocol and its distributed structure, OceanBase Database provides high availability and linear scalability. OceanBase Database is not dependent on specific hardware architectures.

How to use this package

Installation

run bin/install.sh to install obd, obclient and prepare rpm packages

Deploy Oceanbase

  • run obd demo to quickly start a local oceanbase cluster
  • run obd web to start web service to do deploy
  • run obd -h for more details

目测 没找到 bin/install.sh

1
2
3
4
[opc@ydora01 bin]$ pwd
/home/opc/oceanbase-standalone-all-in-one/bin
[opc@ydora01 bin]$ ls
env.sh install_obd.sh install_ob.sh uninstall_obd.sh

按照文档中心>OceanBase 数据库>单机版>V4.2.5>部署单机版>选择合适的部署方案

由于 OCP 的方式来部署需要的最小资源是 16C32G,而我的机器只有2C12G不到,再加上官网说明的:16C32G 的配置无法保证 OCP 的稳定性,建议只做验证使用。我只能采用交互式或者 obd 部署 OceanBase 数据库单机版。

image-20250413184746145 image-20250413184945037

使用 obd 部署单机版

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_obd.sh
install obd as root
Found previous obd installed, try upgrade...
Disable remote ok
Trace ID: 5559efb6-179c-11f0-8f27-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 5559efb6-179c-11f0-8f27-02001701a72d
name: ob-deploy
version: 3.2.0
release:2.el7
arch: aarch64
md5: 14e6991e46602e93b9649711624ae574a98cb4af
size: 107194377
add /home/opc/oceanbase-standalone-all-in-one/rpms/ob-deploy-3.2.0-2.el7.aarch64.rpm to local mirror
Trace ID: 55fbe53c-179c-11f0-86fa-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 55fbe53c-179c-11f0-86fa-02001701a72d
Found a higher version package for OBD
name: ob-deploy
version: 3.2.0
release:2.el7
arch: aarch64
md5: 14e6991e46602e93b9649711624ae574a98cb4af
size: 107194377
Upgrade successful.
Current version : 3.2.0
Trace ID: 569801b0-179c-11f0-8b29-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 569801b0-179c-11f0-8b29-02001701a72d
upgrade finished
name: grafana
version: 7.5.17
release:1
arch: aarch64
md5: 5129b0134e31d273c970a7e3c7370990016bee16
size: 171613256
add /home/opc/oceanbase-standalone-all-in-one/rpms/grafana-7.5.17-1.el7.aarch64.rpm to local mirror
name: obagent
version: 4.2.2
release:100000042024011120.el7
arch: aarch64
md5: 8a5c3b8c55defe409d1e72b7efd13c5e41549545
size: 71788628
add /home/opc/oceanbase-standalone-all-in-one/rpms/obagent-4.2.2-100000042024011120.el7.aarch64.rpm to local mirror
name: ob-deploy
version: 3.2.0
release:2.el7
arch: aarch64
md5: 14e6991e46602e93b9649711624ae574a98cb4af
size: 107194377
add /home/opc/oceanbase-standalone-all-in-one/rpms/ob-deploy-3.2.0-2.el7.aarch64.rpm to local mirror
name: oceanbase-diagnostic-tool
version: 3.2.0
release:52025031411.el7
arch: aarch64
md5: e2443774f3f0b02ed686ae8b5793cc287d3fbb8f
size: 63155246
add /home/opc/oceanbase-standalone-all-in-one/rpms/oceanbase-diagnostic-tool-3.2.0-52025031411.el7.aarch64.rpm to local mirror
name: oceanbase-standalone
version: 4.2.5.3
release:103000152025033110.el7
arch: aarch64
md5: eb63676185e5a8a982ae23f7d94d312d2bb52e4b
size: 2190687421
add /home/opc/oceanbase-standalone-all-in-one/rpms/oceanbase-standalone-4.2.5.3-103000152025033110.el7.aarch64.rpm to local mirror
name: oceanbase-standalone-libs
version: 4.2.5.3
release:103000152025033110.el7
arch: aarch64
md5: b3a70d59e739692948ae8b41e3434a44b0001020
size: 70072
add /home/opc/oceanbase-standalone-all-in-one/rpms/oceanbase-standalone-libs-4.2.5.3-103000152025033110.el7.aarch64.rpm to local mirror
name: prometheus
version: 2.37.1
release:10000102022110211.el7
arch: aarch64
md5: 2d856b4a90e7a35322bc3412231f714fde3fd794
size: 206787525
add /home/opc/oceanbase-standalone-all-in-one/rpms/prometheus-2.37.1-10000102022110211.el7.aarch64.rpm to local mirror
Trace ID: 877008fa-179c-11f0-8aa2-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 877008fa-179c-11f0-8aa2-02001701a72d
Disable remote ok
Trace ID: 89c04048-179c-11f0-a733-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 89c04048-179c-11f0-a733-02001701a72d

add auto set env logic to profile: /root/.bash_profile

Execute this command to apply the environment config:`source ~/.oceanbase-all-in-one/bin/env.sh `
[opc@ydora01 oceanbase-standalone-all-in-one]$ source ~/.oceanbase-all-in-one/bin/env.sh
-bash: /home/opc/.oceanbase-all-in-one/bin/env.sh: No such file or directory


但是按照官方文档使用的普通用户使用sudo安装的时候,在最后一步,提示的运行source ~/.oceanbase-all-in-one/bin/env.sh 是会报错的,找不到 当前用户家目录下的.oceanbase-all-in-one/bin/env.sh,我找了下,这个文件是在 root的家目录下。

1
2
3
4
[opc@ydora01 bin]$ ls -l /root/.oceanbase-all-in-one/bin/env.sh
ls: cannot access '/root/.oceanbase-all-in-one/bin/env.sh': Permission denied
[opc@ydora01 bin]$ sudo ls -l /root/.oceanbase-all-in-one/bin/env.sh
lrwxrwxrwx. 1 root root 21 Apr 12 20:49 /root/.oceanbase-all-in-one/bin/env.sh -> /etc/profile.d/obd.sh

而且是个软链,软链到了 /etc/profile.d/obd.sh,那我 source 下 /etc/profile.d/obd.sh好了。实际上,退出当前用户,重新登录也是可以的。就是为了配置环境变量。

退出之后,which

1
2
[opc@ydora01 ~]$ which obd
/usr/bin/obd

可以正常找到 obd

交互式安装 OB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh
Enter the IP (Default: 10.0.0.241) (only support local IP):
Valid local IP: 10.0.0.241
Enter the current user password :
Trace ID: b1136796-1856-11f0-b88c-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace b1136796-1856-11f0-b88c-02001701a72d
get system config ok
+----------------------------------------------------------------+
| System Parameter Change List |
+------------+--------------------+---------------+--------------+
| ip | need_change_var | current_value | target_value |
+------------+--------------------+---------------+--------------+
| 10.0.0.241 | vm.max_map_count | 65530 | 655360 |
| 10.0.0.241 | vm.min_free_kbytes | 13320 | 2097152 |
| 10.0.0.241 | nofile | 1024 | 655350 |
+------------+--------------------+---------------+--------------+
Trace ID: b1ed316a-1856-11f0-95b0-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace b1ed316a-1856-11f0-95b0-02001701a72d
Do you want to modify the parameters above? (y/n) (Default: y)y
get system config ok
10.0.0.241: ( vm.max_map_count,vm.min_free_kbytes,nofile ) have been successfully modified!
Trace ID: b585221a-1856-11f0-a307-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace b585221a-1856-11f0-a307-02001701a72d
Do you want to quit the script and manually restart the machine to apply the optimizations? (y/n) (Default: n)

Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: A4ZcO0MSYkodAwLwOTrm):
Enter the OB cpu count (Default: 2):
The cpu_count cannot be less than 8. It will be set to 8 automatically.
Enter the OB memory limit (Configurable Range[6, 0], Default: 0, Unit: G): 6
The machine's minimum memory cannot be less than min_value (6G). Please try again.
[opc@ydora01 oceanbase-standalone-all-in-one]$

第一次安装不是很顺利,这里有个奇葩的现象:cpu_count 默认2,但是提示不能少于8,而我的cpu也就是2,也是最小配置。

最低要求:CPU 2 核,内存 6G

内存的限制:[6, 0],这个区间就有点意思,通常是左侧是最小值,右侧是最大值,难道这个0是无限制?其实不是的,我输入0,不行,输入6,不行,输入7,输入5都不行,后来经我总结发现他这个可能跟os的可用内存有关系,我的这个机器我安装了 oracle、pg、mysql,我关闭了所有 服务。并重启了主机,释放内存。

重新开始配置:

感觉他的内存判断有点混乱

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh
Enter the IP (Default: 10.0.0.241) (only support local IP):
Valid local IP: 10.0.0.241
Enter the current user password :
Trace ID: d485f71e-1858-11f0-a715-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace d485f71e-1858-11f0-a715-02001701a72d
get system config ok
No need to change system parameters
Trace ID: d555a2f2-1858-11f0-8b25-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace d555a2f2-1858-11f0-8b25-02001701a72d

Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: ovMW5y6s1R3YQavcnjlj):
Enter the OB cpu count (Default: 2):
The cpu_count cannot be less than 8. It will be set to 8 automatically.
Enter the OB memory limit (Configurable Range[6, 3], Default: 3, Unit: G): 7
The machine's minimum memory cannot be less than min_value (6G). Please try again.
[opc@ydora01 oceanbase-standalone-all-in-one]$

可以看到这里内存的限制变成了 [6, 3],欧耶,有点疯狂。再次查看内存信息,发现可能右侧的区间可能取的是 available的内存

1
2
3
4
5
[opc@ydora01 oceanbase-standalone-all-in-one]$ free -h
total used free shared buff/cache available
Mem: 10Gi 3.4Gi 6.4Gi 547Mi 818Mi 3.5Gi
Swap: 4.0Gi 61Mi 3.9Gi
[opc@ydora01 oceanbase-standalone-all-in-one]$

经过再次重启、释放内存,继续。

1
2
3
4
[opc@ydora01 ~]$ free -h
total used free shared buff/cache available
Mem: 10Gi 504Mi 9.7Gi 12Mi 465Mi 6.9Gi
Swap: 4.0Gi 0B 4.0Gi

这里 available显示 6.9G,下面的memory limit[6, 6]总算正常了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh
Enter the IP (Default: 10.0.0.241) (only support local IP):
Valid local IP: 10.0.0.241
Enter the current user password :
Trace ID: e3b3aaee-185b-11f0-9e91-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace e3b3aaee-185b-11f0-9e91-02001701a72d
get system config ok
No need to change system parameters
Trace ID: e46e0df8-185b-11f0-921b-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace e46e0df8-185b-11f0-921b-02001701a72d

Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: olW7ZqLwtkQr6C83FnSl):
Enter the OB cpu count (Default: 2): 8
Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G):
Enter the OB installation directory (Default: /root/liups_ob):
Enter the OB data directory (Default: /data/1/liups_ob):
Enter the OB log directory (Default: /data/log1/liups_ob):
The data_dir and redo_dir are using the same disk.
The available disk space is not enough. Please try again.
[opc@ydora01 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 5.3G 0 5.3G 0% /dev
tmpfs 5.4G 0 5.4G 0% /dev/shm
tmpfs 5.4G 9.4M 5.4G 1% /run
tmpfs 5.4G 0 5.4G 0% /sys/fs/cgroup
/dev/mapper/ocivolume-root 87G 47G 41G 54% /
/dev/sda2 924M 699M 226M 76% /boot
/dev/mapper/ocivolume-oled 10G 4.9G 5.1G 50% /var/oled
/dev/sda1 100M 7.2M 93M 8% /boot/efi
tmpfs 1.1G 4.0K 1.1G 1% /run/user/987
tmpfs 1.1G 4.0K 1.1G 1% /run/user/1000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[opc@ydora01 ~]$ free -h
total used free shared buff/cache available
Mem: 10Gi 504Mi 9.7Gi 12Mi 465Mi 6.9Gi
Swap: 4.0Gi 0B 4.0Gi
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh
Enter the IP (Default: 10.0.0.241) (only support local IP):
Valid local IP: 10.0.0.241
Enter the current user password :
Trace ID: 9e7ab1a0-185d-11f0-89fd-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 9e7ab1a0-185d-11f0-89fd-02001701a72d
get system config ok
No need to change system parameters
Trace ID: 9f3577a6-185d-11f0-8ba4-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 9f3577a6-185d-11f0-8ba4-02001701a72d

Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: DKkOiudzFfcXDd3f41N4):
Enter the OB cpu count (Default: 2):
The cpu_count cannot be less than 8. It will be set to 8 automatically.
Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G):
Enter the OB installation directory (Default: /root/liups_ob):
Enter the OB data directory (Default: /data/1/liups_ob):
Enter the OB log directory (Default: /data/log1/liups_ob):
The data_dir and redo_dir are using the same disk.
Enter the OB datafile maxsize (Configurable Range[12, 13], Default: 13, Unit: G):
Enter the OB log disk size (Configurable Range[12, 16], Default: 16, Unit: G):
Do you want to create tenant for your business workload? (y/n)(Default: y):
Tenant: sys conifguration: 2C/1G/2G(CPU/Memory/Log disk)
system_memory configuration(Unit: G): 1
Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores): ob_ten
Please select the tenant mode (enter the corresponding number):
1) MySQL
2) Oracle
Please enter your choice [1/2] (default 1):2
Enter the tenant cpu (Configurable Range[1, 6], Default: 6):
Enter the tenant memory (Configurable Range[1, 4], Default: 4, Unit: G):
Enter the tenant log disk size(Configurable Range[12, 13], Default: 13, Unit: G):
Do you want to enable encryption for password security? (y/n) (Default: n):
Do you need to install the monitoring components (OBAgent, Prometheus, Grafana)? (y/n) (Default: y):
Enter the OBAgent monitoring service port (Default: 8088):
Enter the OBAgent management service port (Default: 8089):
Enter the Prometheus port (Default: 9090):
Enter the Grafana port (Default: 3000):

#Saved configurations:
cluster name: liups_ob
mysql port: 2881
rpc port: 2882
obshell port: 2886
cpu count: 8
memory limit: 6G
home path: /root/liups_ob
data dir: /data/1/liups_ob
log dir: /data/log1/liups_ob
datafile maxsize: 13G
log disk size: 16G
tenant name: ob_ten
tenant cpu: 6
tenant memory: 4G
tenant log disk size: 13G
OBAgent monitoring service port: 8088
OBAgent management service port: 8089
Prometheus port: 9090
Grafana port: 3000

Are you sure these configurations are correct? (y/n) (Default: y):
Configuration confirmed.


start cluster...
Package oceanbase-standalone-4.2.5.3-103000152025033110.el7 is available.
Package obagent-4.2.2-100000042024011120.el7 is available.
Package prometheus-2.37.1-10000102022110211.el7 is available.
Package grafana-7.5.17-1 is available.
install oceanbase-standalone-4.2.5.3 for local ok
install obagent-4.2.2 for local ok
install prometheus-2.37.1 for local ok
install grafana-7.5.17 for local ok
Cluster param config check ok
Open ssh connection ok
Generate obagent configuration ok
Generate prometheus configuration ok
Generate grafana configuration ok
+----------------------------------------------------------------------------------------------------+
| Packages |
+----------------------+---------+------------------------+------------------------------------------+
| Repository | Version | Release | Md5 |
+----------------------+---------+------------------------+------------------------------------------+
| oceanbase-standalone | 4.2.5.3 | 103000152025033110.el7 | eb63676185e5a8a982ae23f7d94d312d2bb52e4b |
| obagent | 4.2.2 | 100000042024011120.el7 | 8a5c3b8c55defe409d1e72b7efd13c5e41549545 |
| prometheus | 2.37.1 | 10000102022110211.el7 | 2d856b4a90e7a35322bc3412231f714fde3fd794 |
| grafana | 7.5.17 | 1 | 5129b0134e31d273c970a7e3c7370990016bee16 |
+----------------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes obagent work home ok
Initializes observer work home ok
Initializes prometheus work home ok
Initializes grafana work home ok
Parameter check ok
Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository install ok
Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository lib check ok
Remote obagent-4.2.2-100000042024011120.el7-8a5c3b8c55defe409d1e72b7efd13c5e41549545 repository install ok
Remote obagent-4.2.2-100000042024011120.el7-8a5c3b8c55defe409d1e72b7efd13c5e41549545 repository lib check ok
Remote prometheus-2.37.1-10000102022110211.el7-2d856b4a90e7a35322bc3412231f714fde3fd794 repository install ok
Remote prometheus-2.37.1-10000102022110211.el7-2d856b4a90e7a35322bc3412231f714fde3fd794 repository lib check ok
Remote grafana-7.5.17-1-5129b0134e31d273c970a7e3c7370990016bee16 repository install ok
Remote grafana-7.5.17-1-5129b0134e31d273c970a7e3c7370990016bee16 repository lib check ok
liups_ob deployed
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-1007: (10.0.0.241) The recommended number of core file size is unlimited (Current value: 0)
[WARN] OBD-1007: (10.0.0.241) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-1012: (10.0.0.241) clog and data use the same disk (/)
Check before start obagent ok
Check before start prometheus ok
Check before start grafana ok
cluster scenario: None
Start observer ok
observer program health check ok
observer program health check ok
Connect to observer 10.0.0.241:2881 ok
Cluster bootstrap ok
obshell taking over ok
obshell start ok
obshell program health check ok
obshell bootstrap ok
Start obagent ok
obagent program health check ok
obagent program health check x
[ERROR] obagent-py_script_health_check-1.3.0 RuntimeError: 'NoneType' object is not subscriptable
[WARN] obagent-py_script_health_check-1.3.0 has animation not been closed

See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: ff826042-185d-11f0-a288-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace ff826042-185d-11f0-a288-02001701a72d
start cluster failed

这里报 :[ERROR] obagent-py_script_health_check-1.3.0 RuntimeError: ‘NoneType’ object is not subscriptable

我认为是跟 obagent 有关,重新清理安装文件,选择不安装 monitoring components (OBAgent, Prometheus, Grafana)。仍然报错。

问题的关键应该是 ‘NoneType’,具体如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh
Enter the IP (Default: 10.0.0.241) (only support local IP):
Valid local IP: 10.0.0.241
Enter the current user password :
Trace ID: b68ba656-1861-11f0-8cd7-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace b68ba656-1861-11f0-8cd7-02001701a72d
get system config ok
No need to change system parameters
Trace ID: b747c534-1861-11f0-a131-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace b747c534-1861-11f0-a131-02001701a72d

Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_obc
Enter the OB SQL port (Default: 2881):
Enter the OB RPC port (Default: 2882):
Enter the obshell port (Default: 2886):
Enter the OB root password (Default: whij1v6CMJdMEkpcxVPU):
Enter the OB cpu count (Default: 2):
The cpu_count cannot be less than 8. It will be set to 8 automatically.
Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G):
Enter the OB installation directory (Default: /root/liups_obc):
Enter the OB data directory (Default: /data/1/liups_obc):
Enter the OB log directory (Default: /data/log1/liups_obc):
The data_dir and redo_dir are using the same disk.
Enter the OB datafile maxsize (Configurable Range[12, 12], Default: 12, Unit: G):
Enter the OB log disk size (Configurable Range[12, 16], Default: 16, Unit: G):
Do you want to create tenant for your business workload? (y/n)(Default: y):
Tenant: sys conifguration: 2C/1G/2G(CPU/Memory/Log disk)
system_memory configuration(Unit: G): 1
Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores): liups_tent
Please select the tenant mode (enter the corresponding number):
1) MySQL
2) Oracle
Please enter your choice [1/2] (default 1):2
Enter the tenant cpu (Configurable Range[1, 6], Default: 6): 2
Enter the tenant memory (Configurable Range[1, 4], Default: 4, Unit: G): 2
Enter the tenant log disk size(Configurable Range[6, 13], Default: 6, Unit: G):
Do you want to enable encryption for password security? (y/n) (Default: n):
Do you need to install the monitoring components (OBAgent, Prometheus, Grafana)? (y/n) (Default: y): n
Monitoring Component will not be installed.

#Saved configurations:
cluster name: liups_obc
mysql port: 2881
rpc port: 2882
obshell port: 2886
cpu count: 8
memory limit: 6G
home path: /root/liups_obc
data dir: /data/1/liups_obc
log dir: /data/log1/liups_obc
datafile maxsize: 12G
log disk size: 16G
tenant name: liups_tent
tenant cpu: 2
tenant memory: 2G
tenant log disk size: 6G

Are you sure these configurations are correct? (y/n) (Default: y):
Configuration confirmed.


start cluster...
Cluster param config check ok
Open ssh connection ok
+----------------------------------------------------------------------------------------------------+
| Packages |
+----------------------+---------+------------------------+------------------------------------------+
| Repository | Version | Release | Md5 |
+----------------------+---------+------------------------+------------------------------------------+
| oceanbase-standalone | 4.2.5.3 | 103000152025033110.el7 | eb63676185e5a8a982ae23f7d94d312d2bb52e4b |
+----------------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes observer work home ok
Parameter check ok
Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository install ok
Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository lib check ok
liups_obc deployed
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-1007: (10.0.0.241) The recommended number of core file size is unlimited (Current value: 0)
[WARN] OBD-1007: (10.0.0.241) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-1012: (10.0.0.241) clog and data use the same disk (/)
cluster scenario: None
Start observer ok
observer program health check ok
observer program health check ok
Connect to observer 10.0.0.241:2881 ok
Cluster bootstrap ok
obshell taking over ok
obshell start ok
obshell program health check ok
obshell bootstrap ok
Connect to observer 10.0.0.241:2881 ok
Wait for observer init ok
+----------------------------------------------+
| oceanbase-standalone |
+------------+---------+------+-------+--------+
| ip | version | port | zone | status |
+------------+---------+------+-------+--------+
| 10.0.0.241 | 4.2.5.3 | 2881 | zone1 | ACTIVE |
+------------+---------+------+-------+--------+
obclient -h10.0.0.241 -P2881 -uroot@sys -p'whij1v6CMJdMEkpcxVPU' -Doceanbase -A

cluster unique id: 101e47c9-4b33-5b81-b637-3cd07bbc657c-1962f1a851e-03050204

liups_obc running
Trace ID: e631ade2-1861-11f0-9465-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace e631ade2-1861-11f0-9465-02001701a72d

create tenant...
Get local repositories ok
Open ssh connection ok
Connect to observer 10.0.0.241:2881 ok
Create tenant liups_tent ok
[ERROR] oceanbase-standalone-py_script_create_tenant-4.2.0.0 RuntimeError: 'NoneType' object has no attribute 'ip'
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 27318f24-1862-11f0-a3aa-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 27318f24-1862-11f0-a3aa-02001701a72d
create tenant failed
[opc@ydora01 oceanbase-standalone-all-in-one]$ obd cluster list
Local deploy is empty
Trace ID: 6c6e90dc-1862-11f0-b1e6-02001701a72d
If you want to view detailed obd logs, please run: obd display-trace 6c6e90dc-1862-11f0-b1e6-02001701a72d
[opc@ydora01 oceanbase-standalone-all-in-one]$ lsof -i:2882
[opc@ydora01 oceanbase-standalone-all-in-one]$ lsof -i:2881
[opc@ydora01 oceanbase-standalone-all-in-one]$

但是可以看到 observer的进程,端口不通。

1
2
3
4
5
6
7
8
9
10
11
12
[opc@ydora01 oceanbase-standalone-all-in-one]$ lsof -i:2881
[opc@ydora01 oceanbase-standalone-all-in-one]$
[opc@ydora01 oceanbase-standalone-all-in-one]$ ps -ef |grep ob
root 1582 1 0 20:19 ? 00:00:00 /usr/sbin/dtprobed -F
root 1596 1582 0 20:19 ? 00:00:00 /usr/sbin/dtprobed -F
nobody 2128 1 0 20:19 ? 00:00:00 /usr/sbin/openvpn --status /run/openvpn-server/status-server.log --status-version 2 --suppress-timestamps --cipher AES-256-GCM --ncp-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC:AES-128-CBC:BF-CBC --config server.conf
root 5399 1 44 20:22 ? 00:03:44 /root/liups_obc/oceanbase/bin/observer -r 10.0.0.241:2882:2881 -p 2881 -P 2882 -z zone1 -n liups_obc -c 1744546921 -d /data/1/liups_obc -I 10.0.0.241 -o __min_full_resource_pool_memory=1073741824,cluster_name=liups_obc,cpu_count=8,memory_limit=6G,datafile_size=2G,datafile_maxsize=12G,log_disk_size=16G,system_memory=1G,enable_syslog_wf=False,max_syslog_file_count=16
root 5876 1 0 20:23 pts/0 00:00:00 /root/liups_obc/oceanbase/bin/obshell daemon --ip 10.0.0.241 --port 2886
root 5892 5876 0 20:23 pts/0 00:00:01 /root/liups_obc/oceanbase/bin/obshell server --ip 10.0.0.241 --port 2886
opc 7321 3804 0 20:30 pts/0 00:00:00 grep --color=auto ob
[opc@ydora01 oceanbase-standalone-all-in-one]$

我猜测可能跟 ORACLE Cloud 的 oel 的arm版本有关系,没有在这个版本上进行测试。

1
2
3
4
5
6
7
8
9
[root@ydora01 ~]# lsb_release -a
LSB Version: :core-4.1-aarch64:core-4.1-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 8.10
Release: 8.10
Codename: n/a
[root@ydora01 ~]# uname -a
Linux ydora01 5.15.0-207.156.6.el8uek.aarch64 #2 SMP Thu Jun 6 04:41:30 PDT 2024 aarch64 aarch64 aarch64 GNU/Linux
[root@ydora01 ~]#

好吧,折腾了这几个小时,没了兴致,遂放弃。

参考资料:https://www.anbob.com/archives/8876.html

原文作者: liups.com

原文链接: http://liups.com/posts/4ffa14b1/

许可协议: 知识共享署名-非商业性使用 4.0 国际许可协议