chenhemin0 2020-04-10
[ ~]$ gs_install -X /mnt/Huawei/db/clusterconfig.xml Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. Creating the backup directory. Successfully created the backup directory. Check the time difference between hosts in the cluster. Installing the cluster. Check install cluster condition. Successfully check install cluster condition. Installing applications on all nodes. Successfully installed APP. Initializing cluster instances Initializing ETCD instance. Distribute etcd communication keys. Successfully distribute etcd communication keys. Check the status of ETCD cluster. Successfully initialize ETCD instance. Segmentation fault
经分析排查,原因是在安装Python3的时候,没有指定目录,导致它的一些依赖库和系统自带的Python2库文件冲突导致的。使用下面的方法在各个节点重新安装Python3即可:
[ ~]# mkdir /usr/local/python373 [ ~]# tar -xzf /mnt/Python-3.7.3.tgz [ ~]# cd Python-3.7.3/ [ ~]# ./configure --prefix=/usr/local/python373&& make && make install 编辑/etc/profile,加入以下内容: [ ~]# vi /etc/profile export PATH=${PATH}:/usr/local/python373/bin [ ~]# source /etc/profile [ ~]# python3 -V Python 3.7.3
再次执行gs_install脚本,如下:
[ ~]$ gs_install -X /tmp/clusterconfig3C3D.xml Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. Creating the backup directory. Successfully created the backup directory. Check the time difference between hosts in the cluster. Installing the cluster. Check install cluster condition. Successfully check install cluster condition. Installing applications on all nodes. Successfully installed APP. Initializing cluster instances Initializing ETCD instance. Distribute etcd communication keys. Successfully distribute etcd communication keys. Check the status of ETCD cluster. Successfully initialize ETCD instance. Initializing database instance. ..........3130s Initializing cluster instances is completed. .Configuring standby datanode. ...............2475s Successfully configure datanode. .Stop database instance. ......36s Successfully stop database instance. .Configuring. Configuring the cluster. Successfully configuring the cluster. Configuration is completed. Load cluster configuration file. Start cm agent. Successfully start cm agent and ETCD in cluster. Warning: Auto failover switch closed. Starting the cluster. ============================================== .........39s Successfully starting the cluster. ============================================== .Registration settings have been skipped. [ ~]$ gs_om -t status Set output to terminal. --------------------------------------------------------------------Cluster Status-------------------------------------------------------------------- az_state : single_az cluster_state : Normal balanced : true ----------------------------------------------------------------------AZ Status----------------------------------------------------------------------- AZ:AZ1 ROLE:primary STATUS:ONLINE ---------------------------------------------------------------------Host Status---------------------------------------------------------------------- HOST:hwd01 AZ:AZ1 STATUS:ONLINE IP:192.168.120.22 HOST:hwd02 AZ:AZ1 STATUS:ONLINE IP:192.168.120.23 HOST:hwd03 AZ:AZ1 STATUS:ONLINE IP:192.168.120.24 ----------------------------------------------------------------Cluster Manager Status---------------------------------------------------------------- INSTANCE:CM1 ROLE:primary STATUS:ONLINE HOST:hwd01 ID:601 INSTANCE:CM2 ROLE:slave STATUS:ONLINE HOST:hwd02 ID:602 INSTANCE:CM3 ROLE:slave STATUS:ONLINE HOST:hwd03 ID:603 ---------------------------------------------------------------------ETCD Status---------------------------------------------------------------------- INSTANCE:ETCD1 ROLE:leader STATUS:ONLINE HOST:hwd01 ID:701 PORT:2379 DataDir:/opt/huawei/gaussdb/data_etcd1/data INSTANCE:ETCD2 ROLE:follower STATUS:ONLINE HOST:hwd02 ID:702 PORT:2379 DataDir:/opt/huawei/gaussdb/data_etcd1/data INSTANCE:ETCD3 ROLE:follower STATUS:ONLINE HOST:hwd03 ID:703 PORT:2379 DataDir:/opt/huawei/gaussdb/data_etcd1/data ----------------------------------------------------------------------CN Status----------------------------------------------------------------------- INSTANCE:cn_401 ROLE:no role STATUS:ONLINE HOST:hwd01 ID:401 PORT:8000 DataDir:/opt/huawei/gaussdb/data/data_cn INSTANCE:cn_402 ROLE:no role STATUS:ONLINE HOST:hwd02 ID:402 PORT:8000 DataDir:/opt/huawei/gaussdb/data/data_cn INSTANCE:cn_403 ROLE:no role STATUS:ONLINE HOST:hwd03 ID:403 PORT:8000 DataDir:/opt/huawei/gaussdb/data/data_cn ----------------------------------------------------------------------GTS Status---------------------------------------------------------------------- INSTANCE:GTS1 ROLE:primary STATUS:ONLINE HOST:hwd01 ID:441 PORT:7000 DataDir:/opt/huawei/gaussdb/data/gts INSTANCE:GTS2 ROLE:standby STATUS:ONLINE HOST:hwd02 ID:442 PORT:7000 DataDir:/opt/huawei/gaussdb/data/gts ---------------------------------------------------------Instances Status in Group (group_1)---------------------------------------------------------- INSTANCE:DB1_1 ROLE:primary STATUS:ONLINE HOST:hwd01 ID:1 PORT:40000 DataDir:/opt/huawei/gaussdb/data_db/dn1 INSTANCE:DB1_2 ROLE:standby STATUS:ONLINE HOST:hwd02 ID:2 PORT:40042 DataDir:/opt/huawei/gaussdb/data_db/dn1 INSTANCE:DB1_3 ROLE:standby STATUS:ONLINE HOST:hwd03 ID:3 PORT:40021 DataDir:/opt/huawei/gaussdb/data_db/dn1 ---------------------------------------------------------Instances Status in Group (group_2)---------------------------------------------------------- INSTANCE:DB2_6 ROLE:standby STATUS:ONLINE HOST:hwd01 ID:6 PORT:40021 DataDir:/opt/huawei/gaussdb/data_db/dn2 INSTANCE:DB2_4 ROLE:primary STATUS:ONLINE HOST:hwd02 ID:4 PORT:40000 DataDir:/opt/huawei/gaussdb/data_db/dn2 INSTANCE:DB2_5 ROLE:standby STATUS:ONLINE HOST:hwd03 ID:5 PORT:40042 DataDir:/opt/huawei/gaussdb/data_db/dn2 ---------------------------------------------------------Instances Status in Group (group_3)---------------------------------------------------------- INSTANCE:DB3_8 ROLE:standby STATUS:ONLINE HOST:hwd01 ID:8 PORT:40042 DataDir:/opt/huawei/gaussdb/data_db/dn3 INSTANCE:DB3_9 ROLE:standby STATUS:ONLINE HOST:hwd02 ID:9 PORT:40021 DataDir:/opt/huawei/gaussdb/data_db/dn3 INSTANCE:DB3_7 ROLE:primary STATUS:ONLINE HOST:hwd03 ID:7 PORT:40000 DataDir:/opt/huawei/gaussdb/data_db/dn3 -----------------------------------------------------------------------Manage IP---------------------------------------------------------------------- HOST:hwd01 IP:192.168.120.22 HOST:hwd02 IP:192.168.120.23 HOST:hwd03 IP:192.168.120.24 -------------------------------------------------------------------Query Action Info------------------------------------------------------------------ HOSTNAME: hwd01 TIME: 2020-04-10 07:40:20.544385 ------------------------------------------------------------------------Float Ip------------------------------------------------------------------ HOST:hwd01 DB1_1:192.168.120.22 IP: HOST:hwd02 DB2_4:192.168.120.23 IP: HOST:hwd03 DB3_7:192.168.120.24 IP:
###host字段指定授权使用该证书的etcd节点IP或子网列表,需要将etcd集群的3个节点都添加其中。cp etcd-v3.3.13-linux-amd64/etcd* /opt/k8s/bin/