一.问题 Hash verification failed
在cdh5.8.2 web界面集群安装过程中,Parcels hash校验失败。
二.解决方法1(蒙蔽)
1.修改manifest.json的hash值
[root@hadoop-01 parcels]# cat CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel.sha
227d11e344698c70e654ca6768fc017735b73ae3
[root@hadoop-01 parcels]# sha1sum CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
cb7c70d07e68a256a1cb3b06e79e688ac64f3432 CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
[root@hadoop-01 parcels]# cat manifest.json | grep CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
"parcelName": "CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel",
[root@hadoop-01 parcels]# vi manifest.json
#按:/ 进入搜索模式,输入CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel,
将其的hash从227d11e344698c70e654ca6768fc017735b73ae3 改为cb7c70d07e68a256a1cb3b06e79e688ac64f3432
2.在web界面,单击 Back,再单击 Continue
三.解决方法2(根源)
假如解决方法1,还是不能解决,可能parcel文件损坏。
故需要重新下载,这时web界面不要关闭,单击 Back,再单击 Continue。
1.删除本地CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel文件
[root@hadoop-01 parcels]# rm -f CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
2.重新下载
[root@hadoop-01 parcels]# wget http://archive.cloudera.com/cdh5/parcels/5.8.2/CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
3.再次校验hash值,对比
[root@hadoop-01 parcels]# sha1sum CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
227d11e344698c70e654ca6768fc017735b73ae3 CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel
[root@hadoop-01 parcels]#
[root@hadoop-01 parcels]# cat CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel.sha
227d11e344698c70e654ca6768fc017735b73ae3
### 一致,就说明下载文件是完整的,未损坏
4.在web界面,单击 Back,再单击 Continue,发现error
ERROR:
? Src file /opt/cloudera/parcels/.flood/CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel/CDH-5.8.2-1.cdh5.8.2.p0.3-el6.parcel does not exist - hadoop-01 ...and 4 others
5.在web界面,果断快速的单击 Back
6. 手工去每台机器删除文件夹/opt/cloudera/parcels/.flood 和 重启agent
[root@hadoop-01 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-02 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-03 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-04 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-05 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-06 ~]# rm -rf /opt/cloudera/parcels/.flood
[root@hadoop-01 ~]# service cloudera-scm-agent restart
[root@hadoop-02 ~]# service cloudera-scm-agent restart
[root@hadoop-03 ~]# service cloudera-scm-agent restart
[root@hadoop-04 ~]# service cloudera-scm-agent restart
[root@hadoop-05 ~]# service cloudera-scm-agent restart
[root@hadoop-06 ~]# service cloudera-scm-agent restart
7. 在web界面,再单击 Continue,发现以下错误
? Untar failed with return code: 2, with tar output: stdout: [], stderr: [ gzip: stdin: invalid compressed data--crc error tar: Child returned status 1 tar: Error is not recoverable: exiting now ] - hadoop-04
8.谷歌,cloudera社区搜索,无法解决
9.再次执行 步骤6
10.关闭当前页,打开http://172.16.101.54:7180
11. 单击 Add Cloudera Management Service,创建cms服务
12.单击 Add Cluster,创建集群,失败,无法单击continue,应该是个bug
13. 强制卸载和清理的集群的文件和安装包
14. 重新安装,其界面如下
四. 吸取教训:
a.校验下载的文件
b当出现Hash verification failed,不要做解决方案1,直接执行解决方案2的step 1-3,然后单击back,再continue按钮
c.干脆执行解决方案2的step 13-14
五.备注
遇之问题,与之斗争,穷尽方法,提高自己,重新再来。