原文链接:https://blog.csdn.net/devalone/article/details/81356617
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),即可通过确认主机并完成注册。
网友评论