Ambari CentOS集群搭建从入门到入土之换用Ubuntu-16

2018-12-5 CentOS安装失败

配置本地源后,出现如下日志信息:
在这里插入图片描述
查看日志:

==========================
Running setup agent script...
==========================

Command start time 2018-12-05 09:01:50
("INFO 2018-12-05 09:01:56,341 HeartbeatHandlers.py:116 - Stop event received
INFO 2018-12-05 09:01:56,341 NetUtil.py:130 - Stop event received
INFO 2018-12-05 09:01:56,344 ExitHelper.py:56 - Performing cleanup before exiting...
INFO 2018-12-05 09:01:56,345 ExitHelper.py:70 - Cleanup finished, exiting with code:0
INFO 2018-12-05 09:01:59,051 main.py:283 - Agent died gracefully, exiting.
INFO 2018-12-05 09:01:59,051 ExitHelper.py:56 - Performing cleanup before exiting...
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,355 DataCleaner.py:39 - Data cleanup thread started
INFO 2018-12-05 09:01:59,356 DataCleaner.py:120 - Data cleanup started
INFO 2018-12-05 09:01:59,356 DataCleaner.py:122 - Data cleanup finished
INFO 2018-12-05 09:01:59,357 hostname.py:67 - agent:hostname_script configuration not defined thus read hostname 'master' using socket.getfqdn().
INFO 2018-12-05 09:01:59,427 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2018-12-05 09:01:59,429 main.py:437 - Connecting to Ambari server at https://master:8440 (10.0.7.10)
INFO 2018-12-05 09:01:59,429 NetUtil.py:70 - Connecting to https://master:8440/ca
ERROR 2018-12-05 09:01:59,432 NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:618)
ERROR 2018-12-05 09:01:59,432 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.
WARNING 2018-12-05 09:01:59,433 NetUtil.py:124 - Server at https://master:8440 is not reachable, sleeping for 10 seconds...
", None)
("INFO 2018-12-05 09:01:56,341 HeartbeatHandlers.py:116 - Stop event received
INFO 2018-12-05 09:01:56,341 NetUtil.py:130 - Stop event received
INFO 2018-12-05 09:01:56,344 ExitHelper.py:56 - Performing cleanup before exiting...
INFO 2018-12-05 09:01:56,345 ExitHelper.py:70 - Cleanup finished, exiting with code:0
INFO 2018-12-05 09:01:59,051 main.py:283 - Agent died gracefully, exiting.
INFO 2018-12-05 09:01:59,051 ExitHelper.py:56 - Performing cleanup before exiting...
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,354 main.py:145 - loglevel=logging.INFO
INFO 2018-12-05 09:01:59,355 DataCleaner.py:39 - Data cleanup thread started
INFO 2018-12-05 09:01:59,356 DataCleaner.py:120 - Data cleanup started
INFO 2018-12-05 09:01:59,356 DataCleaner.py:122 - Data cleanup finished
INFO 2018-12-05 09:01:59,357 hostname.py:67 - agent:hostname_script configuration not defined thus read hostname 'master' using socket.getfqdn().
INFO 2018-12-05 09:01:59,427 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2018-12-05 09:01:59,429 main.py:437 - Connecting to Ambari server at https://master:8440 (10.0.7.10)
INFO 2018-12-05 09:01:59,429 NetUtil.py:70 - Connecting to https://master:8440/ca
ERROR 2018-12-05 09:01:59,432 NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:618)
ERROR 2018-12-05 09:01:59,432 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.
WARNING 2018-12-05 09:01:59,433 NetUtil.py:124 - Server at https://master:8440 is not reachable, sleeping for 10 seconds...
", None)

Connection to master closed.
SSH command execution finished
host=master, exitcode=0
Command end time 2018-12-05 09:02:02

Registering with the server...
Registration with the server failed.

前面exitcode=0,凭着我对Linux系统的简单认识,肯定是没有错误。因为:
返回值为0即为正常退出;为1或-1为错误终止退出

那么,我就截取出错这块日志,因为从这里出的问题,我真TM是个天才。仔细一看,what’s
the f…?完全看不懂。…

不过,看最后几行,有错误信息:

ERROR 2018-12-05 09:01:59,432 NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:618)
ERROR 2018-12-05 09:01:59,432 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.
WARNING 2018-12-05 09:01:59,433 NetUtil.py:124 - Server at https://master:8440 is not reachable, sleeping for 10 seconds...
", None)

这不是指示了一个链接吗?

https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.

诶?嘿嘿
不过上面的那个EOF违反协议,通过查看下面一行,应该是SSL协议,简单了解一下。
额:百度百科SSL

EOF在里面是什么字段呢?看着有点面熟。
度娘搜了下,毫无头绪,不过这位小老弟说的好像有道理:

https://blog.csdn.net/l09120204/article/details/52492689

额,那先不管EOF是SSL协议的什么字段,目前为止,所有的日志信息都指向一个地方,那就是SSL版本不对。

那么怎么更改SSL请求的版本呢?我想应该又是依赖包版本不兼容的问题。

注册了一个上面链接的账号:

https://bugzilla.redhat.com/show_bug.cgi?id=1022468 

我NM,告诉我这个:

You are not authorized to access bug #1022468.

Most likely the bug has been restricted for internal development processes and we cannot grant access.

If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue

If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

这可怎么办啊?我靠。我的内心是崩溃的…

无奈检查一下自己的openSSL版本,上面日志说让检查一下,那就检查一下啦。

检测一下是否安装openSSL: rpm -qa|grep -i openssl

[root@slavetwo ~]# rpm -qa|grep -i openssl
openssl-libs-1.0.2k-16.el7.x86_64
openssl-1.0.2k-16.el7.x86_64

centos下获取openssl的版本信息用命令:

openssl version
openssl version -a

本机SSL版本信息:

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

那…接下来能做什么呢?
这个版本的Ambari用的是什么版本的SSL呢?SSL在ambari的实现里,我没办法知道,
那就换个版本。
我的Ambari版本:

[root@slavetwo ~]# cd /etc/yum.repo.d
-bash: cd: /etc/yum.repo.d: No such file or directory
[root@slavetwo ~]# cd /etc/yum.repos.d
[root@slavetwo yum.repos.d]# ls
ambari.repo       CentOS-CR.repo         CentOS-fasttrack.repo  CentOS-Sources.repo  hdp.repo
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo      CentOS-Vault.repo
[root@slavetwo yum.repos.d]# cat ambari.repo
#VERSION_NUMBER=2.5.1.0-159
[ambari-2.5.1.0]
name=ambari Version - ambari-2.5.1.0
baseurl=http://10.0.7.10/ambari/centos7
gpgcheck=1
gpgkey=http:///10.0.7.10/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

Ambari-2.5.1.0这个版本有点老?我干掉它装个新的行不行?
怎么卸载?
https://kingding.iteye.com/blog/2423380
大概就是先停服务器,再移除服务器,其他的组件我没有卸载

ambari-server stop  
yum remove ambari-agent  
yum remove ambari-server 

应该是删除好了:

[root@master ~]#  ambari-server start
-bash: /usr/sbin/ambari-server: No such file or directory

再装一遍
最新版的是2.7.3
https://cwiki.apache.org/confluence/display/AMBARI/Installation+Guide+for+Ambari+2.7.3
将快速安装版链接改一下
这是里面quick start guide里面的链接:

wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.5.1.0/ambari.repo

我改成另一个版本不行吗?

再不行,只能手动安装了,我已经决定了

[root@master ~]# wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.7.3/ambari.repo
–2018-12-05 21:55:50-- http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.7.3/ambari.repo
Resolving public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)… 54.192.85.87, 54.192.85.200, 54.192.85.65, …
Connecting to public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)|54.192.85.87|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2018-12-05 21:55:51 ERROR 404: Not Found.

[root@master ~]# wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.7.3.0/ambari.repo
--2018-12-05 21:56:02--  http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.7.3.0/ambari.repo
Resolving public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)... 52.85.158.71, 52.85.158.182, 52.85.158.49, ...
Connecting to public-repo-1.hortonworks.com (public-repo-1.hortonworks.com)|52.85.158.71|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-12-05 21:56:03 ERROR 404: Not Found.

没办法,手动安装吧!


手动安装华丽的分割线,你个糟东西坏的很。


修补解决方案:从某个网站好像找到一个方法就是yum upgrade openssl更新一下版本,
不过当时的CentOS 7集群我删了,不想再试了

2018-12-20 卷土重来


2018-12-20


由于Amabri现在支持的CentOS版本过老,镜像网站都已经下载不到了,我也不想安装枪版,怕中毒。现在使用Ubuntu-Server-16来安装ambari,学习完Shell脚本基础的我感觉操作起来轻松多了。可以继续完成实验了。

我的局域网网络拓扑经过traceroute大致摸了一下是这样的:
在这里插入图片描述

10.0.7.180这个台主机是可以连接外网,但10.0.8.75由于其是开发环境不可连接外网,反复搞看能不能破坏一下10.101.1.10的路由策略,奈何计网学的不到位,根本在防火墙上打不了洞。只能通过跳板机10.0.7.180来向slaveone等三台主机发送文件。

apt的默认安装包路径在/var/cache/apt/archives

root@ubuntu:/# cd /var/cache/apt/archives
root@ubuntu:/var/cache/apt/archives# ls
adwaita-icon-theme_3.18.0-2ubuntu3.1_all.deb
dconf-gsettings-backend_0.24.0-2_amd64.deb
dconf-service_0.24.0-2_amd64.deb
fontconfig_2.11.94-0ubuntu1.1_amd64.deb
fontconfig-config_2.11.94-0ubuntu1.1_all.deb

参考连接:

  1. Ubuntu互传文件简单
  2. Ubuntu互传文件批量
  3. 离线安装debian包

安装Openssh客户端和服务端

      apt-get install ssh
      apt-get install openssh-server

启动服务端

      service ssh start

在能联网的服务器安装ssh是为了能够获得其完整的依赖包。因为Apt在联网的时候安装软件很简单,但是离线的情况下,Apt封装的包依赖解决就不再起作用了,但是你可以获得写着完整的依赖关系的清单,用清单和下载的依赖包去离线安装

我需要简单了解一下APT的机制:

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值