Ambari 安装确认主机 “SSLError“ 错误 终极解决方案

Ambari 安装过程中,确认主机步骤(Confirm Hosts) 遇到如下错误:

ERROR 2018-08-02 11:25:09,300 NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:579)
ERROR 2018-08-02 11:25:09,300 NetUtil.py:97 - SSLError: Failed to connect. Please check openssl library versions.
Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.

错误产生的原因可能有多个,根本原因是 openssl 和 ambi-agent 默认配置所致。下面总结的方案可以解决绝大部分状况:


终极解决方案:

① 查看 openssl 版本:

    [root@ambari ~]# openssl version
    OpenSSL 1.0.2k-fips  26 Jan 2017

    [root@ambari ~]# rpm -qa | grep openssl
    openssl-libs-1.0.2k-12.el7.x86_64
    openssl-1.0.2k-12.el7.x86_64


如果低于 openssl-1.0.1e-16.el6.x86_64 版本,则需要更新到 openssl-1.0.1e-16.el6.x86_64 及以上版本

② 查看 Python 版本:

    [root@ambari ~]# python -V
    Python 2.7.5

如果低于 Python 2.7 版本,则升级 Python 到 2.7 及以上版本。


③ 编辑 /etc/python/cert-verification.cfg 配置文件,将 [https] 节的 verify 项设为禁用:

    [root@ambari ~]# vi /etc/python/cert-verification.cfg
    # Possible values are:
    # 'enable' to ensure HTTPS certificate verification is enabled by default
    # 'disable' to ensure HTTPS certificate verification is disabled by default
    # 'platform_default' to delegate the decision to the redistributor providing this particular Python version

    # For more info refer to https://www.python.org/dev/peps/pep-0493/
    [https]
    verify=disable

保存退出。


④ 编辑 /etc/ambari-agent/conf/ambari-agent.ini 配置文件,在 [security] 节部分,确保设置如下两个值,其它值保持不变:

    [root@ambari ~]# vi /etc/ambari-agent/conf/ambari-agent.ini

    [security]
    ssl_verify_cert=0
    force_https_protocol=PROTOCOL_TLSv1_2


保存退出,重启 ambari-agent:

    [root@ambari ~]# ambari-agent restart


重新执行确认主机步骤(Confirm Hosts),即可通过确认主机并完成注册。

 

 

 

  • 9
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 9
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值