校验环境配置如出现MAC错误
./health_check/check_bk_controller.sh
##需要安装openss{l,h}组件
yum install -y openss{l,h}
以下错误仅限安装PAAS组件过程错误调试解决
1、日志信息(/var/log/messges)
curl:(52) Empty replay from server
Dec 9 08:27:50 i-zfg3v3vj license_server: 2021/12/09 08:27:50 http: TLS handshake error from 172.16.216.29:49600: EOF
Dec 9 08:28:00 i-zfg3v3vj license_server: 2021/12/09 08:28:00 http: TLS handshake error from 172.16.216.29:49618: EOF
Dec 9 08:28:10 i-zfg3v3vj license_server: 2021/12/09 08:28:10 http: TLS handshake error from 172.16.216.29:49634: EOF
2、根据报错排查license是否存在报错日志及信息
根据以上错误,检查/data/bkce/license/license/bin/license.sh
[root@i-zfg3v3vj bin]# ./license.sh
./license.sh: line 11: /data/bkce/bin/functions: No such file or directory
Usage: ./license.sh {start|stop|status}
[root@i-zfg3v3vj bin]# ./license.sh status
./license.sh: line 11: /data/bkce/bin/functions: No such file or directory
already running....
[root@i-zfg3v3vj bin]# cat -n /data/bkce/bin/functions
cat: /data/bkce/bin/functions: No such file or directory
根据license状态检查发现缺少functions文件
3、copy function文件至/data/bkce/bin目录
cp /data/install/functions /data/bkce/bin/
4、进入license.sh目录重启license服务(port 8443)
root@i-zfg3v3vj bin]# ./license.sh stop
[172.16.216.29]20211209-084519 38 stop license failed.
[root@i-zfg3v3vj bin]# ./license.sh start
[172.16.216.29]20211209-084526 31 start license done
[root@i-zfg3v3vj bin]# ./license.sh status
already running....
5、确认结果
http: TLS handshake error from 172.16.216.29:49634: EOF 报错消失
6、生成 paas.json、cmdb.json、job.json
source /data/install/load_env.sh
ssh $BK_NGINX_IP
确认jq命令已安装
ls -l /etc/consul.d/service/ 如果 paas.json、cmdb.json、job.json 这三个文件为空,请重新生成。
source /data/install/load_env.sh
for n in paas cmdb job; do
/data/install/bin/reg_consul_svc -n $n -p 80 -a $LAN_IP -D > /etc/consul.d/service/$n.json; consul reload
done
继续执行 ./bk_install paas
这里生成的三个文件,需要同步其他主机,并确认json文件中ip地址与初始分配安装组件ip一致
6、修改pass节点nginx的配置文件
vim /etc/consul-template/templates/nginx.conf
vim /usr/local/openresty/nginx/conf/nginx.conf
在配置文件的http{}段增加一行配置 server_names_hash_bucket_size 64; 如果64还不够,那么就按32的倍数往上加。
7、重新启动openresty.service、consul-template.service(paas节点)
此处需要注意的是, /usr/local/openresty/nginx/conf/nginx.conf配置文件,可能会被还原
systemctl status/stop/start consul-template.service
systemctl status/stop/start openresty.service
8、重新执行paas安装(主控)
# 安装 PaaS 平台及其依赖服务
./bk_install paas