1[kingbase@kesrwc01 ~]$ cd /install/
2[kingbase@kesrwc01 install]$ sh cluster_install.sh
3[CONFIG_CHECK] will deploy the cluster of DG
4[CONFIG_CHECK] file format is correct ... OK
5[CONFIG_CHECK] encoding: UTF8 OK
6[CONFIG_CHECK] locale: zh_CN.UTF-8 OK
7[CONFIG_CHECK] the number of license_num matches the length of all_ip or the number of license_num is 1 ... OK
8[RUNNING] check if the host can be reached from current node and between all nodes by ssh ...
9[RUNNING] success connect to "192.168.6.87" from current node by 'ssh' ... OK
10[RUNNING] success connect to "192.168.6.87" from "192.168.6.87" by 'ssh' ... OK
11[RUNNING] success connect to "192.168.6.88" from "192.168.6.87" by 'ssh' ... OK
12[RUNNING] success connect to "192.168.6.88" from current node by 'ssh' ... OK
13[RUNNING] success connect to "192.168.6.87" from "192.168.6.88" by 'ssh' ... OK
14[RUNNING] success connect to "192.168.6.88" from "192.168.6.88" by 'ssh' ... OK
15[RUNNING] chmod /bin/ping ...
16[RUNNING] chmod /bin/ping ... Done
17[RUNNING] ping access rights OK
18[RUNNING] check the db is running or not...
19[RUNNING] the db is not running on "192.168.6.87:54321" ..... OK
20[RUNNING] the db is not running on "192.168.6.88:54321" ..... OK
21[RUNNING] check the sys_securecmdd is running or not...
22[RUNNING] the sys_securecmdd is not running on "192.168.6.87:8890" ..... OK
23[RUNNING] the sys_securecmdd is not running on "192.168.6.88:8890" ..... OK
24[RUNNING] check if the install dir (create dir and check it's owner/permission) ...
25[RUNNING] check if the install dir (create dir and check it's owner/permission) on "192.168.6.87" ... OK
26[RUNNING] check if the install dir (create dir and check it's owner/permission) on "192.168.6.88" ... OK
27[RUNNING] check if the dir "/KingbaseES/V9/cluster/kingbase" is already exist ...
28[RUNNING] the dir "/KingbaseES/V9/cluster/kingbase" is not exist on "192.168.6.87" ..... OK
29[RUNNING] the dir "/KingbaseES/V9/cluster/kingbase" is not exist on "192.168.6.88" ..... OK
30[RUNNING] check the data directory (create it and check whether it is empty) ...
31[RUNNING] when use_exist_data=0, create the empty data directory on "192.168.6.87" ..... OK
32[RUNNING] when use_exist_data=0, create the empty data directory on "192.168.6.88" ..... OK
332025-02-08 06:58:14 [INFO] start to check system parameters on 192.168.6.87 ...
342025-02-08 06:58:14 [WARNING] [GSSAPIAuthentication] yes (should be: no) on 192.168.6.87
352025-02-08 06:58:15 [INFO] [UseDNS] is null on 192.168.6.87
362025-02-08 06:58:15 [INFO] [UsePAM] yes on 192.168.6.87
372025-02-08 06:58:15 [INFO] [ulimit.open files] 655360 on 192.168.6.87
382025-02-08 06:58:16 [INFO] [ulimit.open proc] 655360 on 192.168.6.87
392025-02-08 06:58:16 [INFO] [ulimit.core size] 655360 (no unlimited) on 192.168.6.87
402025-02-08 06:58:16 [INFO] the value of [ulimit.core size] is wrong, now will change it on 192.168.6.87 ...
412025-02-08 06:58:16 [INFO] change ulimit.core size on 192.168.6.87 ...
422025-02-08 06:58:17 [INFO] change ulimit.core size on 192.168.6.87 ... Done
432025-02-08 06:58:17 [INFO] [ulimit.core size] unlimited on 192.168.6.87
442025-02-08 06:58:17 [INFO] [ulimit.mem lock] 50000000 on 192.168.6.87
452025-02-08 06:58:19 [INFO] [kernel.sem] 5010 641280 5010 256 on 192.168.6.87
462025-02-08 06:58:19 [INFO] [RemoveIPC] no on 192.168.6.87
472025-02-08 06:58:19 [INFO] [DefaultTasksAccounting] no on 192.168.6.87
482025-02-08 06:58:20 [INFO] write file "/etc/udev/rules.d/kingbase.rules" on 192.168.6.87
492025-02-08 06:58:21 [INFO] [crontab] chmod /usr/bin/crontab ...
502025-02-08 06:58:22 [INFO] [crontab] chmod /usr/bin/crontab ... Done
512025-02-08 06:58:22 [INFO] [crontab access] OK
522025-02-08 06:58:23 [INFO] [cron.allow] add kingbase to cron.allow ...
532025-02-08 06:58:23 [INFO] [cron.allow] add kingbase to cron.allow ... Done
542025-02-08 06:58:24 [INFO] [crontab auth] crontab is accessible by kingbase now on 192.168.6.87
552025-02-08 06:58:24 [INFO] [SELINUX] disabled on 192.168.6.87
562025-02-08 06:58:25 [INFO] [firewall] down on 192.168.6.87
572025-02-08 06:58:26 [INFO] [The memory] OK on 192.168.6.87
582025-02-08 06:58:26 [INFO] [The hard disk] OK on 192.168.6.87
592025-02-08 06:58:26 [INFO] [ping] chmod /bin/ping ...
602025-02-08 06:58:27 [INFO] [ping] chmod /bin/ping ... Done
612025-02-08 06:58:27 [INFO] [ping access] OK
622025-02-08 06:58:27 [INFO] [/bin/cp --version] on 192.168.6.87 OK
632025-02-08 06:58:27 [INFO] [Virtual IP] Not configured on 192.168.6.87
642025-02-08 06:58:27 [INFO] start to check system parameters on 192.168.6.88 ...
652025-02-08 06:58:28 [WARNING] [GSSAPIAuthentication] yes (should be: no) on 192.168.6.88
662025-02-08 06:58:28 [INFO] [UseDNS] is null on 192.168.6.88
672025-02-08 06:58:28 [INFO] [UsePAM] yes on 192.168.6.88
682025-02-08 06:58:29 [INFO] [ulimit.open files] 655360 on 192.168.6.88
692025-02-08 06:58:29 [INFO] [ulimit.open proc] 655360 on 192.168.6.88
702025-02-08 06:58:29 [INFO] [ulimit.core size] 655360 (no unlimited) on 192.168.6.88
712025-02-08 06:58:29 [INFO] the value of [ulimit.core size] is wrong, now will change it on 192.168.6.88 ...
722025-02-08 06:58:29 [INFO] change ulimit.core size on 192.168.6.88 ...
732025-02-08 06:58:30 [INFO] change ulimit.core size on 192.168.6.88 ... Done
742025-02-08 06:58:30 [INFO] [ulimit.core size] unlimited on 192.168.6.88
752025-02-08 06:58:31 [INFO] [ulimit.mem lock] 50000000 on 192.168.6.88
762025-02-08 06:58:32 [INFO] [kernel.sem] 5010 641280 5010 256 on 192.168.6.88
772025-02-08 06:58:32 [INFO] [RemoveIPC] no on 192.168.6.88
782025-02-08 06:58:32 [INFO] [DefaultTasksAccounting] no on 192.168.6.88
792025-02-08 06:58:33 [INFO] write file "/etc/udev/rules.d/kingbase.rules" on 192.168.6.88
802025-02-08 06:58:34 [INFO] [crontab] chmod /usr/bin/crontab ...
812025-02-08 06:58:34 [INFO] [crontab] chmod /usr/bin/crontab ... Done
822025-02-08 06:58:35 [INFO] [crontab access] OK
832025-02-08 06:58:36 [INFO] [cron.allow] add kingbase to cron.allow ...
842025-02-08 06:58:36 [INFO] [cron.allow] add kingbase to cron.allow ... Done
852025-02-08 06:58:36 [INFO] [crontab auth] crontab is accessible by kingbase now on 192.168.6.88
862025-02-08 06:58:37 [INFO] [SELINUX] disabled on 192.168.6.88
872025-02-08 06:58:37 [INFO] [firewall] down on 192.168.6.88
882025-02-08 06:58:38 [INFO] [The memory] OK on 192.168.6.88
892025-02-08 06:58:38 [INFO] [The hard disk] OK on 192.168.6.88
902025-02-08 06:58:38 [INFO] [ping] chmod /bin/ping ...
912025-02-08 06:58:39 [INFO] [ping] chmod /bin/ping ... Done
922025-02-08 06:58:39 [INFO] [ping access] OK
932025-02-08 06:58:39 [INFO] [/bin/cp --version] on 192.168.6.88 OK
942025-02-08 06:58:39 [INFO] [Virtual IP] Not configured on 192.168.6.88
95[INSTALL] create the install dir "/KingbaseES/V9/cluster/kingbase" on every host ...
96[INSTALL] success to create the install dir "/KingbaseES/V9/cluster/kingbase" on "192.168.6.87" ..... OK
97[INSTALL] success to create the install dir "/KingbaseES/V9/cluster/kingbase" on "192.168.6.88" ..... OK
98[INSTALL] success to access the zip_package "/install/db.zip" on "192.168.6.87" ..... OK
99[INSTALL] decompress the "/install/db.zip" to "/KingbaseES/V9/cluster/kingbase/__tmp_decompress__"
100[INSTALL] success to recreate the tmp dir "/KingbaseES/V9/cluster/kingbase/__tmp_decompress__" on "192.168.6.87" ..... OK
101[INSTALL] success to decompress the "/install/db.zip" to "/KingbaseES/V9/cluster/kingbase/__tmp_decompress__" on "192.168.6.87"..... OK
102[INSTALL] scp the dir "/KingbaseES/V9/cluster/kingbase/__tmp_decompress__" to "/KingbaseES/V9/cluster/kingbase" on all host
103[INSTALL] try to copy the install dir "/KingbaseES/V9/cluster/kingbase" to "192.168.6.87" .....
104[INSTALL] success to scp the install dir "/KingbaseES/V9/cluster/kingbase" to "192.168.6.87" ..... OK
105[INSTALL] try to copy the install dir "/KingbaseES/V9/cluster/kingbase" to "192.168.6.88" .....
106[INSTALL] success to scp the install dir "/KingbaseES/V9/cluster/kingbase" to "192.168.6.88" ..... OK
107[INSTALL] remove the dir "/KingbaseES/V9/cluster/kingbase/__tmp_decompress__"
108[INSTALL] change the auth of bin directory on 192.168.6.87 ...
109[INSTALL] change the auth of bin directory on 192.168.6.88 ...
110[INSTALL] check license_file ...
111[INSTALL] success to access license_file on 192.168.6.87: /KingbaseES/V9/cluster/kingbase/bin/license.dat
112[INSTALL] check license_file ...
113[INSTALL] success to access license_file on 192.168.6.88: /KingbaseES/V9/cluster/kingbase/bin/license.dat
114[INSTALL] set the archive_command to "exit 0" and the archive dir is NULL
115[INSTALL] the archive dir is NULL, not do archive ...
116[INSTALL] create the dir "etc" "log" on all host
117[RUNNING] config sys_securecmdd and start it ...
118[RUNNING] config the sys_securecmdd port to 8890 ...
119[RUNNING] success to config the sys_securecmdd port on 192.168.6.87 ... OK
120successfully initialized the sys_securecmdd, please use "/KingbaseES/V9/cluster/kingbase/bin/sys_HAscmdd.sh start" to start the sys_securecmdd
121[RUNNING] success to config sys_securecmdd on 192.168.6.87 ... OK
122Created symlink /etc/systemd/system/multi-user.target.wants/securecmdd.service → /etc/systemd/system/securecmdd.service.
123[RUNNING] success to start sys_securecmdd on 192.168.6.87 ... OK
124[RUNNING] config sys_securecmdd and start it ...
125[RUNNING] config the sys_securecmdd port to 8890 ...
126[RUNNING] success to config the sys_securecmdd port on 192.168.6.88 ... OK
127successfully initialized the sys_securecmdd, please use "/KingbaseES/V9/cluster/kingbase/bin/sys_HAscmdd.sh start" to start the sys_securecmdd
128[RUNNING] success to config sys_securecmdd on 192.168.6.88 ... OK
129Created symlink /etc/systemd/system/multi-user.target.wants/securecmdd.service → /etc/systemd/system/securecmdd.service.
130[RUNNING] success to start sys_securecmdd on 192.168.6.88 ... OK
131[RUNNING] check if the host can be reached between all nodes by scmd ...
132[RUNNING] success connect to "192.168.6.87" from "192.168.6.87" by '/KingbaseES/V9/cluster/kingbase/bin/sys_securecmd' ... OK
133[RUNNING] success connect to "192.168.6.88" from "192.168.6.87" by '/KingbaseES/V9/cluster/kingbase/bin/sys_securecmd' ... OK
134[RUNNING] success connect to "192.168.6.87" from "192.168.6.88" by '/KingbaseES/V9/cluster/kingbase/bin/sys_securecmd' ... OK
135[RUNNING] success connect to "192.168.6.88" from "192.168.6.88" by '/KingbaseES/V9/cluster/kingbase/bin/sys_securecmd' ... OK
136[INSTALL] begin to init the database on "192.168.6.87" ...
137The database cluster will be initialized with locales
138 COLLATE: zh_CN.UTF-8
139 CTYPE: zh_CN.UTF-8
140 MESSAGES: C
141 MONETARY: zh_CN.UTF-8
142 NUMERIC: zh_CN.UTF-8
143 TIME: zh_CN.UTF-8
144The files belonging to this database system will be owned by user "kingbase".
145This user must also own the server process.
146
147The default text search configuration will be set to "simple".
148
149The comparision of strings is case-sensitive.
150Data page checksums are enabled.
151
152initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"
153fixing permissions on existing directory /data ... ok
154creating subdirectories ... ok
155selecting dynamic shared memory implementation ... posix
156selecting default max_connections ... 100
157selecting default shared_buffers ... 128MB
158selecting default time zone ... Asia/Shanghai
159creating configuration files ... ok
160Begin setup encrypt device
161initializing the encrypt device ... ok
162running bootstrap script ... ok
163performing post-bootstrap initialization ... ok
164create security database ... ok
165load security database ... ok
166syncing data to disk ... ok
167
168Success. You can now start the database server using:
169
170 /KingbaseES/V9/cluster/kingbase/bin/sys_ctl -D /data -l logfile start
171
172[INSTALL] end to init the database on "192.168.6.87" ... OK
173[INSTALL] wirte the kingbase.conf on "192.168.6.87" ...
174[INSTALL] wirte the kingbase.conf on "192.168.6.87" ... OK
175[INSTALL] wirte the es_rep.conf on "192.168.6.87" ...
176[INSTALL] wirte the es_rep.conf on "192.168.6.87" ... OK
177[INSTALL] wirte the sys_hba.conf on "192.168.6.87" ...
178[INSTALL] wirte the sys_hba.conf on "192.168.6.87" ... OK
179[INSTALL] wirte the .encpwd on every host
180[INSTALL] write the repmgr.conf on every host
181[INSTALL] write the repmgr.conf on "192.168.6.87" ...
182[INSTALL] write the repmgr.conf on "192.168.6.87" ... OK
183[INSTALL] write the repmgr.conf on "192.168.6.88" ...
184[INSTALL] write the repmgr.conf on "192.168.6.88" ... OK
185[INSTALL] start up the database on "192.168.6.87" ...
186[INSTALL] /KingbaseES/V9/cluster/kingbase/bin/sys_ctl -w -t 60 -l /KingbaseES/V9/cluster/kingbase/logfile -D /data start
187waiting for server to start.... done
188server started
189[INSTALL] start up the database on "192.168.6.87" ... OK
190[INSTALL] create the database "esrep" and user "esrep" for repmgr ...
191CREATE DATABASE
192CREATE ROLE
193GRANT
194GRANT ROLE
195[INSTALL] create the database "esrep" and user "esrep" for repmgr ... OK
196[INSTALL] register the primary on "192.168.6.87" ...
197[INFO] connecting to primary database...
198[NOTICE] attempting to install extension "repmgr"
199[NOTICE] "repmgr" extension successfully installed
200[NOTICE] primary node record (ID: 1) registered
201[INSTALL] register the primary on "192.168.6.87" ... OK
202[INSTALL] clone and start up the standby ...
203clone the standby on "192.168.6.88" ...
204/KingbaseES/V9/cluster/kingbase/bin/repmgr -h 192.168.6.87 -U esrep -d esrep -p 54321 --fast-checkpoint --upstream-node-id 1 standby clone
205[NOTICE] destination directory "/data" provided
206[INFO] connecting to source node
207[DETAIL] connection string is: host=192.168.6.87 user=esrep port=54321 dbname=esrep
208[DETAIL] current installation size is 87 MB
209[NOTICE] checking for available walsenders on the source node (2 required)
210[NOTICE] checking replication connections can be made to the source server (2 required)
211[INFO] checking and correcting permissions on existing directory "/data"
212[INFO] creating replication slot as user "esrep"
213[NOTICE] starting backup (using sys_basebackup)...
214[INFO] executing:
215 /KingbaseES/V9/cluster/kingbase/bin/sys_basebackup -l "repmgr base backup" -D /data -h 192.168.6.87 -p 54321 -U esrep -c fast -X stream -S repmgr_slot_2
216[NOTICE] standby clone (using sys_basebackup) complete
217[NOTICE] you can now start your Kingbase server
218[HINT] for example: sys_ctl -D /data start
219[HINT] after starting the server, you need to register this standby with "repmgr standby register"
220clone the standby on "192.168.6.88" ... OK
221start up the standby on "192.168.6.88" ...
222/KingbaseES/V9/cluster/kingbase/bin/sys_ctl -w -t 60 -l /KingbaseES/V9/cluster/kingbase/logfile -D /data start
223waiting for server to start.... done
224server started
225start up the standby on "192.168.6.88" ... OK
226register the standby on "192.168.6.88" ...
227[INFO] connecting to local node "node2" (ID: 2)
228[INFO] connecting to primary database
229[INFO] standby registration complete
230[NOTICE] standby node "node2" (ID: 2) successfully registered
231[INSTALL] register the standby on "192.168.6.88" ... OK
232[INSTALL] start up the whole cluster ...
2332025-02-08 07:00:44 Ready to start all DB ...
2342025-02-08 07:00:44 begin to start DB on "[192.168.6.87]".
2352025-02-08 07:00:45 DB on "[192.168.6.87]" already started, connect to check it.
2362025-02-08 07:00:47 DB on "[192.168.6.87]" start success.
2372025-02-08 07:00:47 Try to ping trusted_servers on host 192.168.6.87 ...
2382025-02-08 07:00:50 Try to ping trusted_servers on host 192.168.6.88 ...
2392025-02-08 07:00:53 begin to start DB on "[192.168.6.88]".
2402025-02-08 07:00:53 DB on "[192.168.6.88]" already started, connect to check it.
2412025-02-08 07:00:55 DB on "[192.168.6.88]" start success.
242 ID | Name | Role | Status | Upstream | Location | Priority | Timeline | LSN_Lag | Connection string
243----+-------+---------+-----------+----------+----------+----------+----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
244 1 | node1 | primary | * running | | default | 100 | 1 | | host=192.168.6.87 user=esrep dbname=esrep port=54321 connect_timeout=10 keepalives=1 keepalives_idle=2 keepalives_interval=2 keepalives_count=3 tcp_user_timeout=9000
245 2 | node2 | standby | running | node1 | default | 100 | 1 | 0 bytes | host=192.168.6.88 user=esrep dbname=esrep port=54321 connect_timeout=10 keepalives=1 keepalives_idle=2 keepalives_interval=2 keepalives_count=3 tcp_user_timeout=9000
2462025-02-08 07:00:55 The primary DB is started.
2472025-02-08 07:00:55 begin to start repmgrd on "[192.168.6.87]".
248[2025-02-08 07:00:56] [NOTICE] using provided configuration file "/KingbaseES/V9/cluster/kingbase/bin/../etc/repmgr.conf"
249[2025-02-08 07:00:56] [NOTICE] redirecting logging output to "/KingbaseES/V9/cluster/kingbase/log/hamgr.log"
250
2512025-02-08 07:00:58 repmgrd on "[192.168.6.87]" start success.
2522025-02-08 07:00:58 begin to start repmgrd on "[192.168.6.88]".
253[2025-02-08 06:59:49] [NOTICE] using provided configuration file "/KingbaseES/V9/cluster/kingbase/bin/../etc/repmgr.conf"
254[2025-02-08 06:59:49] [NOTICE] redirecting logging output to "/KingbaseES/V9/cluster/kingbase/log/hamgr.log"
255
2562025-02-08 07:01:01 repmgrd on "[192.168.6.88]" start success.
257 ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
258----+-------+---------+-----------+----------+---------+-------+---------+--------------------
259 1 | node1 | primary | * running | | running | 60877 | no | n/a
260 2 | node2 | standby | running | node1 | running | 68396 | no | 1 second(s) ago
261[2025-02-08 07:01:04] [NOTICE] redirecting logging output to "/KingbaseES/V9/cluster/kingbase/log/kbha.log"
262
263[2025-02-08 06:59:59] [NOTICE] redirecting logging output to "/KingbaseES/V9/cluster/kingbase/log/kbha.log"
264
2652025-02-08 07:01:11 Done.
266[INSTALL] start up the whole cluster ... OK