版本
Ambari:2.2.2.0
HDP:2.4.2.0
服务器:
使用阿里云的ECS:(3tai)
配置:
参考官网吧!!!(因为穷,刚开始因为配置低了,踩了很多坑,浪费了很多时间啊啊啊,还是要多赚钱,买服务器哇)
步骤:
参靠官网和其他的博客(有点懒,不想写了)
遇到的问题1:
1.需要安装http服务器:
安装成功要要能在浏览器中显示出一个主叶,楼楼刚开始在浏览器上啥也没有,就是一个“连接被重置”,但是80端口是通的
这个可能是ECS有关,找了阿里云的小哥哥看下,在云盾管理台中设置了下白名单就解决了这个问题。。。。
2.ERROR 2019-06-13 18:49:04,610 NetUtil.py:85 - SSLError: Failed to connect. Please check openssl library versions.
解决方法:
By adding below config in [security] section of
- vi /etc/ambari-agent/conf/ambari-agent.ini
- force_https_protocol=PROTOCOL_TLSv1_2
- vi /etc/python/cert-verification.cfg
- [https]
- verify=disable
2.因为之前有重装过,会出现no more mirrors to try”
解决方法:
可能原因是不正当的删除造成的。
尝试
yum clean all
yum makecache
yum -y update
命令 ,然后重新安装
3.搭建好ambari后,进入hive时,执行命令hive,报错:user=root, access=WRITE, inode="/user":hdfs:hdfs:drwxr-xr-x
解决方法:
# su - hdfs
$ hdfs dfs -mkdir /user/root
$ hdfs dfs -chown root:root /user/root
import paramiko
HOSTNAME="root"
PORT=22
HOSTFILE="/etc/hosts"
PASSWD="Wyx@2019"
HOSTS={"47.99.151.38":"192.168.0.29",
"47.99.79.221":"192.168.0.30",
"47.98.222.97":"192.168.0.31"}
path_file_new="/etc/hosts_new"
def copyhosts():
for key in HOSTS:
transport=paramiko.Transport(HOSTS[key],PORT)
transport.connect(username=HOSTNAME,password=PASSWD)
sftp=paramiko.SFTPClient.from_transport(transport)
sftp.put('/etc/hosts','/etc/hosts')
def change_host():
name=3
file = open(path_file_new, 'w')
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
for key in HOSTS:
NM="sw0%s"%name
ssh.connect(key,port=PORT,username=HOSTNAME,password=PASSWD
)
ssh.exec_command('hostname %s ' % NM)
file.write(HOSTS[key]+" "+NM+"\n")
name-=1
file.close()
ssh.exec_command('rm -rf /etc/hosts')
ssh.exec_command('mv /etc/hosts_new /etc/hosts')
def ssh_login():
change_host()
copyhosts()