1 环境准备

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

2 环境检查

2.1 防火墙服务检查

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

3 软件下载解压

4 修改集群配置文件

4.1 主机信息配置文件

注:安装集群的用户需要ROOT权限

[root@zcbustest gridV2]# vim conf/ssh.conf 
#ssh_trust
[host1]
name=zcbustest
host=192.168.2.56
port=22
user=root
password=Zcbus@888

[host2]
name=zcbus_03
host=192.168.2.55
port=22
user=root
password=Zcbus@888

4.2 配置ZCBUS主备模式关系

[root@zcbustest gridV2]# vim conf/grid.ini 
####################################################################
## Copyright(c) ZCBUS Corporation 2022. All rights reserved.      ##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file should be secured to have read       ##
## permission only by the zcbus user or an administrator who      ##
## own this installation to protect any sensitive input values.   ##
##                                                                ##
####################################################################

#-------------------------------------------------------------------------------
# for install zcbus dirpath
#-------------------------------------------------------------------------------
## 设置zcbus软件安装目录,无特殊需求默认即可
zcbus_data_path=/data/zc01

#-------------------------------------------------------------------------------
# for install zcbus's dockers  dirpath
#-------------------------------------------------------------------------------
## docker安装路径,默认即可
zcbus_docker_path=/data/dk

#-------------------------------------------------------------------------------
# for install kafka node
#-------------------------------------------------------------------------------
## 根据ssh.conf中的配置,在指定的主机上安装zbmq
ZCBUS_KAFKA=host1,host2

#-------------------------------------------------------------------------------
# for install kafka port
#-------------------------------------------------------------------------------
## zbmq端口
KAFKA_PORT=6600

#-------------------------------------------------------------------------------
# for install zcbus node
#-------------------------------------------------------------------------------
ZCBUS_NODES=host1,host2

#-------------------------------------------------------------------------------
# for zcbus mysql master db host
#-------------------------------------------------------------------------------
ZCBUS_MASTER_DB=host1

#-------------------------------------------------------------------------------
# for zcbus mysql slave db host
#-------------------------------------------------------------------------------
ZCBUS_SLAVE_DB=host2

#-------------------------------------------------------------------------------
# for zcbus master node info
#-------------------------------------------------------------------------------
ZCBUS_MASTER_NODE=host1

#-------------------------------------------------------------------------------
# for zcbus soft and cache minimum limit 500GB
#-------------------------------------------------------------------------------
zcbus_data_limit=50G

#-------------------------------------------------------------------------------
# for zcbus docker images minimum limit 10GB
#-------------------------------------------------------------------------------
zcbus_docker_limit=10G

#-------------------------------------------------------------------------------
# for ZCBUS use memory min limit set, Suggest setting the minimum value 4GB
#-------------------------------------------------------------------------------
zcbus_memory_limit=4G

4.3 zcbus节点配置文件

[root@zcbustest gridV2]# cat conf/zcbus.properties 
####################################################################
## Copyright(c) ZCBUS Corporation 2022. All rights reserved.      ##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file should be secured to have read       ##
## permission only by the zcbus user or an administrator who      ##
## own this installation to protect any sensitive input values.   ##
##                                                                ##
####################################################################


#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ZCBUS INSTALL home ,for storage docker's cache and images 
#-------------------------------------------------------------------------------
## zcbus安装目录,默认即可
ZC_DATA_HOME=/data/zc01

#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ZCBUS'S docker basic home ,for storage docker's cache and images 
#-------------------------------------------------------------------------------
## docker安装目录,默认即可
ZC_DOCKER_HOME=/data/dk

#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify docker's username
#-------------------------------------------------------------------------------
## 指定docker用户,默认即可
ZC_DOCKER_USER=zcbus

#-------------------------------------------------------------------------------
# Specify a location to install ZCBUS'S TYPE ,Only support cloud_client 
#-------------------------------------------------------------------------------
## zcbus安装方式,默认即可
ZC_TYPE=server

#-------------------------------------------------------------------------------
# Specify a docker's listener port
#-------------------------------------------------------------------------------
## 指定docker监听端口,默认即可
ZC_DOCKER_SERVER_PORT=8899

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

#-------------------------------------------------------------------------------
# Parameter set to zcbus_cache/zcbus_kafka
# zcbus_cache is zcbus's mq  for zcbus single mode
# kafka_cache is kafka or zcbus cluster mode
#-------------------------------------------------------------------------------
## 数据缓存方式,此处选择zcbus_cache
ZC_CACHE_TYPE=zcbus_cache

#-------------------------------------------------------------------------------
# Remote receiving zcbus data stream port service
#-------------------------------------------------------------------------------
## 数据缓存地址,此处走docker内部端口,默认即可
ZC_CACHE_SERVER=zcbuscache:6600

#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service
#-------------------------------------------------------------------------------
## zcbusnet配置,使用zcbus自带数据库,此处默认即可
ZC_NET_DB_SERVER_TYPE=mysql
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=2
ZC_INSTALL_MODE=1

#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service,include master and slave's ip
#-------------------------------------------------------------------------------
## zcbusdb数据库链接地址
ZC_DB_IPPORT=zcbusdb:3306

#-------------------------------------------------------------------------------
# Remote zcbus'services nodes ip
#-------------------------------------------------------------------------------
## 主备节点IP
ZC_NODE_IPS=192.168.2.56,192.168.2.55

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

#-------------------------------------------------------------------------------
# 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=0

#-------------------------------------------------------------------------------
# for ZCBUS COM CODE default 1
#-------------------------------------------------------------------------------
ZC_COM_CODE=1

#-------------------------------------------------------------------------------
# Parameter set to http/https  ,default http
#-------------------------------------------------------------------------------
ZC_HTTP_MODE=http

#-------------------------------------------------------------------------------
# Parameter set to 1, Kafka uses Sasl authentication, set to 0, no authentication method
#-------------------------------------------------------------------------------
ZC_CACHE_SASL=0

#-------------------------------------------------------------------------------
# if add zcbus's default container :1 is add container,0 is not add container
#-------------------------------------------------------------------------------
ZC_IF_ADD_DEFAULT_ZCBUS=1

#------------------------------------------------------------------------------
#- for check data file limit
#------------------------------------------------------------------------------
ZC_DATA_DIR_LIMIT=10G

#------------------------------------------------------------------------------
#- for check docker limit
#------------------------------------------------------------------------------
ZC_DOCKER_DIR_LIMIT=5G

#-------------------------------------------------------------------------------
# for ZCBUS use memory min limit set, Suggest setting the minimum value 4GB
#-------------------------------------------------------------------------------
ZC_MEMORY_LIMIT=0G

#-------------------------------------------------------------------------------
# for ZCBUS use proxy connect to zcbusnet,0 is not set 
#-------------------------------------------------------------------------------
ZC_NET_PROXY=0
ZC_NET_PROXY_PORT=3311
ZC_NET_PROXY_USER=QFkKCzo
ZC_NET_PROXY_PWD=QFkKC2p6SUlNCkheOg
ZC_NET_PROXY_POOL=128
ZC_NET_PROXY_PROCESS=1

4.4 hosts文件配置

[root@zcbustest soft]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.2.56 zcbustest
192.168.2.55 zcbus_03

5 安装部署

## 以下为完整安装过程,部署zcbusdb容器时可能产生【ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)】报错
## 原因是zcbusdb容器暂时未初始化完成所导致,初始化完成后会自动跳过此报错,过程中不要退出安装,此处无需处理
 [root@zcbustest gridV2]# ./zcsrv.sh install
