CDH5.16.2安装Hue、kylin、spark2遇到的坑

环境:centos7
# uname -a
Linux hadoop001 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
1、socket.error: [Errno 98] Address already in use
找了很久到底是哪个和hue冲突,原来是我们的一个小工具“宝塔linux面板”的端口号也是8888,。
解决:
修改“宝塔linux面板”的端口。
2、httpd: Could not reliably determine the server's fully qualified domain name, using 10.10.10.139. Set the 'ServerName' directive globally to suppress  this message
解决:
httpd安装完成后需要将httpd.conf中的serverName修改下:
#ServerName www.example.com:80
ServerName localhost:80
3、安装hue后Load Balancer角色启动不了,查看日志:
No such file or directory: '/var/log/hue-httpd/error_log'
解决:
mkdir /var/log/hue-httpd/error_log
chown hue:hue /var/log/hue-httpd/error_log
4、WARNING  Couldn't import snappy. Support for snappy compression disabled.
解决:
pip install snappy
5、ImportError : No module named psycopg2
yum install python-devel postgresql-devel

可能是公司用的“书生云”使用的镜像和我平常使用的镜像不一样,这次安装问题很多。

安装HBASE:
未遇到问题

安装kylin:
https://mp.weixin.qq.com/s?__biz=MzI4OTY3MTUyNg==&mid=2247489540&idx=1&sn=a9a2c9bbb065987cd8756635c146800d&chksm=ec2ac80ddb5d411b69c49b17d7a3d4ae0807aa7427739320241076fa9f4f217a7a46e1154b04&scene=21#wechat_redirect

FAQ:
1、spark not found, set SPARK_HOME, or run bin/download-spark.sh
这里我选择使用spark1.6作为kylin的计算
解决:
cd SPARK_HOME
mkdir jars
cp ./assembly/lib/*.jar ./jars/
重新sh kylin.sh start 发现已经ok

 

安装spark2:
CDH自带的spark是1.x,想安装spark2.x,需要下载CDH的spark组件安装包:
SPARK2-2.4.0.cloudera2-1.cdh5.13.3.p0.1041012-el7.parcel.sha1
SPARK2-2.4.0.cloudera2-1.cdh5.13.3.p0.1041012-el7.parcel
SPARK2_ON_YARN-2.4.0.cloudera2.jar
manifest.json
下载地址:
http://archive.cloudera.com/spark2/parcels/latest/
http://archive.cloudera.com/spark2/csd/

将4个文件上传至/opt/cloudera/csd/
#修改文件归属
chown cloudera-scm:cloudera-scm SPARK2_ON_YARN-2.4.0.cloudera2.jar
#将原来安装CDH的manifest.json改名
mv /opt/cloudera/parcel-repo/manifest.json  /opt/cloudera/parcel-repo/manifest.json.bak
#将4个文件都拷贝到/opt/cloudera/parcel-repo/
cp /opt/cloudera/csd/SPARK2* /opt/cloudera/parcel-repo/
cp /opt/cloudera/csd/manifest.json /opt/cloudera/parcel-repo/
mv SPARK2-2.4.0.cloudera2-1.cdh5.13.3.p0.1041012-el7.parcel.sha1 SPARK2-2.4.0.cloudera2-1.cdh5.13.3.p0.1041012-el7.parcel.sha
然后在web上停止cm和CDH。
再执行命令:
hadoop001:
/opt/cloudera-manager/cm-5.16.1/etc/init.d/cloudera-scm-server restart
hadoop001-003:
/opt/cloudera-manager/cm-5.16.1/etc/init.d/cloudera-scm-agent restart
再在web上启动cm和CDH,在“主机”下有”parcel“,然后点击spark2,分配,激活。
最后再添加服务就OK了。
FAQ:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
vim /opt/cloudera/parcels/CDH-5.16.2-1.cdh5.16.2.p0.8/etc/spark/conf.dist/spark-env.sh (这里写的是CDH5.16.2,其实跟CDH5.16.1一样)
添加:
export SPARK_DIST_CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath)

CDH5.16.2安装Hue、kylin、spark2遇到的坑_第1张图片

 

 

你可能感兴趣的:(hadoop集群安装)