1.注册出现timeout错误
#修改超时限制 /usr/lib/python2.6/site-packages/ambari_agent/security.py
def create_connection(self):
if self.sock:
self.sock.close()
logger.info("SSL Connect being called.. connecting to the server")
sock = socket.create_connection((self.host, self.port), 120)
2.EOF occurred in violation of protocol (_ssl.c:661)
#修改/etc/ambari-agent/conf/ambari-agent.ini
#在security最下面新增
[security]
force_https_protocol=PROTOCOL_TLSv1_2
- python SSL验证设置
终极解决方案:
① 查看 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),即可通过确认主机并完成注册。
- The repository with version 3.0.1.0-187 for this command has been marked as resolved. It will be used to report the version of the component which was installed spark-atlas-connector_3_0_1_0_187
问题: 安装时无法找到spark-atlas-connector
解决方案: 先用假的rmp完成后续部署,然后必要时再手动安装
在 root 目录下操作
yum install rpm-build
mkdir -p rpmbuild/SPECS/
vi rpmbuild/SPECS/spark-atlas-connector.spec
Name: spark-atlas-connector_3_0_1_0_187
Version: 3_0_1_0
Release: 187
Summary: -
Group: -
License: -
URL: http://
Vendor: -
Source: http://
Prefix: %{_prefix}
Packager: Karthik
BuildRoot: %{_tmppath}/%{name}-root
%description
Fake
%prep
%build
%install
%clean
%files
%changelog
rpmbuild -ba rpmbuild/SPECS/spark-atlas-connector.spec
mkdir -p repo/spark-atlas-connector
cp rpmbuild/RPMS/x86_64/spark-atlas-connector_3_0_1_0_187-3_0_1_0-187.x86_64.rpm repo/spark-atlas-connector/
createrepo repo/spark-atlas-connector
################### 如果createrepo命令未找到
yum install createrepo
##################
vi /etc/yum.repos.d/localrepo.repo
[localrepo]
name=spark-atlas-connector localrepo
baseurl=file:///root/repo/spark-atlas-connector
gpgcheck=0
enabled=1
yum makecache
5./usr/sbin/hst: line 321: install-activity-analyzer.sh: command not found
解决办法:删除smartsense-hst,然后重新安装
yum remove smartsense-hst
rm -rf /var/log/smartsense/
`
6.resource_management.core.exceptions.Fail: Failed to download file from http://ambari1:8080/resources/mysql-connector-java.jar due to HTTP error: HTTP Error 404: Not Found
解决方案:复制一份mysql-connector-java.jar文件到
/var/lib/ambari-server/resources
- cannot access ‘/var/lib/ambari-agent/data’: No such file or directory
手动创建文件夹
8.resource_management.core.exceptions.Fail: Failed to download file from http://BigData1:8080/resources/mysql-connector-java.jar due to HTTP error: HTTP Error 404: Not Found
# 问题分析,资源文件夹里找不到mysql-connector-java.jar文件
# 一般在/usr/share/java/mysql-connector-java.jar,复制过去即可
# 如果没有,先安装 yum install -y mysql-connector-java
cp /usr/share/java/mysql-connector-java.jar /var/lib/ambari-server/resources/