➜ ***************************************************************************************************
➜ ****************************** Ready Install for zcbus grid cluster ....***************************
➜ ****************************** check variabels for zcbus.properties ....***************************
➜ ***************************************************************************************************
➜ check status ZC_DATA_HOME sucessfull..
➜ check status ZC_DOCKER_HOME sucessfull..
➜ check status ZC_DOCKER_USER sucessfull..
➜ check status ZC_DOCKER_SERVER_PORT sucessfull..
➜ check status ZC_TYPE sucessfull..
➜ check status ZC_CUSTOMER_URL sucessfull..
➜ check status ZC_CACHE_SERVER sucessfull..
➜ check status ZC_NET_DB_SERVER_DBNAME sucessfull..
➜ check status ZC_NET_DB_SERVER_HOST sucessfull..
➜ check status ZC_NET_DB_SERVER_PORT sucessfull..
➜ check status ZC_NET_DB_SERVER_USER sucessfull..
➜ check status ZC_NET_DB_SERVER_PWD sucessfull..
➜ check status ZC_NET_DB_SERVER_ID sucessfull..
➜ check status ZC_DB_IPPORT sucessfull..
➜ check status ZC_METHOD sucessfull..
➜ check status ZC_SERV_LOCALTION sucessfull..
➜ check status ZC_IF_ADD_DEFAULT_ZCBUS sucessfull..
➜ check status ZC_INSTALL_MODE sucessfull..
➜ check status ZC_CACHE_SASL sucessfull..
➜ check status ZC_CACHE_TYPE sucessfull..
will change zcbus.properties's restapi install mode ...

[Step 1]: modify conf/zcbus.properties by conf/grid.ini ...

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

Note: Check Node 192.168.2.56's hostname...

Note: Check Node 192.168.2.55's hostname...

Note: Check Hostname for 192.168.2.56
192.168.2.55 ok ...

[Step 3]: check install dirs ...

Note: 192.168.2.56
➜ Dir /data/zc01 is not exist,mkdir it!!
✔ mkdir /data/zc01 successfully ...
Check sucessfull for limit 50G < 159G[/data/zc01]...

Note: 192.168.2.55Dir /data/zc01 is not exist,mkdir it!!
✔ mkdir /data/zc01 successfully ...
Check sucessfull for limit 50G < 151G[/data/zc01]...

Note: 192.168.2.56Dir /data/dk is exist!!
Check sucessfull for limit 10G < 159G[/data/dk]...

Note: 192.168.2.55Dir /data/dk is exist!!
Check sucessfull for limit 10G < 151G[/data/dk]...
Check sucessfull for limit 14 >= 4...
Check sucessfull for limit 14 >= 4...

[Step 4]: check all host ...
➜ check all node ok ...

[Step 5]: check all port ...

Note: Check Node 192.168.2.56's port ZC_DOCKER_SERVER_PORT=8899 ...

Note: Check Node 192.168.2.56's port ZC_NET_DB_SERVER_PORT=33060 ...

Note: Check Node 192.168.2.56's port ZC_DB_IPPORT=zcbusdb:3306 ...

Note: Check Node 192.168.2.55's port ZC_DOCKER_SERVER_PORT=8899 ...

Note: Check Node 192.168.2.55's port ZC_NET_DB_SERVER_PORT=33060 ...

Note: Check Node 192.168.2.55's port ZC_DB_IPPORT=zcbusdb:3306 ...

Note: Check Node 192.168.2.56's port ZC_DOCKER_SERVER_PORT=8899 ...

Note: Check Node 192.168.2.56's port ZC_NET_DB_SERVER_PORT=33060 ...

Note: Check Node 192.168.2.56's port ZC_DB_IPPORT=zcbusdb:3306 ...

Note: Check Node 192.168.2.55's port ZC_DOCKER_SERVER_PORT=8899 ...

Note: Check Node 192.168.2.55's port ZC_NET_DB_SERVER_PORT=33060 ...

Note: Check Node 192.168.2.55's port ZC_DB_IPPORT=zcbusdb:3306 ...
[INFO] whether to start install zcbus grid... Please input 'y/Y' to continue/press Ctrl+C to exit :y
➜ Modify ./conf/zcbus.properties ZC_NODE_IPS=192.168.2.56,192.168.2.55

[Step 6]: Sync mode to 192.168.2.56 ...

Note: mkdir -p /data/zc01/grid/bin

Note: ready send file ./bin/pwd_encode.x86_64

Note: Copying ./bin/pwd_encode.x86_64 to root:192.168.2.56:/usr/bin/
➜ Copy ./bin/pwd_encode.x86_64 to root:192.168.2.56:/usr/bin/ ok ...

Note: ready send file ./bin/sshpass.x86_64

Note: Copying ./bin/sshpass.x86_64 to root:192.168.2.56:/data/zc01/grid/bin/
➜ Copy ./bin/sshpass.x86_64 to root:192.168.2.56:/data/zc01/grid/bin/ ok ...

Note: ready send file ./bin/ssh_trust.x86_64

Note: Copying ./bin/ssh_trust.x86_64 to root:192.168.2.56:/data/zc01/grid/bin/
➜ Copy ./bin/ssh_trust.x86_64 to root:192.168.2.56:/data/zc01/grid/bin/ ok ...

Note: ready send file ./zcsrv.sh

Note: Copying ./zcsrv.sh to root:192.168.2.56:/data/zc01/grid/
➜ Copy ./zcsrv.sh to root:192.168.2.56:/data/zc01/grid/ ok ...

Note: ready send file ./.env

Note: Copying ./.env to root:192.168.2.56:/data/zc01/grid/
➜ Copy ./.env to root:192.168.2.56:/data/zc01/grid/ ok ...

Note: ready send directory ./conf

Note: Copying ./conf to root:192.168.2.56:/data/zc01/grid/
➜ Copy ./conf to root:192.168.2.56:/data/zc01/grid/ ok ...

Note: ready send directory ./scripts

Note: Copying ./scripts to root:192.168.2.56:/data/zc01/grid/
➜ Copy ./scripts to root:192.168.2.56:/data/zc01/grid/ ok ...

[Step 7]: Sync mode to 192.168.2.55 ...

Note: mkdir -p /data/zc01/grid/bin

Note: ready send file ./bin/pwd_encode.x86_64

Note: Copying ./bin/pwd_encode.x86_64 to root:192.168.2.55:/usr/bin/
➜ Copy ./bin/pwd_encode.x86_64 to root:192.168.2.55:/usr/bin/ ok ...

Note: ready send file ./bin/sshpass.x86_64

Note: Copying ./bin/sshpass.x86_64 to root:192.168.2.55:/data/zc01/grid/bin/
➜ Copy ./bin/sshpass.x86_64 to root:192.168.2.55:/data/zc01/grid/bin/ ok ...

Note: ready send file ./bin/ssh_trust.x86_64

Note: Copying ./bin/ssh_trust.x86_64 to root:192.168.2.55:/data/zc01/grid/bin/
➜ Copy ./bin/ssh_trust.x86_64 to root:192.168.2.55:/data/zc01/grid/bin/ ok ...

Note: ready send file ./zcsrv.sh

Note: Copying ./zcsrv.sh to root:192.168.2.55:/data/zc01/grid/
➜ Copy ./zcsrv.sh to root:192.168.2.55:/data/zc01/grid/ ok ...

Note: ready send file ./.env

Note: Copying ./.env to root:192.168.2.55:/data/zc01/grid/
➜ Copy ./.env to root:192.168.2.55:/data/zc01/grid/ ok ...

Note: ready send directory ./conf

Note: Copying ./conf to root:192.168.2.55:/data/zc01/grid/
➜ Copy ./conf to root:192.168.2.55:/data/zc01/grid/ ok ...

Note: ready send directory ./scripts

Note: Copying ./scripts to root:192.168.2.55:/data/zc01/grid/
➜ Copy ./scripts to root:192.168.2.55:/data/zc01/grid/ ok ...

[Step 8]: send for clear log mode 192.168.2.56 ...

Note: clear /data/zc01/simple_server

[Step 9]: send zcbus files to 192.168.2.56 ...

Note: ready send directory ./soft/simple_server

Note: Copying ./soft/simple_server to root:192.168.2.56:/data/zc01/
➜ Copy ./soft/simple_server to root:192.168.2.56:/data/zc01/ ok ...

