搭建HA问题及解决方法
问题一:
[root@kdb1 ha.d]# /etc/init.d/KingbaseHA start
[root@kdb1 ha.d]# figured: /etc/opt/KingbaseHA/ha.d/ha.cf n[FAILED].
原因:/etc/opt/KingbaseHA/ha.d下没有ha.cf文件,之前是将其放在了/opt/KingbaseHA下
问题二:
安装kingbaseHA软件包
安装报错:package openhpi is not installed
package libhbaapi is not installed
error: Failed dependencies:
perl-TimeDate is needed by cluster-glue-1.0.5-1.x86_64
libHBAAPI.so.2()(64bit) is needed by heartbeat-3.0.3-1.x86_64
libHBAAPI.so.2()(64bit) is needed by heartbeat-libs-3.0.3-1.x86_64
ipvsadm is needed by ldirectord-1.0.3-1.x86_64
perl(Mail::Send) is needed by ldirectord-1.0.3-1.x86_64
perl(Socket6) is needed by ldirectord-1.0.3-1.x86_64
perl-MailTools is needed by ldirectord-1.0.3-1.x86_64
perl-Net-SSLeay is needed by ldirectord-1.0.3-1.x86_64
libHBAAPI.so.2()(64bit) is needed by pacemaker-1.0.9.1-1.4.x86_64
net-snmp is needed by pacemaker-1.0.9.1-1.4.x86_64
libHBAAPI.so.2()(64bit) is needed by pacemaker-mgmt-1.99.2-1.1.x86_64
原因缺少安装包
原因:安装包有问题。换个安装包
问题三:
[root@kdb2 ha.d]# /etc/init.d/KingbaseHA start
Starting KingbaseHA services: [FAILED]
heartbeat[3146]: 2018/12/20_08:08:50 ERROR: Illegal directive [[root@ha1] in /etc/opt/KingbaseHA/ha.d//ha.cf
heartbeat[3146]: 2018/12/20_08:08:50 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[3146]: 2018/12/20_08:08:50 info: Version 2 support: respawn
heartbeat[3146]: 2018/12/20_08:08:50 ERROR: Heartbeat not started: configuration error.
heartbeat[3146]: 2018/12/20_08:08:50 ERROR: Configuration error, heartbeat not started.
原因:配置文件ha.cf有问题
Apiauth mgmt uid=root(正确的写法) 管理接口的
且文件开头有些将#kdb1~之类的加入其中了。。。
问题四:
[kingbase@kdb2 bin]$ ./initdb -USYSTEM -W123456 --database=TEST --saousername=SYSSAO --saopassword=MANAGER --ssousername=SYSSSO --ssopassword=MANAGER -D /dbdata/data
./initdb: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
原因:因为最新的linux发行版本 libssl 和 libcrypto 升级的原因
解决办法:
只要创建相应的软链接就可以roo用户下
ln -s /lib/libssl.so.6 /usr/lib/libssl.so.6
#ln -s /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.0.9.8
#ln -s /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.0.9.8
如果没找到合适版本的libcrypto,可以从这里下载:http://www.openssl.org
然后
$ ./config shared
$ make
将编译目录生成的复制到 libcrypto.so.0.9.8 /usr/lib64/目录
然后初始化成功
问题五:
[kingbase@kdb2 bin]$ crm
crm(live)# show
ERROR: syntax: show
crm(live)# configure
cibadmin: /home/kingbase/KingbaseES/lib/libuuid.so.1: no version information available (required by /opt/KingbaseHA/lib/libplumb.so.2)
Signon to CIB failed: connection failed
Init failed, could not perform requested operations
ERROR: cannot parse xml: no element found: line 1, column 0
crm(live)configure# show
ERROR: No CIB!
相关问题:
http://linux-ha.996297.n3.nabble.com/CIB-process-quits-and-could-not-connect-to-CRM-td6059.html
问题解析:
查看日志:/var/log/ha-log
日志报错是mgmtd授权问题,查看之间配置的authkeys没问题,尝试先把kdb1资源配置好,
语句配置无问题后,kdb1错误提示:
ERROR: 6fc261db-e88c-42c3-874a-aabed73d4090: invalid object id
ERROR: FIP: required parameter ip not defined
WARNING: Filesystem: default timeout 20s for start is smaller than the advised 60
WARNING: Filesystem: default timeout 20s for stop is smaller than the advised 60
WARNING: PXD: default timeout 20s for start is smaller than the advised 120s
WARNING: kingbase: default timeout 20s for start is smaller than the advised 120
WARNING: kingbase: default timeout 20s for stop is smaller than the advised 120
ERROR: object Filesystemkingbase does not exist
ERROR: object FIP does not exist
Do you want to edit again? y
第一行错误提示是因为kdb2的object ID是自行添加的不识别
Kdb1和kdb2两端的资源只需配置一方便可,对端 object ID 没有自动同步
怀疑是防火墙问题!
关闭防火墙,/etc/init.d/iptables stop
问题六:
接问题五的处理结果后,报:
ERROR: 3: No closing quotation
Do you want to edit again?
问题解析:
此语句是建立的包含各配置资源的组
group kingbaseha PXD Filesystem kingbase
未在组里添加各资源
问题七:
ERROR: FIP: required parameter ip not defined
ERROR: object Filesystemkingbase does not exist
ERROR: object FIP does not exist
Do you want to edit again?
解决:怀疑FIP即虚拟IP被使用或未建组,
且先不配虚拟Ip