《Apache Kylin v1.5部署时报错:Please make sure the user has the privilege to run hbase shell》
2016-08-17 21:45
330 查看
一、生产场景
Hadoop:2.6.3版本Hive:1.1.1版本(鉴于《Sqoop将Oracle数据导入至Hive中界面无错却依旧没有数据导入》这篇文章中提到的Hive-1.1.1存在天坑,建议大家部署时换个版本,比如1.2.1版本甚好)(Metastore为Mysql5.1.73版本)
Zookeeper:3.4.5版本
Hbase:1.1.4版本
Kylin:v1.5版本
Centos:6.6版本 64位
官方给出的Kylin需要的一些依赖:
二、需求
需要在已有的Hadoop集群上部署Kylin v1.5三、问题描述
在部署时,通过Kylin自带的check-env.sh脚本检查环境时,除了显示Kylin的环境变量外,还显示Please make sure the user has the privilege to run hbase shell(据官方文档介绍,如若部署正常,运行该脚本仅仅显示Kylin环境变量而已,例如KYLIN_HOMEis set to{自己定义的位置})
官方对于check-env.sh的介绍:
KYLIN_HOME所在路径:
本地执行,除了显示Kylin的环境变量外,还显示“Please make sure the user has the privilege to run hbase shell”:
Kylin的启动/停止程序为kylin.sh,启动方式:./kylin.sh start 停止方式:./kylin.sh stop,在check-env.sh检查失败的情况下,启动Kylin,发现报同样的错误,启动不起来。
四、排查思路
①日志
想通过Kylin的日志解决,所以查看了kylin.log文件,可能由于kylin未启动起来,所以并没有输出信息。
②源码
日志这条路作废,只能改走源码这条路。查看check-env.sh源码如下:可以看到,源码-z是用来检测各环境变量是否存在,因为Kylin需要这些依赖。出错的是进行到第二步,所以可能是hbase环境变量的问题。
用hbase -version命令检测hbase环境变量是否配置正确:
果然报错!!!
查看hbase的环境变量配置,hbase是1.1.4版本,这里配置成了1.4.4版本
五、解决方案
①解决步骤
修改:使得配置生效:
再次启动kylin,目测应该正确的启动界面:
②二次问题
通过netstat -anp | grep 7070命令检查kylin运行的端口号7070是否启动:如上图所示,并没有启动。
③二次排查
再次查看kylin.log,发现有报错信息输出:④二次解决
推测了一下,可能是现主机内存没有4096M,调整为2048M,尝试一下:再次查看7070端口,发现成功启动
登录web页面验证
至此,问题解决,Apache Kylin部署成功。
六、反思总结
除了在配置环境变量时,要细心外,其实还有一个之前困惑已久的问题,在这次排错中得到了解决:配置环境变量时,~/.bashrc文件与/etc/profile文件的区别。①/etc/profile:
该文件登录操作系统时,为每个用户设置环境信息,当用户第一次登录时,该文件被执行。也就是说这个文件对每个shell都有效,用于获取系统的环境信息。也就是说,如果我的系统有root和you两个用户,当你以root身份在/etc/file下配置环境变量的时候,以you的身份登录,查看/etc/profile,是和root设置的是一致的,所以全局生效。
②~/.bashrc
该文件存储的是专属于个人bash shell的信息,当登录时以及每次打开一个新的shell时,执行这个文件。在这个文件里可以自定义用户专属的个人信息。从下图可以看出,当以root身份在~/.bashrc下配置环境变量时,换做you的身份登录,则不一致了,~/.bashrc只针对于当前设置它的用户,是局部的专属的。
建议部署kylin时环境变量配置在/etc/profile下,防止多次配置,或者不生效的情况发生。
七、参考文章
Linux下 环境变量/etc/profile、/etc/bashrc、~/.bashrc的区别相关文章推荐
- Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s are also using JDK installs
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Unity2017 Unable to list target platforms.Please make sure the android sdk path is correct.问题解决!
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s
- 安装zendServer 报错:Failed to access Web server. Please make sure that the Web server is ..的解决
- 49.The ORDERS table belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- tesseract-ocr 出现 错误 Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your "tessdata" directory.解决方案
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te