[Step 10]: send for clear log mode 192.168.2.55 ...

Note: clear /data/zc01/simple_server

[Step 11]: send zcbus files to 192.168.2.55 ...

Note: ready send directory ./soft/simple_server

Note: Copying ./soft/simple_server to root:192.168.2.55:/data/zc01/
➜ Copy ./soft/simple_server to root:192.168.2.55:/data/zc01/ ok ...
➜ 192.168.2.56
host:192.168.2.56
masterip:192.168.2.56

[Step 12]: check cfg file to 192.168.2.56 [0]...

[Step 13]: send cfg file to 192.168.2.56 ...

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

Note: Copying /tmp/zcbus/zcbus.properties.192.168.2.56 to root:192.168.2.56:/data/zc01/simple_server/common/zcbus.properties
➜ Copy /tmp/zcbus/zcbus.properties.192.168.2.56 to root:192.168.2.56:/data/zc01/simple_server/common/zcbus.properties ok ...
➜ 192.168.2.55
host:192.168.2.55
masterip:192.168.2.56

[Step 14]: check cfg file to 192.168.2.55 [0]...

[Step 15]: send cfg file to 192.168.2.55 ...

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

Note: Copying /tmp/zcbus/zcbus.properties.192.168.2.55 to root:192.168.2.55:/data/zc01/simple_server/common/zcbus.properties
➜ Copy /tmp/zcbus/zcbus.properties.192.168.2.55 to root:192.168.2.55:/data/zc01/simple_server/common/zcbus.properties ok ...

[Step 16]: install zcbus docker for 192.168.2.55 ...

Note: 192.168.2.56
ssh 192.168.2.56 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no "sh /data/zc01/simple_server/zcmgr.sh slient /data/zc01/simple_server/common/zcbus.properties "
192.168.2.56==➜ Check ZC_DOCKER_HOME=/data/dk ZC_DATA_HOME=/data/zc01/zcbus ok
192.168.2.56==➜ Check /etc/hosts Sucessfull...
192.168.2.56==➜ For slient install by /data/zc01/simple_server/common/zcbus.properties ...
192.168.2.56==➜ ***************************************************************************************************
192.168.2.56==➜ ****************************** Ready Install for zcbus grid cluster ....***************************
192.168.2.56==➜ ****************************** check variabels for  ....***************************
192.168.2.56==➜ ***************************************************************************************************
192.168.2.56==➜ check status ZC_DATA_HOME sucessfull..
192.168.2.56==➜ check status ZC_DOCKER_HOME sucessfull..
192.168.2.56==➜ check status ZC_DOCKER_SERVER_PORT sucessfull..
192.168.2.56==➜ check status ZC_TYPE sucessfull..
192.168.2.56==➜ check status ZC_CUSTOMER_URL sucessfull..
192.168.2.56==➜ check status ZC_CACHE_SERVER sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_DBNAME sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_HOST sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_PORT sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_USER sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_PWD sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_ID sucessfull..
192.168.2.56==➜ check status ZC_DB_IPPORT sucessfull..
192.168.2.56==➜ check status ZC_METHOD sucessfull..
192.168.2.56==➜ check status ZC_SERV_LOCALTION sucessfull..
192.168.2.56==➜ check status ZC_IF_ADD_DEFAULT_ZCBUS sucessfull..
192.168.2.56==➜ check status ZC_INSTALL_MODE sucessfull..
192.168.2.56==➜ check status ZC_CACHE_SASL sucessfull..
192.168.2.56==➜ check status ZC_CACHE_TYPE sucessfull..
192.168.2.56==➜ check status ZC_NET_DB_SERVER_TYPE sucessfull..
192.168.2.56==➜ Check ZC_CACHE_TYPE =zcbus_cache ... 
will change 's restapi install mode ...
############################## check host ::: /etc/hosts #############################################
192.168.2.56==➜ check host ::: 1 ::: OK
192.168.2.56==➜ 192.168.2.56 zcbustest
############################## check selinux ::: /etc/selinux/config #################################
192.168.2.56==➜ check selinux ::: disabled ::: OK
setenforce: SELinux is disabled
############################## check firewalld #######################################################
192.168.2.56==➜ check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
192.168.2.56==➜ vm.max_map_count ::: 2000000 (>=2000000) ::: OK
192.168.2.56==➜ kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
192.168.2.56==➜ fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
192.168.2.56==➜ fs.file-max ::: 6815744 (>=6815744) ::: OK
192.168.2.56==➜ kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
192.168.2.56==➜ kernel.shmmni ::: 4096 (>=4096) ::: OK
192.168.2.56==➜ kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
192.168.2.56==➜ net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
192.168.2.56==➜ net.core.rmem_default ::: 262144 (>=262144) ::: OK
192.168.2.56==➜ net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
192.168.2.56==➜ net.core.wmem_default ::: 262144 (>=262144) ::: OK
192.168.2.56==➜ net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
192.168.2.56==➜ kernel.threads-max ::: 999999 (>=999999) ::: OK
192.168.2.56==➜ kernel.pid_max ::: 999999 (>=999999) ::: OK
192.168.2.56==➜ vm.max_map_count ::: 2000000 (>=1999999) ::: OK
192.168.2.56==➜ net.ipv4.ip_forward ::: 1 (>=1) ::: OK
192.168.2.56==➜ fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
192.168.2.56==➜ fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
192.168.2.56==➜ soft-nofile ::: 1048500 (>=1048500) ::: OK
192.168.2.56==➜ hard-nofile ::: 1048500 (>=1048500) ::: OK
192.168.2.56==➜ soft-nproc ::: 65536 (>=65536) ::: OK
192.168.2.56==➜ hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
192.168.2.56==➜ OK : 25 ERROR : 0 WARNING : 0

192.168.2.56==[Step 1]: ready for data dir path ...
192.168.2.56==➜ Not Found path /data/zc01/zcbus...
192.168.2.56==➜ mkdir path for /data/zc01/zcbus finished ...
192.168.2.56==➜ Find path /data/zc01/zcbus :/data/docker02/zcbusdata
sed: -e expression #1, char 34: unknown option to `s'
check sucessfull for zclimit 10G < 156G[/data/zc01/zcbus]...

192.168.2.56==[Step 2]: add zcbus user ...
docker:x:1001:zcbus
docker group exists ...
uid=1000(zcbus) gid=1000(zcbus) groups=1000(zcbus),10(wheel),1001(docker)

192.168.2.56==[Step 3]: checking if docker is installed ...
############################## docker version: 20.10.10 ##############################################

192.168.2.56==[Step 4]: checking docker-compose is installed ...
############################## docker-compose version: 2.24.5 ########################################

192.168.2.56==[Step 5]: 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 Tue 2024-11-19 16:35:18 CST; 2min 29s ago
     Docs: https://docs.docker.com
 Main PID: 91874 (dockerd)
    Tasks: 20
   Memory: 40.2M
   CGroup: /system.slice/docker.service
           ├─91874 /usr/bin/dockerd --selinux-enabled=false --default-ulimit nofile=65535:65535 --graph=/data/docker
           └─91881 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Nov 19 16:35:17 zcbustest dockerd[91874]: time="2024-11-19T16:35:17.801443747+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Nov 19 16:35:17 zcbustest dockerd[91874]: time="2024-11-19T16:35:17.801455622+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Nov 19 16:35:17 zcbustest dockerd[91874]: time="2024-11-19T16:35:17.809279372+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Nov 19 16:35:17 zcbustest dockerd[91874]: time="2024-11-19T16:35:17.816085120+08:00" level=info msg="Loading containers: start."
