前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Amabri 单机踩坑

Amabri 单机踩坑

作者头像
DataScience
发布2019-12-30 11:34:53
1K0
发布2019-12-30 11:34:53
举报
文章被收录于专栏:A2DataA2Data
生活

就是一系列下定决心的努力

· 正 · 文 · 来 · 啦 ·

点击红色“Failed”,查看详细错误:

代码语言:javascript
复制
==========================
Creating target directory...
==========================

Command start time 2018-11-27 22:13:32
chmod: cannot access ‘/var/lib/ambari-agent/data’: No such file or directory

Connection to master.hadoop closed.
SSH command execution finished
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Copying ambari sudo script...
==========================

Command start time 2018-11-27 22:13:32

scp /var/lib/ambari-server/ambari-sudo.sh
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Copying common functions script...
==========================

Command start time 2018-11-27 22:13:32

scp /usr/lib/python2.6/site-packages/ambari_commons
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Copying create-python-wrap script...
==========================

Command start time 2018-11-27 22:13:32

scp /var/lib/ambari-server/create-python-wrap.sh
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Copying OS type check script...
==========================

Command start time 2018-11-27 22:13:32

scp /usr/lib/python2.6/site-packages/ambari_server/os_check_type.py
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Running create-python-wrap script...
==========================

Command start time 2018-11-27 22:13:32

Connection to master.hadoop closed.
SSH command execution finished
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:32

==========================
Running OS type check...
==========================

Command start time 2018-11-27 22:13:32
Cluster primary/cluster OS family is redhat7 and local/current OS family is redhat7

Connection to master.hadoop closed.
SSH command execution finished
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:33

==========================
Checking 'sudo' package on remote host...
==========================

Command start time 2018-11-27 22:13:33

Connection to master.hadoop closed.
SSH command execution finished
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:33

==========================
Copying required files...
Ambari repo file not found: /etc/yum.repos.d/ambari.repo
==========================
Copying setup script file...
==========================

Command start time 2018-11-27 22:13:33

scp /usr/lib/python2.6/site-packages/ambari_server/setupAgent.py
host=master.hadoop, exitcode=0
Command end time 2018-11-27 22:13:33

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

Command start time 2018-11-27 22:13:33
Ambari repo file not found: /etc/yum.repos.d/ambari.repo

Connection to master.hadoop closed.
SSH command execution finished
host=master.hadoop, exitcode=2
Command end time 2018-11-27 22:13:34

ERROR: Bootstrap of host master.hadoop fails because previous action finished with non-zero exit code (2)
ERROR MESSAGE: Connection to master.hadoop closed.

STDOUT: Ambari repo file not found: /etc/yum.repos.d/ambari.repo

Connection to master.hadoop closed.

方案如下

代码语言:javascript
复制
主要问题出现在最后两行。
上网查找原因,,可能的原因有:

1,地址:http://stackoverflow.com/questions/27531215/ambari-1-7-0-cannot-register-datanodes-in-centos-cluster

说明:查看/etc/ambari-agent/conf/ambari-agent.ini文件,看hostname是否改成本机的主机名;

即,改成对应的master,slave1,slave2;

2,地址:http://superuser.com/questions/825443/registration-with-the-server-failed-while-configuring-amabri-on-centos-7

说明:CentOS版本问题,使用CentOS7的话会失败,使用CentOS6,5成功;

3,地址:http://stackoverflow.com/questions/38423925/ambari-confirm-hosts-step-fails-registration-with-the-server-failed

说明:中文和英文操作系统版本问题,中文操作系统出错,英文则成功;

Hey,thank both of you.i got it.The character in China is UTF8,and Ambari is ascii.And Python 2.6 for UTF8 has a bug.

和

I think this is because I set a non-English language (i.e,. Trad. Chinese) as a default language when I installed CentOs 7. It would encounter a charset problem (UTF-8<->ascii) when confirming hosts. After changing the default language to English, This problem has been solved.

解决方法是将系统的默认语言改成英语。
--------------------- 

‘ 所谓成功 ’

坚持把简单的事情做好就是不简单

坚持把平凡的事情做好就是不平凡

每个人都有潜在的能量,只是很容易--

被习惯所掩盖,

被时间所迷离,

被惰性所消磨。

那么,成功呢?就是在平凡中做出不平凡的坚持

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-11-27,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DataScience 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档