说明:ZCBUS集群部署

后台任务 数据缓存区 数据库管理 前台任务操作数据库灾备发布/订阅发布/订阅发布/订阅zcbus交换服务zcbuskafka 1zcbuskafka 2zcbuskafka 3zcbuszookeeper 1zcbuszookeeper 2zcbuszookeeper 3zcbusdbzcbusdb2nginxzcbusvuezcbusrestapiZCBUS平台

环境准备

主机 配置说明
物理配置 cpu 4核以上,内存4GB以上,磁盘100GB以上
操作系统 LINUX(centos7)
网络 数据交换服务器,需要和需要共享数据的数据库、大数据平台之间,网络设备畅通。如果存在网络不畅通情况下,必须通过前置机畅通,通过前置机跳转实现数据交换服务。

环境检查

  • 防火墙服务检查
    检查防火墙是否启动:
    systemctl status firewalld.service
    停止防火墙服务:
    systemctl stop firewalld.service
    禁用防火墙开机启动服务:
    systemctl disable firewalld.service
  • 主机名检查,三个主机名不允许一样,否则安装时会提示以下报错中断安装:

软件下载

集群配置文件
  • ssh.conf
 [root@localhost conf]# cat ssh.conf 
#ssh_trust
[host1]
name=node01
host=192.168.59.132
port=22
user=root
password=1qaz!QAZ

[host2]
name=node02
host=192.168.59.129
port=22
user=root
password=1qaz!QAZ

[host3]
name=node03
host=192.168.59.133
port=22
user=root
password=1qaz!QAZ
  • grid.ini

#kafka_cluster
kafka_ports="12181 12888 13888 19092"

## 集群软件安装目录
zcbus_data_path="/data/zc01"

## kafka副本数
FACTOR_NUM=2

## kafka内存,单位:G
KAFKA_MEM=1

ZOOK_PORT_1=`echo "${kafka_ports}"|awk '{print $1}'`
ZOOK_PORT_2=`echo "${kafka_ports}"|awk '{print $2}'`
ZOOK_PORT_3=`echo "${kafka_ports}"|awk '{print $3}'`
KAFKA_PORT=`echo "${kafka_ports}"|awk '{print $4}'`
KAFKA_DIR="${zcbus_data_path}/kafka/data/kafka-logs"
ZOOK_DIR="${zcbus_data_path}/kafka/data/zookeeper"

## KAFKA部署节点位置
ZCBUS_KAFKA=host1,host2,host3 

## ZCBUS管理节点主备位置
ZCBUS_MASTER=host1
ZCBUS_SLAVE=host2
节点配置文件
  • zcbus.properties
#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ZCBUS INSTALL home ,for storage docker's cache and images 
#-------------------------------------------------------------------------------
ZC_DATA_HOME=/data/zcbus

#-------------------------------------------------------------------------------
# Specify a location to install ZCBUS'S TYPE 
#-------------------------------------------------------------------------------
ZC_TYPE=server

#-------------------------------------------------------------------------------
# Zcbus client remote location API service URL connection service
#-------------------------------------------------------------------------------
ZC_CUSTOMER_URL=http://v2.zbomc.com

#-------------------------------------------------------------------------------
# Remote receiving zcbus data stream port service
#-------------------------------------------------------------------------------
ZC_CACHE_SERVER=192.168.59.129:19092;192.168.59.132:19092;192.168.59.133:19092

#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_DBNAME=zcbus
ZC_NET_DB_SERVER_HOST=zcbusnet
ZC_NET_DB_SERVER_PORT=33060
ZC_NET_DB_SERVER_USER=QFlYT0k6
ZC_NET_DB_SERVER_PWD=e0twWGp8aVtWfGB8dn9YdTo
ZC_NET_DB_SERVER_ID=1

#-------------------------------------------------------------------------------
# Remote install zcbus type integrate/external
#-------------------------------------------------------------------------------
ZC_METHOD=external

#-------------------------------------------------------------------------------
# Remote install zcbus include database docker 
# 0 is equal ZC_METHOD's integrate mode,all server include docker,and other is external mode
# 1 is include zcbusvue/zcbusrestapi
# 2 is include zcbusvue/zcbusrestapi,zcbusdb
# 3 is include zcbusvue/zcbusrestapi,zcbuskafka/zcbuszookeeper
#-------------------------------------------------------------------------------
ZC_SERV_LOCALTION=2

安装部署日志

  • zcsrv.sh
[root@localhost grid]# ./zcsrv.sh install