Nov 19 16:35:18 zcbustest dockerd[91874]: time="2024-11-19T16:35:18.026270138+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"
Nov 19 16:35:18 zcbustest dockerd[91874]: time="2024-11-19T16:35:18.060003875+08:00" level=info msg="Loading containers: done."
Nov 19 16:35:18 zcbustest dockerd[91874]: time="2024-11-19T16:35:18.092411258+08:00" level=info msg="Docker daemon" commit=e2f740d graphdriver(s)=overlay2 version=20.10.10
Nov 19 16:35:18 zcbustest dockerd[91874]: time="2024-11-19T16:35:18.092500172+08:00" level=info msg="Daemon has completed initialization"
Nov 19 16:35:18 zcbustest systemd[1]: Started Docker Application Container Engine.
Nov 19 16:35:18 zcbustest dockerd[91874]: time="2024-11-19T16:35:18.118244661+08:00" level=info msg="API listen on /var/run/docker.sock"
192.168.2.56==➜ check docker service is running ...

192.168.2.56==[Step 6]: checking mysql directory ...
192.168.2.56==➜ /data/docker02/zcbusdata/mysql is existd! 

192.168.2.56==[Step 7]: checking kafka directory ...
192.168.2.56==➜ rm -rf /data/docker02/zcbusdata/zcbuskafka/logs/.lock
192.168.2.56==➜ /data/docker02/zcbusdata/zcbuskafka is existd! 

192.168.2.56==[Step 8]: checking cache directory ...
192.168.2.56==➜ /data/docker02/zcbusdata/cache is existd! 

192.168.2.56==[Step 9]: checking zookeeper directory ...
192.168.2.56==➜ /data/docker02/zcbusdata/zcbuszookeeper is existd! 

192.168.2.56==[Step 10]: loading zcbus images ...
docker load -i /data/zc01/simple_server/soft/images/prepare.tar.gz
Loaded image: reg.zbomc.com/zcbus/prepare:latest
192.168.2.56==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_job.tar.gz
Loaded image: reg.zbomc.com/zcbus_job:v2.0.1
192.168.2.56==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_mysql.tar.gz
Loaded image: reg.zbomc.com/zcbus_mysql:v2.0.1
192.168.2.56==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_restapi.tar.gz
Loaded image: reg.zbomc.com/zcbus_restapi:v2.0.1
192.168.2.56==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_server.tar.gz
Loaded image: reg.zbomc.com/zcbus_server:v2.0.1
192.168.2.56==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_vue.tar.gz
Loaded image: reg.zbomc.com/zcbus_vue:v2.0.1
192.168.2.56==➜ Load images to docker's sucessfull...
192.168.2.56==➜ 
192.168.2.56==➜ network zcbus is already exists ...
192.168.2.56==➜ set auto_aux_start = 1
192.168.2.56==➜ /data/zc01/simple_server/common/zcbus.properties ZC_SERV_LOCALTION  :[2]
zctype:server====zcc:0
Check hostname [zcbustest]'s ip is :[192.168.2.56]
mode :external_2,file=docker-compose-external_2.yml.jinja
===> Ready basic info zctype  server : external ,ymlbasic :  docker-compose-external_2.yml.jinja
mode :zcbus_cache,file=zcbus-cache-mq-priv.yml.jinja
Append  zcbuscache  sucessfull...
=====fulldict[  dict_keys(['zcbusnet', 'zcbusrestapi', 'zcbusjob', 'zcbusvue', 'zcbusdb', 'zcbuscache'])  ]
Flush data to /compose_location/docker-compose.yml
===> Finish init basic ...
192.168.2.56==➜ prepare server Sucessfull...
192.168.2.56==➜ 
192.168.2.56==➜ 

192.168.2.56==[Step 11]: checking if ports is used ...
192.168.2.56==➜ Port  6601 is available!!
192.168.2.56==➜ Port  3306 is available!!
192.168.2.56==➜ Port  33060 is available!!
192.168.2.56==➜ Port  8890 is available!!

192.168.2.56==[Step 12]: ready basic soft for container ...
192.168.2.56==➜ Ready compare soft ...
192.168.2.56==➜ Read zcbusserver jdk sucessfull....
192.168.2.56==➜ Read zcbusserver jar sucessfull....
192.168.2.56==➜ Read zcbusserver bin sucessfull....
192.168.2.56==➜ Read zcbusserver lib sucessfull....
192.168.2.56==➜ /data/zc01/zcbus/module/lib to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.56==➜ /data/zc01/zcbus/module/bin to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.56==➜ /data/zc01/zcbus/module/jdk to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.56==➜ /data/zc01/zcbus/module/jar to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...

192.168.2.56==[Step 13]: starting zcbus ...
 Container zcbusdb  Creating
 Container zcbusdb  Created
 Container zcbusdb  Starting
 Container zcbusdb  Started
 Container zcbusnet  Creating
 Container zcbusnet  Created
 Container zcbusnet  Starting
 Container zcbusnet  Started
dbtype:mysql,db_ipport:192.168.2.56:3306,db_user:zcbus,db_pwd:AqJbPFSalFZFLEbO
192.168.2.56==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
192.168.2.56==➜ Check zcbusdb Connect Failed ,wait 10 seconds and retry 1 times ...
192.168.2.56==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
0
192.168.2.56==➜ Check zcbusdb Connect Sucessfull...
192.168.2.56==➜ =============will load data mode for server================
192.168.2.56==➜ Will Install for load zcbus's data...
192.168.2.56==➜ Start Load data to zcbusdb ...
init db for ZCBUS_VERSION:simple_server ZCTYPE:server...
INFO => initDB first time ...
INFO => change password for zcbus...
INFO => finished password for zcbus...
INFO => sql source /zcbus/createdb.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
INFO => DEAL sql file account_api...
INFO => DEAL sql file account_menu...
INFO => DEAL sql file account_rel_menu_api...
INFO => DEAL sql file account_rel_role_menu...
INFO => DEAL sql file bus_dict_item...
INFO => DEAL sql file bus_dict_type...
INFO => DEAL sql file bus_dict_style...
INFO => DEAL sql file bus_cluster_version...
INFO => DEAL sql file bus_parameter_module...
INFO => DEAL sql file custom_charset_to_big5...
INFO => DEAL sql file bus_customerid_sequence...
INFO => DEAL sql file simple_server...
INFO => DEAL sql file bus_parameter_module_image...
INFO => DEAL sql file bus_sys_parameter...
INFO => DEAL sql file bus_sql_parameter...
INFO => DEAL sql file bus_service_type_model...
INFO => DEAL sql file bus_search_group...
INFO => DEAL sql file bus_search_group_sql...
INFO => DEAL sql file bus_search_group_sql_map...
INFO => DEAL sql file bus_tool_sql_record...
INFO => DEAL sql file bus_api_key_map...
INFO => DEAL sql file bus_dict_table_column...
INFO => DEAL sql file bus_dict_table_type...
INFO => DEAL sql file bus_aux_publish_down_tab_list...
INFO => DEAL sql file bus_aux_publish_up_tab_list...
INFO => DEAL sql file bus_msg_dispatch...
INFO => DEAL sql file bus_msg_model...
INFO => DEAL sql file sys_article...
INFO => DEAL sql file bus_dict_table_list...
INFO => DEAL sql file zbomc_sys_password_blacklist...
INFO => DEAL sql file update_cache...
INFO => DEAL sql file p1_server...
INFO => DEAL sql file p2...
INFO => DEAL sql file auxservstart...
INFO => Will exec sql for /zcbus/zcbus.v2.0.1.sql...
mysql: [Warning] Using a password on the command line interface can be insecure.
INFO => sql :select version from bus_cluster_version
mysql: [Warning] Using a password on the command line interface can be insecure.
===================not found upgrade sql =====================
INFO => Not Found upgrade sql file 
===============
192.168.2.56==➜ Finished Load data to zcbusdb sucessfull...
192.168.2.56==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
0
192.168.2.56==➜ Check zcbusdb Connect Sucessfull...

====>>>ZCBUS [ Tue Nov 19 16:39:24 CST 2024 ]
NAME       IMAGE                               COMMAND                  SERVICE    CREATED          STATUS          PORTS
zcbusdb    reg.zbomc.com/zcbus_mysql:v2.0.1    "docker-entrypoint.s…"   zcbusdb    33 seconds ago   Up 26 seconds   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
zcbusnet   reg.zbomc.com/zcbus_server:v2.0.1   "/bin/bash -c ${ZCBU…"   zcbusnet   27 seconds ago   Up 25 seconds   0.0.0.0:33060->33060/tcp, :::33060->33060/tcp
192.168.2.56==➜ 

