问题现象
扩容安装
coordinator
节点时,
gcinstall.py
脚本安装新
coordinator
节点后需要将原有
coordinator
节点上的元数据同步到新的
coordinator
节点上,此时
gcinstall.py
脚本将
会执行
gcadmin cpcorditbl coorHosts.xml
命令,在同步元数据时失败会打印该报错
信息
“fail to execute gcadmin cpcorditbl coorHosts.xml”
。
原因分析
gcadmin
在同步
coordinator
节点元数据时需要将原有
coordinator
节点的元数据打
包、拷贝到新节点上,然后解压到新
coordinator
节点上,最后将新
coordinator
节点
的
gclusterd
进程杀掉重启。出现该问题的原因是可能是由于元数据过多,在打包拷
贝的过程中超时造成的。此时可查看
gcintall.log
中是否有
“Error cause timeout”
确定。
解决办法
同步元数据超时导致扩容
coordinator
节点失败时,可在执行扩容安装时使用
“--
timeout”
参数设定更大的超时时间,
gcadmin
默认的超时时间为
5
分钟。
gcinstall.py
设定
timeout
的时间单位为分钟(
minute
),
help
信息如下所示:
Usage: gcinstall.py [options]
Options:
-h, --help show this help message and exit
-U, --upgrade upgrade install
--silent=SILENTCONFIG
use the supplied properties file for a 'silent'
install
--timeout=TIMEOUT sync coordinator node metadata
timeout,unit(minute),default 15mins.
--backup_dir=BACKUP_DIR
The package path of backup file,default
/home/$dbaUser.