[Step 1]: set shh trust ...
? install sshpass
? install sshpass successfully ...
? shh trust
Linux node01 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ssh_trust: Release 7.8-16 64 bit (QA) - Production on 2022-12-02 15:31:03
Copyright (c) 2022 ZCBUS. All Rights Reserved.
process id 257264
Mon Dec 26 17:38:06 PST 2022
Mon Dec 26 17:38:06 PST 2022
Mon Dec 26 17:38:07 PST 2022
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:IRQhFTSyXIzbWoRRqcpKJY+Ik5kM+ssOYG9S292YMsM root@node01
The key's randomart image is:
+---[RSA 2048]----+
|    +O@=         |
|   .o*+.         |
|    o=. .        |
|.. .o o. .       |
|B*=o o  S        |
|@+=.= . +        |
|o= + E + .       |
|.o+   +          |
| .+.             |
+----[SHA256]-----+
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:09dzbYTbne/V/tMVO35dUJVSoBkQsAmmRib0xbYjGBg root@node02
The key's randomart image is:
+---[RSA 2048]----+
|E+ o.+ ..oo. .o.+|
|..= +o. o   +. o.|
|  o+. .o   o  o..|
| ... o   .   ..=+|
|    . . S . . +oO|
|         . .   *=|
|              . X|
|               ==|
|                B|
+----[SHA256]-----+
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:1ws91j7Bstw9n1QVrRoDTA8rSkD9Tbu2Eufs2cwXP5Y root@node03
The key's randomart image is:
+---[RSA 2048]----+
|   .o.   oo    ..|
|     ..   ++    o|
|      ...o.o.  ..|
|     . ...oooo. .|
|      . S o.*++ .|
|        ..++.B.o.|
|         * .+ +=o|
|        . +=  oE=|
|         oo +...o|
+----[SHA256]-----+
Mon Dec 26 17:38:15 PST 2022
Mon Dec 26 17:38:15 PST 2022
Mon Dec 26 17:38:16 PST 2022
Mon Dec 26 17:38:16 PST 2022
Mon Dec 26 17:38:16 PST 2022
Mon Dec 26 17:38:17 PST 2022
Mon Dec 26 17:38:17 PST 2022
Mon Dec 26 17:38:18 PST 2022
Mon Dec 26 17:38:18 PST 2022
? shh trust successfully ...

[Step 2]: check check hostname info ...

Note: Check Node 192.168.59.132's hostname...

Note: Check Node 192.168.59.129's hostname...

Note: Check Node 192.168.59.133's hostname...

Note: Check Hostname for 192.168.59.132
192.168.59.129
192.168.59.133 ok ...

[Step 3]: check install dirs ...

Note: 192.168.59.132
? Dir /data/zc01 is not exist,mkdir it!!
? mkdir /data/zc01 successfully ...

Note: 192.168.59.129
? Dir /data/zc01 is not exist,mkdir it!!
? mkdir /data/zc01 successfully ...

Note: 192.168.59.133
? Dir /data/zc01 is not exist,mkdir it!!
? mkdir /data/zc01 successfully ...

[Step 4]: check ports for 192.168.59.132 ...

Note: 192.168.59.132
? Port 12181 is available!!
? Port 12888 is available!!
? Port 13888 is available!!
? Port 19092 is available!!

[Step 5]: check ports for 192.168.59.129 ...

Note: 192.168.59.129
? Port 12181 is available!!
? Port 12888 is available!!
? Port 13888 is available!!
? Port 19092 is available!!

[Step 6]: check ports for 192.168.59.133 ...

Note: 192.168.59.133
? Port 12181 is available!!
? Port 12888 is available!!
? Port 13888 is available!!
? Port 19092 is available!!

[Step 7]: install kafka cluster for 192.168.59.132 ...

Note: install kafka cluster for 192.168.59.132
? config zookeeper
? config zookeeper successfully ...
? config kafka
? config kafka successfully ...
? cp kafka

Note: ready send directory ./bin/kafka

Note: Copying ./bin/kafka  to  192.168.59.132:/data/zc01
? cp kafka successfully ...

[Step 8]: install kafka cluster for 192.168.59.129 ...

Note: install kafka cluster for 192.168.59.129
? config zookeeper
? config zookeeper successfully ...
? config kafka
? config kafka successfully ...
? cp kafka

Note: ready send directory ./bin/kafka

Note: Copying ./bin/kafka  to  192.168.59.129:/data/zc01
? cp kafka successfully ...

[Step 9]: install kafka cluster for 192.168.59.133 ...

Note: install kafka cluster for 192.168.59.133
? config zookeeper
? config zookeeper successfully ...
? config kafka
? config kafka successfully ...
? cp kafka

Note: ready send directory ./bin/kafka

Note: Copying ./bin/kafka  to  192.168.59.133:/data/zc01
? cp kafka successfully ...

[Step 10]: check os for 192.168.59.132 ...

Note: check os

[Step 11]: start zookeepre cluster for 192.168.59.132 ...

Note: start zookeeper

[Step 12]: start kafka cluster for 192.168.59.132 ...

Note: start kafka 

[Step 13]: check kafka cluster for 192.168.59.132 ...

Note: check kafka 

[Step 14]: check os for 192.168.59.129 ...

Note: check os

[Step 15]: start zookeepre cluster for 192.168.59.129 ...

Note: start zookeeper

[Step 16]: start kafka cluster for 192.168.59.129 ...

Note: start kafka 

[Step 17]: check kafka cluster for 192.168.59.129 ...

Note: check kafka 

[Step 18]: check os for 192.168.59.133 ...

Note: check os

[Step 19]: start zookeepre cluster for 192.168.59.133 ...

Note: start zookeeper

[Step 20]: start kafka cluster for 192.168.59.133 ...

Note: start kafka 

[Step 21]: check kafka cluster for 192.168.59.133 ...

Note: check kafka 

[Step 22]: send for clear log mode 192.168.59.132 ...

[Step 23]: send zcbus files to 192.168.59.132 ...

Note: ready send directory ./soft/simple_server