192.168.2.56==[Step 13]: sync zcbus_docker to /data/zc01/zcbus/...
copy /data/zc01/simple_server/bin /data/zc01/zcbus/...

192.168.2.56==[Step 13]: ready basic soft for basic zcbus_docker server ...
Check hostname [zcbustest]'s ip is :[192.168.2.56]
192.168.2.56==➜ ZC_IPADDRESS :192.168.2.56
192.168.2.56==➜ ==============>/data/zc01/zcbus========192.168.2.56=======

Note: add zcbus_docker service
? add zcbus_docker service successfully ...
192.168.2.56==➜ Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
[INF] load libmysqlclient.so
[LV0] 2024-11-19 16:39:29: connect to mysql zcbus/***@192.168.2.56:33060 ...
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50743
[INF] MYSQL INFO: 5.7.43-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
[INF] connection test ok.
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
192.168.2.56==➜ sync basic info to /data/zc01/zcbus/ begin ...
copy /data/zc01/simple_server/bin /data/zc01/zcbus/...
copy /data/zc01/simple_server/yaml /data/zc01/zcbus/...
copy /data/zc01/simple_server/common/add_zcbus_docker_service.sh /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/docker.service /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus_client.rsp /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus_docker.service /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus.properties /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus.yml /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/.check /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/.zcbus.common /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/zcmgr.sh /data/zc01/zcbus/...
copy /data/zc01/simple_server/soft/docker-20.10.10.tgz /data/zc01/zcbus/soft/...
copy /data/zc01/simple_server/soft/docker-compose-Linux-x86_64 /data/zc01/zcbus/soft/...
copy /data/zc01/simple_server/soft/zcbus /data/zc01/zcbus/soft/...
192.168.2.56==➜ sync basic info to /data/zc01/zcbus/ end ...
192.168.2.56==➜ Test zcbus_docker Connect to zcbus_master.ini Sucessfull...
192.168.2.56==➜ =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
 Container zcbusdb  Running
 Container zcbuscache  Creating
 Container zcbusnet  Running
 Container zcbusjob  Creating
 Container zcbusrestapi  Creating
 Container zcbusjob  Created
 Container zcbusrestapi  Created
 Container zcbusvue  Creating
 Container zcbuscache  Created
 Container zcbusvue  Created
 Container zcbuscache  Starting
 Container zcbusjob  Starting
 Container zcbusrestapi  Starting
 Container zcbuscache  Started
 Container zcbusjob  Started
 Container zcbusrestapi  Started
 Container zcbusvue  Starting
 Container zcbusvue  Started
192.168.2.56==➜ sync config info to /data/zc01/zcbus/ begin ...
copy /data/zc01/simple_server/config /data/zc01/zcbus/...
copy /data/zc01/simple_server/yaml /data/zc01/zcbus/...
192.168.2.56==➜ sync config info to /data/zc01/zcbus/ end ...
 Container zcbusvue  Restarting
 Container zcbusnet  Restarting
 Container zcbusrestapi  Restarting
 Container zcbusnet  Started
 Container zcbusrestapi  Started
 Container zcbusvue  Started
 Container zcbuscache  Running
 Container zcbusnet  Running
 Container zcbusdb  Running
 Container zcbusrestapi  Running
 Container zcbusvue  Running
 Container zcbusjob  Running
192.168.2.56==➜ =============================================================
192.168.2.56==➜ Manager console Website Address: http://192.168.2.56:8890
192.168.2.56==➜ Default login account : admin
192.168.2.56==➜ Default login password: 123456
192.168.2.56==➜ 
192.168.2.56==➜ =============================================================
192.168.2.56==✔ ----Zcbus has been installed and started successfully.----
no such service: zcbus
192.168.2.56==➜ Zcbus Container zcbus Not Exists and install...
192.168.2.56==➜ /data/zc01/simple_server/common/zcbus.properties ZC_SERV_LOCALTION  :[2]
zctype:zcbus====zcc:0
Check hostname [zcbustest]'s ip is :[192.168.2.56]
mode :zcbus_external,file=zcbus-server-external.yml.jinja
=====================>>>> ymlzcbus file : zcbus-server-external.yml.jinja ,zcbus: zcbus
Append  zcbus  sucessfull...
Flush data to /compose_location/docker-compose.yml
 Container zcbusdb  Running
 Container zcbusnet  Running
dbtype:mysql,db_ipport:192.168.2.56:3306,db_user:zcbus,db_pwd:AqJbPFSalFZFLEbO
192.168.2.56==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
0
192.168.2.56==➜ Check zcbusdb Connect Sucessfull...
192.168.2.56==➜ =============will load data mode for zcbus================
Linux zcbustest 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
sql_exec: Release 8.2-16 64 bit (QA) - Production on 2024-11-13 11:01:50
Copyright (c) 2024 ZCBUS. All Rights Reserved.
process id 100114
connect string: mysql:zcbus/AqJbPFSalFZFLEbO@192.168.2.56:3306/zcbus
login host[192.168.2.56] port[3306] user[zcbus] password[AqJbPFSalFZFLEbO] database[zcbus].
[INF] load libmysqlclient.so
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50743
[INF] MYSQL INFO: 5.7.43-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
Affected_rows: 1
execute sql OK.
 Container zcbus  Creating
 Container zcbus  Created
 Container zcbus  Starting
 Container zcbus  Started

====>>>ZCBUS [ Tue Nov 19 16:39:54 CST 2024 ]
NAME           IMAGE                                COMMAND                  SERVICE        CREATED              STATUS                  PORTS
zcbus          reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   zcbus          1 second ago         Up Less than a second   
zcbuscache     reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   zcbuscache     17 seconds ago       Up 13 seconds           0.0.0.0:6600-6602->6600-6602/tcp, :::6600-6602->6600-6602/tcp
zcbusdb        reg.zbomc.com/zcbus_mysql:v2.0.1     "docker-entrypoint.s…"   zcbusdb        About a minute ago   Up 56 seconds           0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
zcbusjob       reg.zbomc.com/zcbus_job:v2.0.1       "sh /run.sh"             zcbusjob       17 seconds ago       Up 13 seconds           7080/tcp
zcbusnet       reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   zcbusnet       57 seconds ago       Up 2 seconds            0.0.0.0:33060->33060/tcp, :::33060->33060/tcp
zcbusrestapi   reg.zbomc.com/zcbus_restapi:v2.0.1   "sh /run.sh"             zcbusrestapi   17 seconds ago       Up 2 seconds            7080/tcp
zcbusvue       reg.zbomc.com/zcbus_vue:v2.0.1       "/docker-entrypoint.…"   zcbusvue       15 seconds ago       Up 2 seconds            0.0.0.0:8890->80/tcp, :::8890->80/tcp
root      98673      1  0 16:39 ?        00:00:00 /data/zc01/zcbus/bin/zcbus_docker -log_level 2
root      98700      1  0 16:39 ?        00:00:00 /data/zc01/zcbus/bin/zcbus_docker -manager -log_level 2
root      98719      1  0 16:39 ?        00:00:00 /data/zc01/zcbus/bin/zcbus_docker -listener -log_level 2
➜ Install Zcbus  success !!!

Note: 192.168.2.55
ssh 192.168.2.55 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no "sh /data/zc01/simple_server/zcmgr.sh slient /data/zc01/simple_server/common/zcbus.properties "
192.168.2.55==➜ Check ZC_DOCKER_HOME=/data/dk ZC_DATA_HOME=/data/zc01/zcbus ok
192.168.2.55==➜ Check /etc/hosts Sucessfull...
192.168.2.55==➜ For slient install by /data/zc01/simple_server/common/zcbus.properties ...
192.168.2.55==➜ ***************************************************************************************************
192.168.2.55==➜ ****************************** Ready Install for zcbus grid cluster ....***************************
192.168.2.55==➜ ****************************** check variabels for  ....***************************
192.168.2.55==➜ ***************************************************************************************************
192.168.2.55==➜ check status ZC_DATA_HOME sucessfull..
192.168.2.55==➜ check status ZC_DOCKER_HOME sucessfull..
192.168.2.55==➜ check status ZC_DOCKER_SERVER_PORT sucessfull..
192.168.2.55==➜ check status ZC_TYPE sucessfull..
192.168.2.55==➜ check status ZC_CUSTOMER_URL sucessfull..
192.168.2.55==➜ check status ZC_CACHE_SERVER sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_DBNAME sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_HOST sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_PORT sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_USER sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_PWD sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_ID sucessfull..
192.168.2.55==➜ check status ZC_DB_IPPORT sucessfull..
192.168.2.55==➜ check status ZC_METHOD sucessfull..
192.168.2.55==➜ check status ZC_SERV_LOCALTION sucessfull..
192.168.2.55==➜ check status ZC_IF_ADD_DEFAULT_ZCBUS sucessfull..
192.168.2.55==➜ check status ZC_INSTALL_MODE sucessfull..
192.168.2.55==➜ check status ZC_CACHE_SASL sucessfull..
192.168.2.55==➜ check status ZC_CACHE_TYPE sucessfull..
192.168.2.55==➜ check status ZC_NET_DB_SERVER_TYPE sucessfull..
192.168.2.55==➜ Check ZC_CACHE_TYPE =zcbus_cache ... 
will change 's restapi install mode ...
############################## check host ::: /etc/hosts #############################################
192.168.2.55==➜ check host ::: 1 ::: OK
192.168.2.55==➜ 192.168.2.55  zcbus_03
############################## check selinux ::: /etc/selinux/config #################################
192.168.2.55==➜ check selinux ::: disabled ::: OK
setenforce: SELinux is disabled
############################## check firewalld #######################################################
192.168.2.55==➜ check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
192.168.2.55==➜ vm.max_map_count ::: 2000000 (>=2000000) ::: OK
192.168.2.55==➜ kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
192.168.2.55==➜ fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
192.168.2.55==➜ fs.file-max ::: 6815744 (>=6815744) ::: OK
192.168.2.55==➜ kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
192.168.2.55==➜ kernel.shmmni ::: 4096 (>=4096) ::: OK
192.168.2.55==➜ kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
192.168.2.55==➜ net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
192.168.2.55==➜ net.core.rmem_default ::: 262144 (>=262144) ::: OK
192.168.2.55==➜ net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
192.168.2.55==➜ net.core.wmem_default ::: 262144 (>=262144) ::: OK
192.168.2.55==➜ net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
192.168.2.55==➜ kernel.threads-max ::: 999999 (>=999999) ::: OK
192.168.2.55==➜ kernel.pid_max ::: 999999 (>=999999) ::: OK
192.168.2.55==➜ vm.max_map_count ::: 2000000 (>=1999999) ::: OK
192.168.2.55==➜ net.ipv4.ip_forward ::: 1 (>=1) ::: OK
192.168.2.55==➜ fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
192.168.2.55==➜ fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
192.168.2.55==➜ soft-nofile ::: 1048500 (>=1048500) ::: OK
192.168.2.55==➜ hard-nofile ::: 1048500 (>=1048500) ::: OK
192.168.2.55==➜ soft-nproc ::: 65536 (>=65536) ::: OK
192.168.2.55==➜ hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
192.168.2.55==➜ OK : 25 ERROR : 0 WARNING : 0

192.168.2.55==[Step 1]: ready for data dir path ...
192.168.2.55==➜ Not Found path /data/zc01/zcbus...
192.168.2.55==➜ mkdir path for /data/zc01/zcbus finished ...
192.168.2.55==➜ Find path /data/zc01/zcbus :/data/docker02/zcbusdata
sed: -e expression #1, char 34: unknown option to `s'
check sucessfull for zclimit 10G < 147G[/data/zc01/zcbus]...

192.168.2.55==[Step 2]: add zcbus user ...
docker:x:1003:zcbus
docker group exists ...
uid=1000(zcbus) gid=1000(zcbus) groups=1000(zcbus),10(wheel),1003(docker)

192.168.2.55==[Step 3]: checking if docker is installed ...
############################## docker version: 20.10.10 ##############################################

192.168.2.55==[Step 4]: checking docker-compose is installed ...
############################## docker-compose version: 2.24.5 ########################################

192.168.2.55==[Step 5]: 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 Tue 2024-11-19 16:35:39 CST; 4min 16s ago
     Docs: https://docs.docker.com
 Main PID: 799931 (dockerd)
    Tasks: 20
   Memory: 49.2M
   CGroup: /system.slice/docker.service
           ├─799931 /usr/bin/dockerd --selinux-enabled=false --default-ulimit nofile=65535:65535 --graph=/data/dk
           └─799940 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.246607130+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.246618770+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.298473873+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.315953136+08:00" level=info msg="Loading containers: start."
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.533460033+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"
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.567884562+08:00" level=info msg="Loading containers: done."
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.600839850+08:00" level=info msg="Docker daemon" commit=e2f740d graphdriver(s)=overlay2 version=20.10.10
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.600921554+08:00" level=info msg="Daemon has completed initialization"
Nov 19 16:35:39 zcbus_03 systemd[1]: Started Docker Application Container Engine.
Nov 19 16:35:39 zcbus_03 dockerd[799931]: time="2024-11-19T16:35:39.639056655+08:00" level=info msg="API listen on /var/run/docker.sock"
192.168.2.55==➜ check docker service is running ...

192.168.2.55==[Step 6]: checking mysql directory ...
192.168.2.55==➜ /data/docker02/zcbusdata/mysql is existd! 

192.168.2.55==[Step 7]: checking kafka directory ...
192.168.2.55==➜ rm -rf /data/docker02/zcbusdata/zcbuskafka/logs/.lock
192.168.2.55==➜ /data/docker02/zcbusdata/zcbuskafka is existd! 

192.168.2.55==[Step 8]: checking cache directory ...
192.168.2.55==➜ /data/docker02/zcbusdata/cache is existd! 

192.168.2.55==[Step 9]: checking zookeeper directory ...
192.168.2.55==➜ /data/docker02/zcbusdata/zcbuszookeeper is existd! 

192.168.2.55==[Step 10]: loading zcbus images ...
docker load -i /data/zc01/simple_server/soft/images/prepare.tar.gz
Loaded image: reg.zbomc.com/zcbus/prepare:latest
192.168.2.55==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_job.tar.gz
Loaded image: reg.zbomc.com/zcbus_job:v2.0.1
192.168.2.55==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_mysql.tar.gz
Loaded image: reg.zbomc.com/zcbus_mysql:v2.0.1
192.168.2.55==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_restapi.tar.gz
Loaded image: reg.zbomc.com/zcbus_restapi:v2.0.1
192.168.2.55==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_server.tar.gz
Loaded image: reg.zbomc.com/zcbus_server:v2.0.1
192.168.2.55==➜ Load images to docker's sucessfull...
docker load -i /data/zc01/simple_server/soft/images/zcbus_vue.tar.gz
Loaded image: reg.zbomc.com/zcbus_vue:v2.0.1
192.168.2.55==➜ Load images to docker's sucessfull...
192.168.2.55==➜ 
192.168.2.55==➜ network zcbus is already exists ...
192.168.2.55==➜ set auto_aux_start = 1
192.168.2.55==➜ /data/zc01/simple_server/common/zcbus.properties ZC_SERV_LOCALTION  :[2]
zctype:server====zcc:0
Check hostname [zcbus_03]'s ip is :[192.168.2.55]
mode :external_2,file=docker-compose-external_2.yml.jinja
===> Ready basic info zctype  server : external ,ymlbasic :  docker-compose-external_2.yml.jinja
mode :zcbus_cache,file=zcbus-cache-mq-priv.yml.jinja
Append  zcbuscache  sucessfull...
=====fulldict[  dict_keys(['zcbusnet', 'zcbusrestapi', 'zcbusjob', 'zcbusvue', 'zcbusdb', 'zcbuscache'])  ]
Flush data to /compose_location/docker-compose.yml
===> Finish init basic ...
192.168.2.55==➜ prepare server Sucessfull...
192.168.2.55==➜ 
192.168.2.55==➜ 

192.168.2.55==[Step 11]: checking if ports is used ...
192.168.2.55==➜ Port  6601 is available!!
192.168.2.55==➜ Port  3306 is available!!
192.168.2.55==➜ Port  33060 is available!!
192.168.2.55==➜ Port  8890 is available!!

192.168.2.55==[Step 12]: ready basic soft for container ...
192.168.2.55==➜ Ready compare soft ...
192.168.2.55==➜ Read zcbusserver jdk sucessfull....
192.168.2.55==➜ Read zcbusserver jar sucessfull....
192.168.2.55==➜ Read zcbusserver bin sucessfull....
192.168.2.55==➜ Read zcbusserver lib sucessfull....
192.168.2.55==➜ /data/zc01/zcbus/module/lib to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.55==➜ /data/zc01/zcbus/module/bin to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.55==➜ /data/zc01/zcbus/module/jdk to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...
192.168.2.55==➜ /data/zc01/zcbus/module/jar to /data/zc01/zcbus/zcbusdata/zcbusserver/ is build sucessfull...

192.168.2.55==[Step 13]: starting zcbus ...
 Container zcbusdb  Creating
 Container zcbusdb  Created
 Container zcbusdb  Starting
 Container zcbusdb  Started
 Container zcbusnet  Creating
 Container zcbusnet  Created
 Container zcbusnet  Starting
 Container zcbusnet  Started
dbtype:mysql,db_ipport:192.168.2.56:3306,db_user:zcbus,db_pwd:AqJbPFSalFZFLEbO
192.168.2.55==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
192.168.2.55==➜ Check zcbusdb Connect Failed ,wait 10 seconds and retry 1 times ...
192.168.2.55==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
192.168.2.55==➜ Check zcbusdb Connect Failed ,wait 10 seconds and retry 2 times ...
192.168.2.55==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
0
192.168.2.55==➜ Check zcbusdb Connect Sucessfull...
192.168.2.55==➜ =============will load data mode for server================
192.168.2.55==➜ Will Install for load zcbus's data...
192.168.2.55==➜ Start Load data to zcbusdb ...
init db for ZCBUS_VERSION:simple_server ZCTYPE:server...
INFO => initDB first time ...
INFO => change password for zcbus...
INFO => finished password for zcbus...
INFO => sql source /zcbus/createdb.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
INFO => DEAL sql file account_api...
INFO => DEAL sql file account_menu...
INFO => DEAL sql file account_rel_menu_api...
INFO => DEAL sql file account_rel_role_menu...
INFO => DEAL sql file bus_dict_item...
INFO => DEAL sql file bus_dict_type...
INFO => DEAL sql file bus_dict_style...
INFO => DEAL sql file bus_cluster_version...
INFO => DEAL sql file bus_parameter_module...
INFO => DEAL sql file custom_charset_to_big5...
INFO => DEAL sql file bus_customerid_sequence...
INFO => DEAL sql file simple_server...
INFO => DEAL sql file bus_parameter_module_image...
INFO => DEAL sql file bus_sys_parameter...
INFO => DEAL sql file bus_sql_parameter...
INFO => DEAL sql file bus_service_type_model...
INFO => DEAL sql file bus_search_group...
INFO => DEAL sql file bus_search_group_sql...
INFO => DEAL sql file bus_search_group_sql_map...
INFO => DEAL sql file bus_tool_sql_record...
INFO => DEAL sql file bus_api_key_map...
INFO => DEAL sql file bus_dict_table_column...
INFO => DEAL sql file bus_dict_table_type...
INFO => DEAL sql file bus_aux_publish_down_tab_list...
INFO => DEAL sql file bus_aux_publish_up_tab_list...
INFO => DEAL sql file bus_msg_dispatch...
INFO => DEAL sql file bus_msg_model...
INFO => DEAL sql file sys_article...
INFO => DEAL sql file bus_dict_table_list...
INFO => DEAL sql file zbomc_sys_password_blacklist...
INFO => DEAL sql file update_cache...
INFO => DEAL sql file p1_server...
INFO => DEAL sql file p2...
INFO => DEAL sql file auxservstart...
INFO => Will exec sql for /zcbus/zcbus.v2.0.1.sql...
mysql: [Warning] Using a password on the command line interface can be insecure.
INFO => sql :select version from bus_cluster_version
mysql: [Warning] Using a password on the command line interface can be insecure.
===================not found upgrade sql =====================
INFO => Not Found upgrade sql file 
===============
192.168.2.55==➜ Finished Load data to zcbusdb sucessfull...
192.168.2.55==➜ Check zcbusdb Connect start ...
mysql: [Warning] Using a password on the command line interface can be insecure.
0
192.168.2.55==➜ Check zcbusdb Connect Sucessfull...

====>>>ZCBUS [ Tue Nov 19 16:41:30 CST 2024 ]
NAME       IMAGE                               COMMAND                  SERVICE    CREATED          STATUS          PORTS
zcbusdb    reg.zbomc.com/zcbus_mysql:v2.0.1    "docker-entrypoint.s…"   zcbusdb    33 seconds ago   Up 28 seconds   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
zcbusnet   reg.zbomc.com/zcbus_server:v2.0.1   "/bin/bash -c ${ZCBU…"   zcbusnet   29 seconds ago   Up 27 seconds   0.0.0.0:33060->33060/tcp, :::33060->33060/tcp
192.168.2.55==➜ 

192.168.2.55==[Step 13]: sync zcbus_docker to /data/zc01/zcbus/...
copy /data/zc01/simple_server/bin /data/zc01/zcbus/...

192.168.2.55==[Step 13]: ready basic soft for basic zcbus_docker server ...
Check hostname [zcbus_03]'s ip is :[192.168.2.55]
192.168.2.55==➜ ZC_IPADDRESS :192.168.2.55
192.168.2.55==➜ ==============>/data/zc01/zcbus========192.168.2.55=======

Note: add zcbus_docker service
? add zcbus_docker service successfully ...
192.168.2.55==➜ Read Master database info to /data/zc01/simple_server/config/zcbus_master.ini
[INF] load libmysqlclient.so
[LV0] 2024-11-19 16:41:35: connect to mysql zcbus/***@192.168.2.55:33060 ...
[INF] set client character set utf8mb4...
[INF] new client character set: utf8mb4
[INF] MYSQL VERSION: 50743
[INF] MYSQL INFO: 5.7.43-log
SET SESSION sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
[INF] connection test ok.
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
192.168.2.55==➜ sync basic info to /data/zc01/zcbus/ begin ...
copy /data/zc01/simple_server/bin /data/zc01/zcbus/...
copy /data/zc01/simple_server/yaml /data/zc01/zcbus/...
copy /data/zc01/simple_server/common/add_zcbus_docker_service.sh /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/docker.service /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus_client.rsp /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus_docker.service /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus.properties /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/zcbus.yml /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/.check /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/common/.zcbus.common /data/zc01/zcbus/common/...
copy /data/zc01/simple_server/zcmgr.sh /data/zc01/zcbus/...
copy /data/zc01/simple_server/soft/docker-20.10.10.tgz /data/zc01/zcbus/soft/...
copy /data/zc01/simple_server/soft/docker-compose-Linux-x86_64 /data/zc01/zcbus/soft/...
copy /data/zc01/simple_server/soft/zcbus /data/zc01/zcbus/soft/...
192.168.2.55==➜ sync basic info to /data/zc01/zcbus/ end ...
192.168.2.55==➜ Test zcbus_docker Connect to zcbus_master.ini Sucessfull...
192.168.2.55==➜ =========================== ready restart zcbus_docker ====================
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
 Container zcbuscache  Creating
 Container zcbusdb  Running
 Container zcbusnet  Running
 Container zcbusjob  Creating
 Container zcbusrestapi  Creating
 Container zcbusrestapi  Created
 Container zcbusvue  Creating
 Container zcbuscache  Created
 Container zcbusjob  Created
 Container zcbusvue  Created
 Container zcbuscache  Starting
 Container zcbusjob  Starting
 Container zcbusrestapi  Starting
 Container zcbuscache  Started
 Container zcbusrestapi  Started
 Container zcbusvue  Starting
 Container zcbusjob  Started
 Container zcbusvue  Started
192.168.2.55==➜ sync config info to /data/zc01/zcbus/ begin ...
copy /data/zc01/simple_server/config /data/zc01/zcbus/...
copy /data/zc01/simple_server/yaml /data/zc01/zcbus/...
192.168.2.55==➜ sync config info to /data/zc01/zcbus/ end ...
 Container zcbusvue  Restarting
 Container zcbusnet  Restarting
 Container zcbusrestapi  Restarting
 Container zcbusrestapi  Started
 Container zcbusnet  Started
 Container zcbusvue  Started
 Container zcbusnet  Running
 Container zcbuscache  Running
 Container zcbusdb  Running
 Container zcbusjob  Running
 Container zcbusrestapi  Running
 Container zcbusvue  Running
192.168.2.55==➜ =============================================================
192.168.2.55==➜ Manager console Website Address: http://192.168.2.55:8890
192.168.2.55==➜ Default login account : admin
192.168.2.55==➜ Default login password: 123456
192.168.2.55==➜ 
192.168.2.55==➜ =============================================================
192.168.2.55==✔ ----Zcbus has been installed and started successfully.----
➜ Install Zcbus  success !!!
✔ Install zcbus for 192.168.2.55... successfully ...

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

Note: ready for master host1:192.168.2.56

Note: Ready Master info 

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

Note: Copying /tmp/zcbus/create_rs_user.sh to root:192.168.2.56:/tmp/zcbus/
➜ Copy /tmp/zcbus/create_rs_user.sh to root:192.168.2.56:/tmp/zcbus/ ok ...

Note: Ready Master info 
mysql: [Warning] Using a password on the command line interface can be insecure.

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

Note: Ready slave /tmp/zcbus info 

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

Note: Copying /tmp/zcbus/sync_master_data.sh to root:192.168.2.55:/tmp/zcbus/
➜ Copy /tmp/zcbus/sync_master_data.sh to root:192.168.2.55:/tmp/zcbus/ ok ...

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 root:192.168.2.55:/tmp/zcbus/
➜ Copy /tmp/zcbus/zc_sync_slave.sh to root:192.168.2.55:/tmp/zcbus/ ok ...

Note: Running Slave for 192.168.2.55
 Container zcbuscache  Running
 Container zcbusdb  Recreate
 Container zcbusnet  Running
 Container zcbusrestapi  Running
 Container zcbusvue  Running
 Container zcbusjob  Running
 Container zcbusdb  Recreated
 Container zcbusdb  Starting
 Container zcbusdb  Started
zcbusdb
===> check zcbus'mysql server ...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Wait 5 seconds and retry ...
===> check zcbus'mysql server ...
mysql: [Warning] Using a password on the command line interface can be insecure.
now()
2024-11-19 16:42:16
Check Database ok ...
===> 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 5076139 ...
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.2.56
                  Master_User: zcbus_ref
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: my-bin.000003
          Read_Master_Log_Pos: 5076139
               Relay_Log_File: efd66fe8a935-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: 5076139
              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: 2
                  Master_UUID: bd3ee030-a651-11ef-a752-0242ac120002
             Master_Info_File: mysql.slave_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: 05c3e711-a652-11ef-aa07-0242ac140002:1-1618
                Auto_Position: 0
         Replicate_Rewrite_DB: 
                 Channel_Name: 
           Master_TLS_Version: 
execute sucessfull...

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

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

Note: Copying /tmp/zcbus/create_rs_user.sh to root:192.168.2.55:/tmp/zcbus/
➜ Copy /tmp/zcbus/create_rs_user.sh to root:192.168.2.55:/tmp/zcbus/ ok ...

Note: Ready Master info 
mysql: [Warning] Using a password on the command line interface can be insecure.

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 root:192.168.2.56:/tmp/zcbus/
➜ Copy /tmp/zcbus/sync_to_master_data.sh to root:192.168.2.56:/tmp/zcbus/ ok ...

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

Note: Copying ./scripts/sync_master.sh to root:192.168.2.56:/tmp/zcbus/
➜ Copy ./scripts/sync_master.sh to root:192.168.2.56:/tmp/zcbus/ ok ...

Note: Ready master for 192.168.2.56
===> Get Master logs ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
file my-bin.000005 . position 5067026 ...
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.2.55
                  Master_User: zcbus_ref
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: my-bin.000005
          Read_Master_Log_Pos: 5067026
               Relay_Log_File: e238a7af7664-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: 5067026
              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: 05c3e711-a652-11ef-aa07-0242ac140002
             Master_Info_File: mysql.slave_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: bd3ee030-a651-11ef-a752-0242ac120002:1-808
                Auto_Position: 0
         Replicate_Rewrite_DB: 
                 Channel_Name: 
           Master_TLS_Version: 
execute sucessfull...

Note: ready for slave host2:192.168.2.55

6 主备节点运行状态检查

  • 查看帮助信息
[root@zcbustest gridV2]# ./zcsrv.sh -h
➜ Usage :
➜ ==================================================================
➜   >>> Version 2.0.1. copyright (C) 2021 Zcbus. inc. <<<  
➜ ==================================================================
➜       : install             # install grid for zcbus
➜       : uninstall           # uninstall grid all info 
➜       : switch view/run     # switch master'slave database service
➜       : update beforevalue aftervalue # update docker-compose/zcbus.properties's username or password 
➜       : add 192.168.0.101   # add  zcbus node for 192.168.0.101 
➜       : drop 192.168.0.101  # drop zcbus node for 192.168.0.101 
➜       : check all/trust/zcbus/db/web     # check zcbus's all info
➜       : oper stop/start/restart/ps       # oper zcbus's container operation 
➜       : test_conn           # check zcbus's db nodes's status 
  • 两节点状态检查
[root@zcbustest gridV2]# ./zcsrv.sh check zcbus
➜ *****************************************************************************
➜ ----------------------------  check work container --------------------------
➜ *****************************************************************************

Note: Ready work node 192.168.2.56 
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS          PORTS                                                           NAMES
5338e004eda3   reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   13 minutes ago   Up 13 minutes                                                                   zcbus
5ca5f45361cc   reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   13 minutes ago   Up 13 minutes   0.0.0.0:6600-6602->6600-6602/tcp, :::6600-6602->6600-6602/tcp   zcbuscache
95b647b89393   reg.zbomc.com/zcbus_job:v2.0.1       "sh /run.sh"             13 minutes ago   Up 13 minutes   7080/tcp                                                        zcbusjob


Note: Ready work node 192.168.2.55 
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS          PORTS                                                           NAMES
2e513ee42de3   reg.zbomc.com/zcbus_server:v2.0.1    "/bin/bash -c ${ZCBU…"   11 minutes ago   Up 11 minutes   0.0.0.0:6600-6602->6600-6602/tcp, :::6600-6602->6600-6602/tcp   zcbuscache
707926a70a8a   reg.zbomc.com/zcbus_job:v2.0.1       "sh /run.sh"             11 minutes ago   Up 11 minutes   7080/tcp                                                        zcbusjob

7 web界面登录

  • 登录主节点地址,容器内即可看到主备两节点的主机信息

文档更新时间: 2024-11-18 23:08   作者:liyue