ambari log-2018/12/5

master:10.0.7.10

masterSlaveTest:
克隆虚拟机测试,解决联网问题。

硬件地址Mac:00:50:56:21:6B:82
IP addr:10.0.7.9

克隆步骤:
只修改IP和硬件地址

在master下安装Ambari所有相关依赖,并克隆master,构建集群。

rpm -qa 列出所有安装包

查看可安装文件:
yum -y list java*

集群IP信息:
master: 10.0.7.10

slave ip

slaveone:11
slavetwo:12
slavethree:13
为了改善拼写主机时写配置文件,同时做到主机名见其名,得其义。需要更改主机名:

$>hostnamectl 显示主机名

主机名字记录在 /etc/hostname

原来为localhost.localdomain
现在改为slaveone

更改网络配置文件 /etc/hosts

讲新改的主机名替换掉旧的主机名。

SSH免登陆配置

mkdir .ssh
cd .ssh
ssh-keygen -t rsa
cat id_ras.pub>>authorized_keys

远程复制公钥到服务器

ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.10.211

更改文件权限

必须将.ssh文件和其下的authorized_keys分别设置权限为700和600

出现现象:
用OpenSSH的人都知ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免你受到DNS Hijack之类的攻击。

SSH对主机的public_key的检查等级是根据StrictHostKeyChecking变量来配置的。默认情况下,StrictHostKeyChecking=ask。简单描述下它的三种配置值:

1.StrictHostKeyChecking=no

#最不安全的级别,当然也没有那么多烦人的提示了,相对安全的内网测试时建议使用。如果连接server的key在本地不存在,那么就自动添加到文件中(默认是known_hosts),并且给出一个警告。

2.StrictHostKeyChecking=ask #默认的级别,就是出现刚才的提示了。如果连接和key不匹配,给出提示,并拒绝登录。

3.StrictHostKeyChecking=yes #最安全的级别,如果连接与key不匹配,就拒绝连接,不会提示详细信息。

抑制The authenticity of host ‘slavetwo (10.0.7.12)’ can’t be established的烦人提示

/etc/ssh/ssh_config
下的StrictHostKeyChecking=no

参考链接:
https://cwiki.apache.org/confluence/display/AMBARI/Quick+Start+Guide


2018/12/16

诶,又是一天,ambari已经成功搭建但是尝试搭建集群又失败,果然不是所有努力 都有回报的。没办法,硬着头皮 往下走吧:

参考这个博客搭建了本地repo,失败!
http://blog.51cto.com/tryingstuff/2066561

不过它给了我一些对于ambari更深入的了解。目前,我需要分析日志来获取配置失败 的原因。我希望从理论上分析一下日志信息,新的一天又开始了。


现在大概情况是这样的,我建了1台master,3台slave,不过我的机器也是够牛叉,跑4个虚拟机
一点都不费力。其他slave都没有问题,但是slave 2号,出现了repo异常,昨天因为忙着搭建
集群,所以没空理它,毕竟它和其他主机都是由master克隆过来的,出配置上的错误简直微乎其微。现在简单记录下它的日志吧:

[root@master .ssh]# ssh slavetwo
Last login: Wed Dec  5 08:50:02 2018 from 10.0.7.160
[root@slavetwo ~]# yum cleanall
Loaded plugins: fastestmirror
No such command: cleanall. Please use /usr/bin/yum --help
[root@slavetwo ~]# yum makecache fast
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo= ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable 
        or
            subscription-manager repos --disable=

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

也罢,另外一个博客,继续来吧,毕竟报告问题很重要!因为可以在以后出故障时挖掘出
重要信息

你可能感兴趣的:(ambari log-2018/12/5)