Note: Copying ./soft/simple_server  to  192.168.59.132:/data/zc01/simple_server

[Step 24]: send for clear log mode 192.168.59.129 ...

[Step 25]: send zcbus files to 192.168.59.129 ...

Note: ready send directory ./soft/simple_server

Note: Copying ./soft/simple_server  to  192.168.59.129:/data/zc01/simple_server

[Step 26]: send for clear log mode 192.168.59.133 ...

[Step 27]: send zcbus files to 192.168.59.133 ...

Note: ready send directory ./soft/simple_server

Note: Copying ./soft/simple_server  to  192.168.59.133:/data/zc01/simple_server

[Step 28]: check cfg file to 192.168.59.132 ...

[Step 29]: send cfg file to 192.168.59.132 ...

Note: ready send file /tmp/zcbus/zcbus.properties.192.168.59.132

Note: Copying /tmp/zcbus/zcbus.properties.192.168.59.132  to  192.168.59.132:/data/zc01/simple_server/common/zcbus.properties

[Step 30]: check cfg file to 192.168.59.129 ...

[Step 31]: send cfg file to 192.168.59.129 ...

Note: ready send file /tmp/zcbus/zcbus.properties.192.168.59.129

Note: Copying /tmp/zcbus/zcbus.properties.192.168.59.129  to  192.168.59.129:/data/zc01/simple_server/common/zcbus.properties

[Step 32]: check cfg file to 192.168.59.133 ...

[Step 33]: send cfg file to 192.168.59.133 ...

Note: ready send file /tmp/zcbus/zcbus.properties.192.168.59.133

Note: Copying /tmp/zcbus/zcbus.properties.192.168.59.133  to  192.168.59.133:/data/zc01/simple_server/common/zcbus.properties

[Step 34]: install zcbus docker for 192.168.59.133 ...

Note: 192.168.59.132
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
sed: can't read common/zcbus.yml: No such file or directory
? For slient install by /data/zc01/simple_server/common/zcbus.properties ...
############################## check host ::: /etc/hosts #############################################
? check host ::: 1 ::: OK
? 192.168.59.132 node01
############################## check selinux ::: /etc/selinux/config #################################
? check selinux ::: disabled ::: OK
setenforce: SELinux is disabled
############################## check firewalld #######################################################
? check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
? kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
? fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
? fs.file-max ::: 6815744 (>=6815744) ::: OK
? kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
? kernel.shmmni ::: 4096 (>=4096) ::: OK
? kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
? net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
? net.core.rmem_default ::: 262144 (>=262144) ::: OK
? net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
? net.core.wmem_default ::: 262144 (>=262144) ::: OK
? net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
? kernel.threads-max ::: 999999 (>=999999) ::: OK
? kernel.pid_max ::: 999999 (>=999999) ::: OK
? vm.max_map_count ::: 1999999 (>=1999999) ::: OK
? net.ipv4.ip_forward ::: 1 (>=1) ::: OK
? fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
? fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
? soft-nofile ::: 1048500 (>=1048500) ::: OK
? hard-nofile ::: 1048500 (>=1048500) ::: OK
? soft-nproc ::: 65536 (>=65536) ::: OK
? hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
? OK : 24 ERROR : 0 WARNING : 0

[Step 1]: ready for data dir path ...
? Find path /data/zcbus
? Ready Path for /data/zcbus finished ...

[Step 2]: checking if docker is installed ...
############################## docker version: 19.03.15 ##############################################

[Step 3]: checking docker-compose is installed ...
############################## docker-compose version: 1.25.0 ########################################

[Step 4]: checking docker service status...
● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-12-26 17:37:11 PST; 4min 10s ago
     Docs: https://docs.docker.com
 Main PID: 257096 (dockerd)
    Tasks: 22
   Memory: 65.5M
   CGroup: /system.slice/docker.service
           ├─257096 /usr/bin/dockerd --selinux-enabled=false --graph=/data/zcbus/zcbusdata
           └─257106 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.114212559-08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.114223238-08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.114248697-08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.129308594-08:00" level=info msg="Loading containers: start."
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.189552838-08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.221854636-08:00" level=info msg="Loading containers: done."
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.235289449-08:00" level=info msg="Docker daemon" commit=99e3ed8 graphdriver(s)=overlay2 version=19.03.15
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.235383693-08:00" level=info msg="Daemon has completed initialization"
Dec 26 17:37:11 node01 dockerd[257096]: time="2022-12-26T17:37:11.247276138-08:00" level=info msg="API listen on /var/run/docker.sock"
Dec 26 17:37:11 node01 systemd[1]: Started Docker Application Container Engine.
? check docker service is running ...

[Step 5]: checking mysql directory ...
############################## Create directory mysql /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/mysql/data create Successful! 

[Step 6]: checking kafka directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Kafka data directory /data/zcbus/zcbusdata/zcbuskafka/logs create Successful! 

[Step 7]: checking cache directory ...
############################## Create directory cache /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/cache create Successful! 

[Step 8]: checking zookeeper directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Zookeeoer data directory /data/zcbus/zcbusdata/zcbuszookeeper/data create Successful! 

