1. CM/CDH 安装包无法下载本文档为离线安装CDH 6.3.1 时,记录安装过程中出现的一些问题,供后续备查。
从2021年1月31日开始,所有Cloudera软件都需要有效的订阅,并且只能通过付费墙进行访问。之前的在线安装,目前都不能用了。
由于之前的CM 安装包和CDH parcel 包都不能直接通过cloudera官网下载了,这里需要手动下载相关的安装包,地址详见CM/CDH离线下载包。
下载好后,需要在CM安装集群上找台服务器配置安装包分发服务。参考官方文档CM 或 CDH,以及这篇比较全的文档,这里简单记录下安装包本地分发服务配置过程。
# 1. 下载CM/CDH 离线安装软件包,上传到安装包分发服务所在的服务器上 # 2. 安装、配置安装包分发服务 mkdir -p /var/www/html cd /var/www/html # 软连接已下载好的安装包 ln -s /data/cm6.3.1/ cm ln -s /data/cdh6.3.1 cdh ln -s /data/streamset_temp/ streamset # 安装 httpd 和 createrepo yum -y install httpd createrepo # 启动 httpd 服务并设置为开机自启动 systemctl start httpd && systemctl enable httpd ### 生成 CM RPM # 生成 RPM,注意最后必须有 . cd /var/www/html/cm/ && createrepo . # # 通过浏览器访问了:默认端口 80 http://122.112.xxx.16/cm/ ### 生成 CDH RPM # 生成 RPM,注意最后必须有 . cd /var/www/html/cdh/ && createrepo . # # 通过浏览器访问了:默认端口 80 http://122.112.xxx.16/cdh/ ### 生成 streamset RPM # 生成 RPM,注意最后必须有 . cd /var/www/html/streamset/ && createrepo . # # 通过浏览器访问了:默认端口 80 http://122.112.xxx.16/streamset/ # 3. 配置yum安装repo # 所有机器都需要配置 vi /etc/yum.repos.d/cloudera-repo.repo # 拷贝如下内容 [cloudera-repo] name=cloudera-repo # cm 分发地址 baseurl=http://122.112.xxx.16/cm/ enabled=1 gpgcheck=0 # 清理 yum clean all yum makecache
随后,在安装引导页面中,使用我们启动安装包分发服务地址即可。
之前安装时没截图,在网上找个图吧,内容是差不多的。
首先,按照错误提示排查下,如果还不行的话,比如我这次安装,是去Agent节点上卸载之前安装过的Agent,然后,手动重新安装,问题解决了,参考官方文档。
# CM 节点 检查端口 7182
netstat -anpl | grep 7182
# 所有安装Agent失败的节点
netstat -anpl | grep 9000
netstat -anpl | grep 9001
# 手动安装Agent
rpm -qa | grep cloudera
rpm -e --nodeps cloudera-manager-daemons-6.3.1-1466458.el7.x86_64
rpm -e --nodeps cloudera-manager-agent-6.3.1-1466458.el7.x86_64
yum install cloudera-manager-agent cloudera-manager-daemons -y
vim /etc/cloudera-scm-agent/config.ini server_host=${cm所在节点}
# 安装完后,不要启动Agent!!!!,不然会被CM自动纳管了,导致不能添加到新建的CDH集群中。
3. 安装Agent时,一直显示正在获取安装锁,然后失败
# 所有Agent安装失败的节点 rm -rf /tmp/scm_prepare_node.* rm -rf /tmp/.scm_prepare_node.lock4. 安装parcels时或启动集群后,提示主机运行状态不良
# 找到 cm_guid 所在位置 find / -name cm_guid # 删除 cm_guid rm -rf /var/lib/cloudera-scm-agent/cm_guid # 重启Agent systemctl restart cloudera-scm-agent5. Hive 中建表语句字段comment中文乱码
1. 首先,确保集群搭建时,Hive 元数据库(默认 metadata 库)的编码为 utf8 ; 2. 然后,登录到hive元数据库中,修改以下字段的编码为 utf8 即可: # root 添加远程登录访问 # GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '1qaz@WSX'; alter table COLUMNS_V2 modify column COMMENT varchar(256) character set utf8; alter table TABLE_PARAMS modify column PARAM_VALUE mediumtext character set utf8; 3. 删除之前建的表,重新建表即可6. parcel 包报错哈希验证失败
1. 首先检查本次parcel文件和manifest.json中的hash值是否一致
sha1sum /opt/cloudera/parcel-repo/Flink-1.11.3-BIN-SCALA_2.11-el7.parcel | awk '{ print $1 }'
cat Flink-1.11.3-BIN-SCALA_2.11-el7.parcel.sha
2. 如果两者一致,则可能是 httpd服务的问题
# 修改 /etc/httpd/conf/httpd.conf 添加parcel
vim /etc/httpd/conf/httpd.conf
#在模块添加 parcel选项
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz .parcel #此处添加.parcel
3. 重启http服务
[root@localhost bigdata]#systemctl restart httpd
多刷新几次CM管理台,等几分钟。如果不行的话,重启CM管理台
7. 在节点上切换 hdfs 用户时,su hdfs 报错“This account is currently not available”
检查 cat /etc/passwd 文件中 hdfs 账号:
# 所有节点上执行 cat /etc/passwd 发现 hdfs 账号显示为 nologin 禁止登陆 hdfs:x:995:992:Hadoop HDFS:/var/lib/hadoop-hdfs:/sbin/nologin 修改 nologin 为 login 即可: vim /etc/passwd hdfs:x:995:992:Hadoop HDFS:/var/lib/hadoop-hdfs:/bin/bash
未完待续。。。



