问题1:
error: command 'gcc' failed with exit status 1
make[2]: *** [/opt/hue/desktop/core/build/pycrypto-2.6.1/egg.stamp] 错误 1
make[2]: Leaving directory `/opt/hue/desktop/core'
make[1]: *** [.recursive-env-install/core] 错误 2
make[1]: Leaving directory `/opt/hue/desktop'
make: *** [desktop] 错误 2
gcc-c++
python-devel.x86_64
cyrus-sasl-devel.x86_64
yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
pip install thrift_sasl
pip install sasl
gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory
The package name is 'gcc-c++'
# yum install gcc-c++
( And # 'yum search ... ' is not very helpful
with finding the package name.)
问题2:
HUE 报错误:Filesystem root ‘/’ should be owned by ‘hdfs’
hue 文件系统根目录“/”应归属于“hdfs”
解决方案如下:
修改 文件desktop/libs/hadoop/src/hadoop/fs/webhdfs.py 中的 DEFAULT_HDFS_SUPERUSER = ‘hdfs’ 更改为你的hadoop用户
问题3:
启动hue web端 报错误:OperationalError: attempt to write a readonly database
解决:
启动hue server的用户没有权限去写入默认sqlite DB,同时确保安装目录下所有文件的owner都是hadoop用户
chown -R hadoop:hadoop hue-3.7.0-cdh5.4.2
问题4:
[17/Apr/2016 14:29:46 +0800] webhdfs ERROR Failed to determine superuser of WebHdfs at
http://master1:10070/webhdfs/v1: SecurityException: Failed to obtain user group information:
org.apache.hadoop.security.authorize.AuthorizationException: User: hue is not allowed to impersonate
hadoop (error 403)
要设置hue的启动用户为hdfs代理用户以访问webhdfs_api,默认为hue,可在hue.ini中修改。
<!--core-site.xml-->
<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value></property>
<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>*</value>
</property>
<!--hdfs-site.xml-->
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
问题5:
在hue3.7中配置了RDBMS query的mysql,但是查询结果中文却一直显示乱码
hue.ini中的option配置也到处找不到如何配置。后来还是在官网的QA中找到方法,修改options={ “init_command”:“SET NAMES ‘utf8’“}
问题解决。
问题6: hive查询时报错
org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated with operation handle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=b3d05ca6-e3e8-4bef-b869-0ea0732c3ac5]
解决方案:
将hive-site.xml中的hive.server2.logging.operation.enabled=true;
<property>
<name>hive.server2.logging.operation.enabled</name>
<value>true</value>
</property>
问题7:在hue里面查看HDFS文件浏览器报错:
当前用户没有权限查看,
cause:org.apache.hadoop.ipc.StandbyException: Operation category READ is not supported in state standby
解决方案:
Web页面查看两个NameNode状态,是不是之前的namenode是standby状态了. 我现有的集群就是这种情况, 由于之前的服务是master1起的, 挂了之后自动切换到master2, 但是hue中webhdfs还是配置的master1,导致在hue中没有访问权限. |
问题8:hue使用mysql作为元数据库
hue默认使用sqlite作为元数据库,不推荐在生产环境中使用。会经常出现database is lock的问题。
解决方法:
其实官网也有解决方法,不过过程似乎有点问题。而且并不适合3.7之后的版本。我现在使用的是3.11,以下是总结的最快的切换方法。
1, 先在mysql里面创建数据库hue,然后修改hue.ini
[[database]]
engine=mysql
host=slave1
port=3306
user=hadoop
password=hadoop
name=hue
完成以上的这个配置,启动Hue,通过浏览器访问,会发生错误,原因是mysql数据库没有被初始化
DatabaseError: (1146, "Table 'hue.desktop_settings' doesn't exist")
2, 初始化数据库
cd hue-release-3.11.0/build/env/
bin/hue syncdb
bin/hue migrate
执行完以后,可以在mysql中看到,hue相应的表已经生成。
启动hue, 能够正常访问了
问题9:开启hbase查询模块
需要在hbase集群已经启动的基础上,再启动thrift,默认端口为9090
hbase-daemon.sh start thrift
修改配置hue.ini的配置文件
[hbase] hbase_clusters=(Cluster|master1:9090) hbase_conf_dir=/usr/hbase-1.1.6/conf
Cluster 为在Hue展现中的名字,可配置多个hbase集群
master1:9090 hbase启动的thrift主机及端口
问题10:hue11.0的自定义RDBMS模块报错No suitable driver found for jdbc
Add the path to the driver JAR file to your Java CLASSPATH. Here, we set the CLASSPATH environment variable in our `.bash_profile` script.
1 2 3 |
|
问题11:hive查询报错TTransportException
在hue里面查询hive数据,之前一直使用正常,突然就查询不了,一直转不出结果最后页面可能还会报504 Gateway Time-out。查看日志定位error:
Could not connect to localhost:9090 (code THRIFTTRANSPORT): TTransportException('Could not connect to localhost:9090',)
看来可能是thrift服务器通信的原因,重启了hive的hiveserver2进程,问题解决。
nohup bin/hiveserver2 &