[Step 9]: loading zcbus images ...
docker load -i /data/zc01/simple_server/soft/zcbus.tar.gz
Loaded image: reg.zbomc.com/zcbus_zookeeper:v2.0.1
Loaded image: reg.zbomc.com/zcbus/prepare:latest
Loaded image: reg.zbomc.com/zcbus_server:v2.0.1
Loaded image: reg.zbomc.com/zcbus_vue:v2.0.1
Loaded image: reg.zbomc.com/zcbus_restapi:v2.0.1
Loaded image: reg.zbomc.com/zcbus_mysql:v2.0.1
Loaded image: reg.zbomc.com/zcbus_kafka:v2.0.1
? Load images to docker's sucessfull...
? 
0b62b48f73715637312239d1f49330148b54921286dc76d9e2d6d0123e553c4a
? network zcbus is create sucessfull...
? set auto_aux_start = 1
Check hostname [node01]'s ip is :[192.168.59.132]
===>conf:[ /input/zcbus.yml ] ,oper :[ init ] ,customerid :[ 0 ], zcbus:[ zcbus ],zctype:[ server ],kafka_server:[ 192.168.59.129:19092;192.168.59.132:19092;192.168.59.133:19092 ],zc_serv_localtion 2 <===
ready basic info ...
Finish init basic ...
? prepare server Sucessfull...
? 
? 

[Step 10]: checking if ports is used ...
? Port  8890 is available!!
? Port  3306 is available!!

[Step 11]: ready basic soft for container ...
? Ready compare soft ...
? Read zcbusserver jdk sucessfull....
? Read zcbusserver jar sucessfull....
? Read zcbusserver bin sucessfull....
? Read zcbusserver lib sucessfull....
? /data/zcbus/module/lib to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/bin to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jdk to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jar to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...

[Step 12]: starting zcbus ...
Creating zcbusvue     ... done
Creating zcbusdb      ... done
Creating zcbusrestapi ... done

====>>>ZCBUS [ Mon Dec 26 17:42:20 PST 2022 ]
    Name                 Command             State              Ports           
--------------------------------------------------------------------------------
zcbusdb        docker-entrypoint.sh          Up      0.0.0.0:3306->3306/tcp,    
               /run.sh                               33060/tcp                  
zcbusrestapi   sh /run.sh                    Up      7080/tcp                   
zcbusvue       /docker-entrypoint.sh /bin    Up      0.0.0.0:8890->80/tcp       
               ...                                                              
? 

[Step 12]: ready basic soft for basic zcbus_docker server ...
Check hostname [node01]'s ip is :[192.168.59.132]
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified

