安装配置和使用hue遇到的问题汇总

问题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 java

 

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 saslnode

 

gcc: error trying to exec ‘cc1plus’: execvp: No such file or directorypython

The package name is 'gcc-c++'

# yum install gcc-c++

( And # 'yum search ... ' is not very helpful 
with finding the package name.) mysql

 

 

 

问题2:

HUE 报错误:Filesystem root ‘/’ should be owned by ‘hdfs’

hue 文件系统根目录“/”应归属于“hdfs”c++

解决方案以下:web

修改 文件desktop/libs/hadoop/src/hadoop/fs/webhdfs.py 中的  DEFAULT_HDFS_SUPERUSER = ‘hdfs’  更改成你的hadoop用户sql

 

 

问题3:

启动hue web端 报错误:OperationalError: attempt to write a readonly database

解决:数据库

启动hue server的用户没有权限去写入默认sqlite DB,同时确保安装目录下全部文件的owner都是hadoop用户apache

 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中修改。api

<!--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

# MySQL

export MYSQL_HOME=/Users/hue/Dev/mysql

export CLASSPATH=$MYSQL_HOME/mysql-connector-java-5.1.38-bin.jar:$CLASSPATH

 

问题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 &
相关文章
相关标签/搜索