Note: add zcbus_docker service
grep db_external_port /data/zc01/simple_server/common/zcbus.yml|awk -F : '{print }' |sed 's/ //g'
? Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
? sdbinfo :QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@192.168.59.132:3306/zcbus...
[LV0] 2022-12-26 17:42:22: connect to mysql zcbus/***@192.168.59.132:3306 ...
error at file[mysql/mysql.c] line[46], ZCBUS-20000: mysql connect failed: Can't connect to MySQL server on '192.168.59.132' (111)
error at file[mysql/mysql.c] line[118], ZCBUS-20000: mysql connect failed: Can't connect to MySQL server on '192.168.59.132' (111)
error at file[db.c] line[413], ZCBUS-20000: mysql connect failed: Can't connect to MySQL server on '192.168.59.132' (111)
[ERR] connection test failed, ZCBUS-20000: mysql connect failed: Can't connect to MySQL server on '192.168.59.132' (111)
? Test zcbus_docker Connect to zcbus_master.ini failed retry 10 seconds...
Check hostname [node01]'s ip is :[192.168.59.132]
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified

Note: add zcbus_docker service
grep db_external_port /data/zc01/simple_server/common/zcbus.yml|awk -F : '{print }' |sed 's/ //g'
? Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
? sdbinfo :QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@192.168.59.132:3306/zcbus...
[LV0] 2022-12-26 17:42:32: connect to mysql zcbus/***@192.168.59.132:3306 ...
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50732
[INF] MYSQL INFO: 5.7.32-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
[INF] connection test ok.
? Test zcbus_docker Connect to zcbus_master.ini Sucessfull...
? =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
zcbus_host=192.168.59.132
zcbus_port=3306
zcbus_user=******
zcbus_password=******
zcbus_db=zcbus

archive log /data/zc01/simple_server/log/log.docker ---> /data/zc01/simple_server/log/archive/log.docker.20221226174233
? =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
kill -9 263601...
zcbus_docker is Finished ...
zcbus_host=192.168.59.132
zcbus_port=3306
zcbus_user=******
zcbus_password=******
zcbus_db=zcbus

archive log /data/zc01/simple_server/log/log.docker ---> /data/zc01/simple_server/log/archive/log.docker.20221226174235
? Manager console Website Address: http://192.168.59.132:8890
? Default login account : admin
? Default login password: 123456
? 
? =======================================
? ----Zcbus has been installed and started successfully.----
? Install Zcbus  success !!!

Note: 192.168.59.129
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
sed: can't read common/zcbus.yml: No such file or directory
? For slient install by /data/zc01/simple_server/common/zcbus.properties ...
############################## check host ::: /etc/hosts #############################################
? check host ::: 1 ::: OK
? 192.168.59.129 node02
############################## check selinux ::: /etc/selinux/config #################################
? check selinux ::: disabled ::: OK
############################## check firewalld ################setenforce: SELinux is disabled
#######################################
? check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
? kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
? fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
? fs.file-max ::: 6815744 (>=6815744) ::: OK
? kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
? kernel.shmmni ::: 4096 (>=4096) ::: OK
? kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
? net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
? net.core.rmem_default ::: 262144 (>=262144) ::: OK
? net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
? net.core.wmem_default ::: 262144 (>=262144) ::: OK
? net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
? kernel.threads-max ::: 999999 (>=999999) ::: OK
? kernel.pid_max ::: 999999 (>=999999) ::: OK
? vm.max_map_count ::: 1999999 (>=1999999) ::: OK
? net.ipv4.ip_forward ::: 1 (>=1) ::: OK
? fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
? fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
? soft-nofile ::: 1048500 (>=1048500) ::: OK
? hard-nofile ::: 1048500 (>=1048500) ::: OK
? soft-nproc ::: 65536 (>=65536) ::: OK
? hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
? OK : 24 ERROR : 0 WARNING : 0

[Step 1]: ready for data dir path ...
? Find path /data/zcbus
? Ready Path for /data/zcbus finished ...

[Step 2]: checking if docker is installed ...
############################## docker version: 19.03.15 ##############################################

[Step 3]: checking docker-compose is installed ...
############################## docker-compose version: 1.25.0 ########################################

[Step 4]: checking docker service status...
● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-12-26 17:37:12 PST; 5min ago
     Docs: https://docs.docker.com
 Main PID: 282575 (dockerd)
    Tasks: 21
   Memory: 49.2M
   CGroup: /system.slice/docker.service
           ├─282575 /usr/bin/dockerd --selinux-enabled=false --graph=/data/zcbus/zcbusdata
           └─282586 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.438787845-08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.438797763-08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.438805299-08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.450850169-08:00" level=info msg="Loading containers: start."
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.498881554-08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.531172098-08:00" level=info msg="Loading containers: done."
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.544743322-08:00" level=info msg="Docker daemon" commit=99e3ed8 graphdriver(s)=overlay2 version=19.03.15
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.544826550-08:00" level=info msg="Daemon has completed initialization"
Dec 26 17:37:12 node02 dockerd[282575]: time="2022-12-26T17:37:12.557921036-08:00" level=info msg="API listen on /var/run/docker.sock"
Dec 26 17:37:12 node02 systemd[1]: Started Docker Application Container Engine.
? check docker service is running ...

[Step 5]: checking mysql directory ...
############################## Create directory mysql /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/mysql/data create Successful! 

[Step 6]: checking kafka directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Kafka data directory /data/zcbus/zcbusdata/zcbuskafka/logs create Successful! 

[Step 7]: checking cache directory ...
############################## Create directory cache /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/cache create Successful! 

[Step 8]: checking zookeeper directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Zookeeoer data directory /data/zcbus/zcbusdata/zcbuszookeeper/data create Successful! 

[Step 9]: loading zcbus images ...
docker load -i /data/zc01/simple_server/soft/zcbus.tar.gz
Loaded image: reg.zbomc.com/zcbus_zookeeper:v2.0.1
Loaded image: reg.zbomc.com/zcbus/prepare:latest
Loaded image: reg.zbomc.com/zcbus_server:v2.0.1
Loaded image: reg.zbomc.com/zcbus_vue:v2.0.1
Loaded image: reg.zbomc.com/zcbus_restapi:v2.0.1
Loaded image: reg.zbomc.com/zcbus_mysql:v2.0.1
Loaded image: reg.zbomc.com/zcbus_kafka:v2.0.1
? Load images to docker's sucessfull...
? 
39173eff61a2a47bf5b90dafd216b430411c7e7f9844f3573bc8bc709cd49705
? network zcbus is create sucessfull...
? set auto_aux_start = 1
Check hostname [node02]'s ip is :[192.168.59.129]
===>conf:[ /input/zcbus.yml ] ,oper :[ init ] ,customerid :[ 0 ], zcbus:[ zcbus ],zctype:[ server ],kafka_server:[ 192.168.59.129:19092;192.168.59.132:19092;192.168.59.133:19092 ],zc_serv_localtion 2 <===
ready basic info ...
Finish init basic ...
? prepare server Sucessfull...
? 
? 

[Step 10]: checking if ports is used ...
? Port  8890 is available!!
? Port  3306 is available!!

[Step 11]: ready basic soft for container ...
? Ready compare soft ...
? Read zcbusserver jdk sucessfull....
? Read zcbusserver jar sucessfull....
? Read zcbusserver bin sucessfull....
? Read zcbusserver lib sucessfull....
? /data/zcbus/module/lib to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/bin to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jdk to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jar to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...

[Step 12]: starting zcbus ...
Creating zcbusrestapi ... done
Creating zcbusvue     ... done
Creating zcbusdb      ... done

====>>>ZCBUS [ Mon Dec 26 17:43:40 PST 2022 ]
    Name                 Command             State              Ports           
--------------------------------------------------------------------------------
zcbusdb        docker-entrypoint.sh          Up      0.0.0.0:3306->3306/tcp,    
               /run.sh                               33060/tcp                  
zcbusrestapi   sh /run.sh                    Up      7080/tcp                   
zcbusvue       /docker-entrypoint.sh /bin    Up      0.0.0.0:8890->80/tcp       
               ...                                                              
? 

[Step 12]: ready basic soft for basic zcbus_docker server ...
Check hostname [node02]'s ip is :[192.168.59.129]
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified

Note: add zcbus_docker service
grep db_external_port /data/zc01/simple_server/common/zcbus.yml|awk -F : '{print }' |sed 's/ //g'
? Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
? sdbinfo :QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@192.168.59.132:3306/zcbus...
[LV0] 2022-12-26 17:43:43: connect to mysql zcbus/***@192.168.59.132:3306 ...
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50732
[INF] MYSQL INFO: 5.7.32-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
[INF] connection test ok.
? Test zcbus_docker Connect to zcbus_master.ini Sucessfull...
? =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
zcbus_host=192.168.59.132
zcbus_port=3306
zcbus_user=******
zcbus_password=******
zcbus_db=zcbus

archive log /data/zc01/simple_server/log/log.docker ---> /data/zc01/simple_server/log/archive/log.docker.20221226174344
? Manager console Website Address: http://192.168.59.129:8890
? Default login account : admin
? Default login password: 123456
? 
? =======================================
? ----Zcbus has been installed and started successfully.----
? Install Zcbus  success !!!

Note: 192.168.59.133
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
sed: can't read common/zcbus.yml: No such file or directory
? For slient install by /data/zc01/simple_server/common/zcbus.properties ...
############################## check host ::: /etc/hosts #############################################
? check host ::: 1 ::: OK
? 192.168.59.133 node03
############################## check selinux ::: /etc/selinux/config #################################
? check selinux ::: disabled ::: OK
############################## check firewalld #######################################################
? check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
? kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
? fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
? fs.file-max ::: 6815744 (>=6815744) ::: OK
? kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
? kernel.shmmni ::: 4096 (>=4096) ::: OK
? kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
? net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
? net.core.rmem_default ::: 262144 (>=262144) ::: OK
? net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
? net.core.wmem_default ::: 262144 (>=262144) ::: OK
? net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
? kernel.threads-max ::: 999999 (>=999999) ::: OK
? kernel.pid_max ::: 999999 (>=999999) ::: OK
? vm.max_map_count ::: 1999999 (>=1999999) ::: OK
? net.ipv4.ip_forward ::: 1 (>=1) ::: OK
? fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
? fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
? soft-nofile ::: 1048500 (>=1048500) ::: OK
? hard-nofile ::: 1048500 (>=1048500) ::: OK
? soft-nproc ::: 65536 (>=65536) ::: OK
? hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
? OK : 24 ERROR : 0 WARNING : 0

[Step 1]: ready for data dir path ...
? Find path /data/zcbus
? Ready Path for /data/zcbus finished ...

[Step 2]: checking if docker is installed ...
############################## docker version: 19.03.15 ##############################################

[Step 3]: checking docker-compose is installed ...
############################## docker-compose version: 1.25.0 ########################################

[Step 4]: checking docker service status...
● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-12-26 17:37:14 PST; 6min ago
     Docs: https://docs.docker.com
 Main PID: 160379 (dockerd)
    Tasks: 17
   Memory: 66.2M
   CGroup: /system.slice/docker.service
           ├─160379 /usr/bin/dockerd --selinux-enabled=false --graph=/data/zcbus/zcbusdata
           └─160390 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.173787853-08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.173798665-08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.173804708-08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.191143844-08:00" level=info msg="Loading containers: start."
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.249410151-08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.274683158-08:00" level=info msg="Loading containers: done."
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.290096780-08:00" level=info msg="Docker daemon" commit=99e3ed8 graphdriver(s)=overlay2 version=19.03.15
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.290198542-08:00" level=info msg="Daemon has completed initialization"
Dec 26 17:37:14 node03 systemd[1]: Started Docker Application Container Engine.
Dec 26 17:37:14 node03 dockerd[160379]: time="2022-12-26T17:37:14.305407186-08:00" level=info msg="API listen on /var/run/docker.sock"
? check docker service is running ...

[Step 5]: checking mysql directory ...
############################## Create directory mysql /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/mysql/data create Successful! 

[Step 6]: checking kafka directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Kafka data directory /data/zcbus/zcbusdata/zcbuskafka/logs create Successful! 

[Step 7]: checking cache directory ...
############################## Create directory cache /data/zcbus/zcbusdata .... #####################
? Mysql data directory  /data/zcbus/zcbusdata/cache create Successful! 

[Step 8]: checking zookeeper directory ...
############################## Create directory kafka /data/zcbus/zcbusdata/kafka .... ###############
? Zookeeoer data directory /data/zcbus/zcbusdata/zcbuszookeeper/data create Successful! 

[Step 9]: loading zcbus images ...
docker load -i /data/zc01/simple_server/soft/zcbus.tar.gz
Loaded image: reg.zbomc.com/zcbus_zookeeper:v2.0.1
Loaded image: reg.zbomc.com/zcbus/prepare:latest
Loaded image: reg.zbomc.com/zcbus_server:v2.0.1
Loaded image: reg.zbomc.com/zcbus_vue:v2.0.1
Loaded image: reg.zbomc.com/zcbus_restapi:v2.0.1
Loaded image: reg.zbomc.com/zcbus_mysql:v2.0.1
Loaded image: reg.zbomc.com/zcbus_kafka:v2.0.1
? Load images to docker's sucessfull...
? 
fb76a14fbd6c9f24078b3244f93d94263a7cc6936da6313583458d1ec8efc4e1
? network zcbus is create sucessfull...
? set auto_aux_start = 1
Check hostname [node03]'s ip is :[192.168.59.133]
===>conf:[ /input/zcbus.yml ] ,oper :[ init ] ,customerid :[ 0 ], zcbus:[ zcbus ],zctype:[ server ],kafka_server:[ 192.168.59.129:19092;192.168.59.132:19092;192.168.59.133:19092 ],zc_serv_localtion 1 <===
ready basic info ...
Finish init basic ...
? prepare server Sucessfull...
? 
? 

[Step 10]: checking if ports is used ...
? Port  8890 is available!!

[Step 11]: ready basic soft for container ...
? Ready compare soft ...
? Read zcbusserver jdk sucessfull....
? Read zcbusserver jar sucessfull....
? Read zcbusserver bin sucessfull....
? Read zcbusserver lib sucessfull....
? /data/zcbus/module/lib to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/bin to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jdk to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
? /data/zcbus/module/jar to /data/zcbus/zcbusdata/zcbusserver/ is build sucessfull...

[Step 12]: starting zcbus ...
Creating zcbusrestapi ... done
Creating zcbusvue     ... done

====>>>ZCBUS [ Mon Dec 26 17:44:57 PST 2022 ]
    Name                  Command               State          Ports        
----------------------------------------------------------------------------
zcbusrestapi   sh /run.sh                       Up      7080/tcp            
zcbusvue       /docker-entrypoint.sh /bin ...   Up      0.0.0.0:8890->80/tcp
? 

[Step 12]: ready basic soft for basic zcbus_docker server ...
Check hostname [node03]'s ip is :[192.168.59.133]
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified

Note: add zcbus_docker service
grep db_external_port /data/zc01/simple_server/common/zcbus.yml|awk -F : '{print }' |sed 's/ //g'
? Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
? sdbinfo :QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@192.168.59.132:3306/zcbus...
[LV0] 2022-12-26 17:44:59: connect to mysql zcbus/***@192.168.59.132:3306 ...
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50732
[INF] MYSQL INFO: 5.7.32-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
[INF] connection test ok.
? Test zcbus_docker Connect to zcbus_master.ini Sucessfull...
? =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
zcbus_host=192.168.59.132
zcbus_port=3306
zcbus_user=******
zcbus_password=******
zcbus_db=zcbus

archive log /data/zc01/simple_server/log/log.docker ---> /data/zc01/simple_server/log/archive/log.docker.20221226174459
? Manager console Website Address: http://192.168.59.133:8890
? Default login account : admin
? Default login password: 123456
? 
? =======================================
? ----Zcbus has been installed and started successfully.----
? Install Zcbus  success !!!

[Step 35]: ready master replication info ...

Note: ready for master host1:192.168.59.132

Note: ready send file /tmp/zcbus/create_rs_user.sh

Note: Copying /tmp/zcbus/create_rs_user.sh  to  192.168.59.132:/tmp/zcbus/

Note: Ready Master info 

[Step 36]: ready slave replication info ...

Note: ready send file /tmp/zcbus/sync_master_data.sh

Note: Copying /tmp/zcbus/sync_master_data.sh  to  192.168.59.129:/tmp/zcbus/

Note: Start Init Full Data Sync

Note: ready send file /tmp/zcbus/zc_sync_slave.sh

Note: Copying /tmp/zcbus/zc_sync_slave.sh  to  192.168.59.129:/tmp/zcbus/

Note: Running Slave for 192.168.59.129
zcbusrestapi is up-to-date
zcbusvue is up-to-date
Recreating zcbusdb ... done
zcbusdb
===> drop database zcbus ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
===> create database zcbus ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
===> lock tables ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
===> begin back database ...
mysqldump: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
execute sucessfull...
===> Get Master logs ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
===> unlock tables ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
===> start load data to zcbus ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
file my-bin.000003 . position 874089 ...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
sleep(3)
0
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.59.132
                  Master_User: zcbus_ref
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: my-bin.000003
          Read_Master_Log_Pos: 874089
               Relay_Log_File: 29b5ad66cfef-relay-bin.000002
                Relay_Log_Pos: 317
        Relay_Master_Log_File: my-bin.000003
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 874089
              Relay_Log_Space: 531
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 1
                  Master_UUID: b1679752-8587-11ed-a59d-0242c0a80004
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: e144a21a-8587-11ed-88de-0242c0a82004:1-1224
                Auto_Position: 0
         Replicate_Rewrite_DB: 
                 Channel_Name: 
           Master_TLS_Version: 
execute sucessfull...

Note: ready for slave host2:192.168.59.129 create replication user ...

Note: ready send file /tmp/zcbus/create_rs_user.sh

Note: Copying /tmp/zcbus/create_rs_user.sh  to  192.168.59.129:/tmp/zcbus/

Note: Ready Master info 

Note: ready for master change log info for replication ...

Note: ready send file /tmp/zcbus/sync_to_master_data.sh

Note: Copying /tmp/zcbus/sync_to_master_data.sh  to  192.168.59.132:/tmp/zcbus/

Note: ready send file ./scripts/sync_master.sh

Note: Copying ./scripts/sync_master.sh  to  192.168.59.132:/tmp/zcbus/

Note: Ready master for 192.168.59.132
===> Get Master logs ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
file my-bin.000005 . position 866292 ...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
sleep(3)
0
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.59.129
                  Master_User: zcbus_ref
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: my-bin.000005
          Read_Master_Log_Pos: 866292
               Relay_Log_File: b5086120c62f-relay-bin.000002
                Relay_Log_Pos: 317
        Relay_Master_Log_File: my-bin.000005
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 866292
              Relay_Log_Space: 531
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 10
                  Master_UUID: e144a21a-8587-11ed-88de-0242c0a82004
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: b1679752-8587-11ed-a59d-0242c0a80004:1-585
                Auto_Position: 0
         Replicate_Rewrite_DB: 
                 Channel_Name: 
           Master_TLS_Version: 
execute sucessfull...

Note: ready for slave host2:192.168.59.129

集群运行状态检查

[root@node01 grid]# ./zcsrv.sh  -h
➜ Usage :
➜ ==================================================================
➜   >>> Version 2.0.1. copyright (C) 2021 Zcbus. inc. <<<  
➜ ==================================================================
➜       : install            # install grid for zcbus
➜       : add 192.168.0.101  # install zcbus node for 192.168.0.101 
➜       : check              # check zcbus work nodes 
➜       : test_conn          # check zcbus work nodes's status 
[root@node01 grid]# ./zcsrv.sh  check
➜ ===========check kafka/zookeeper ===========
➜ check broker for host1 : 192.168.59.134 server.properties
➜ Check server.properties server for 192.168.59.134 ok ...
➜ check broker for host2 : 192.168.59.129 server.properties
➜ Check server.properties server for 192.168.59.129 ok ...
➜ check broker for host3 : 192.168.59.133 server.properties
➜ Check server.properties server for 192.168.59.133 ok ...
➜ check broker for host1 : 192.168.59.134 zookeeper.properties
➜ Check zookeeper.properties server for 192.168.59.134 ok ...
➜ check broker for host2 : 192.168.59.129 zookeeper.properties
➜ Check zookeeper.properties server for 192.168.59.129 ok ...
➜ check broker for host3 : 192.168.59.133 zookeeper.properties
➜ Check zookeeper.properties server for 192.168.59.133 ok ...
➜ ===========check zcbusdb ===========
➜ ===============check ip 192.168.59.134==================

Note: Ready db node 192.168.59.134 
783ec8107a50        reg.zbomc.com/zcbus_mysql:v2.0.1     "docker-entrypoint.s…"   2 hours ago         Up 2 hours          0.0.0.0:3306->3306/tcp, 33060/tcp   zcbusdb

Note: Ready db node 192.168.59.134 
mysqld is alive
➜ ===============check ip 192.168.59.129==================

Note: Ready db node 192.168.59.129 
017e42a6ff37        reg.zbomc.com/zcbus_mysql:v2.0.1     "docker-entrypoint.s…"   About an hour ago   Up About an hour    0.0.0.0:3306->3306/tcp, 33060/tcp   zcbusdb

Note: Ready db node 192.168.59.129 
mysqld is alive
➜ =================check web =======================

Note: Ready web node 192.168.59.129 
c2eef87641b8        reg.zbomc.com/zcbus_restapi:v2.0.1   "sh /run.sh"             2 hours ago         Up 2 hours          7080/tcp                            zcbusrestapi
fa1b4fc41669        reg.zbomc.com/zcbus_vue:v2.0.1       "/docker-entrypoint.…"   2 hours ago         Up 2 hours          0.0.0.0:8890->80/tcp                zcbusvue

Note: Ready web node 192.168.59.134 
a1524e26e08a        reg.zbomc.com/zcbus_vue:v2.0.1       "/docker-entrypoint.…"   2 hours ago         Up 2 hours          0.0.0.0:8890->80/tcp                zcbusvue
a3755768b73d        reg.zbomc.com/zcbus_restapi:v2.0.1   "sh /run.sh"             2 hours ago         Up 2 hours          7080/tcp                            zcbusrestapi

Note: Ready web node 192.168.59.129 
c731ad46bc0b        reg.zbomc.com/zcbus_restapi:v2.0.1   "sh /run.sh"             About an hour ago   Up About an hour    7080/tcp               zcbusrestapi
117562be40f6        reg.zbomc.com/zcbus_vue:v2.0.1       "/docker-entrypoint.…"   About an hour ago   Up About an hour    0.0.0.0:8890->80/tcp   zcbusvue
➜ ==================check work container ==================

Note: Ready work node 192.168.59.133 
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS              PORTS                               NAMES
9c5918a2cde0        reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   About an hour ago   Up About an hour                                        zc01

Note: Ready work node 192.168.59.134 
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS              PORTS                               NAMES
683431bc5b26        reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   About an hour ago   Up About an hour                                        zc02

Note: Ready work node 192.168.59.129 
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS              PORTS                  NAMES
9043571eeb04        reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   About an hour ago   Up About an hour                           zc03
[root@node01 grid]# 
  • 安装完成之后,可以访问任何一个节点,都可以完成页面访问
文档更新时间: 2023-08-06 21:56   作者:阿力