hue报错StructuredException: timed out (code THRIFTSOCKET): None的处理

通过hue的web界面进行hive的sql查询,无法显示结果并报错timeout

报错如下:
[28/Jul/2017 11:23:29 +0800] decorators ERROR error running <function execute at 0x7fa741ddc8c0>
Traceback (most recent call last):
File "/home/hadoop/.versions/hue-3.10.0/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator
return func(*args, **kwargs)
File "/home/hadoop/.versions/hue-3.10.0/desktop/libs/notebook/src/notebook/api.py", line 109, in execute
response[‘handle‘] = get_api(request, snippet).execute(notebook, snippet)
File "/home/hadoop/.versions/hue-3.10.0/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 64, in decorator
return func(*args, **kwargs)
File "/home/hadoop/.versions/hue-3.10.0/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 199, in execute
db.use(query.database)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/dbms.py", line 613, in use
return self.client.use(query)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 1053, in use
data = self._client.execute_query(query)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 748, in execute_query
return self.execute_query_statement(statement=query.query[‘query‘], max_rows=max_rows, configuration=configuration)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 752, in execute_query_statement
(results, schema), operation_handle = self.execute_statement(statement=statement, max_rows=max_rows, configuration=configuration, orientation=orientation)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 780, in execute_statement
res = self.call(self._client.ExecuteStatement, req)
File "/home/hadoop/.versions/hue-3.10.0/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 625, in call
res = fn(req)
File "/home/hadoop/.versions/hue-3.10.0/desktop/core/src/desktop/lib/thrift_util.py", line 376, in wrapper
raise StructuredException(‘THRIFTSOCKET‘, str(e), data=None, error_code=502)
StructuredException: timed out (code THRIFTSOCKET): None

解决方法:
修改配置文件

/home/hadoop/.versions/hue-3.10.0/desktop/conf/hue.ini
server_conn_timeout=120
改为,重启hue服务,好像没用
server_conn_timeout=1200

搜索了下网上说,如果通过Hue的web来执行Hive查询,需要启动HiveServer2服务

查看配置conf/hue.ini,连接的是uhadoop-bwgkeu-master2的10000端口,连接这个master2通过ps -ef|grep hive发现已经启动了的,于是重启服务,问题解决

[[email protected] log]$ ps -ef|grep hive
hadoop 3730 1 4 14:05 ? 00:00:19 /usr/java/jdk1.7.0_60/bin/java -Xmx1024m -Dhive.log.dir=/var/log/hive -Dhive.log.file=hive-server2.log -Dhive.log.threshold=INFO -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/home/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/home/hadoop -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Djava.library.path=/home/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xmx1000m -Xmx4096m -Xms1024m -XX:NewRatio=12 -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /home/hadoop/hive/lib/hive-service-1.2.1.jar org.apache.hive.service.server.HiveServer2 --hiveconf hive.aux.jars.path=file:///home/hadoop/hbase/lib/activation-1.1.jar,file:///home/hadoop/hbase/lib/antisamy-1.4.3.jar,file:///home/hadoop/hbase/lib/apacheds-i18n-2.0.0-M15.jar,file:///home/hadoop/hbase/lib/apacheds-kerberos-codec-2.0.0-M15.jar,file:///home/hadoop/hbase/lib/api-asn1-api-1.0.0-M20.jar,file:///home/hadoop/hbase/lib/api-util-1.0.0-M20.jar,file:///home/hadoop/hbase/lib/asm-3.2.jar,file:///home/hadoop/hbase/lib/avro-1.7.6-cdh5.8.0.jar,file:///home/hadoop/hbase/lib/aws-java-sdk-core-1.10.6.jar,file:///home/hadoop/hbase/lib/aws-java-sdk-kms-1.10.6.jar,file:///home/hadoop/hbase/lib/aws-java-sdk-s3-1.10.6.jar,file:///home/hadoop/hbase/lib/batik-css-1.7.jar,file:///home/hadoop/hbase/lib/batik-ext-1.7.jar,file:///home/hadoop/hbase/lib/batik-util-1.7.jar,file:///home/hadoop/hbase/lib/bsh-core-2.0b4.jar,file:///home/hadoop/hbase/lib/commons-beanutils-1.7.0.jar,file:///home/hadoop/hbase/lib/commons-beanutils-core-1.7.0.jar,file:///home/hadoop/hbase/lib/commons-cli-1.2.jar,file:///home/hadoop/hbase/lib/commons-codec-1.9.jar,file:///home/hadoop/hbase/lib/commons-collections-3.2.2.jar,file:///home/hadoop/hbase/lib/commons-compress-1.4.1.jar,file:///home/hadoop/hbase/lib/commons-configuration-1.6.jar,file:///home/hadoop/hbase/lib/commons-daemon-1.0.3.jar,file:///home/hadoop/hbase/lib/commons-digester-1.8.jar,file:///home/hadoop/hbase/lib/commons-el-1.0.jar,file:///home/hadoop/hbase/lib/commons-fileupload-1.2.jar,file:///home/hadoop/hbase/lib/commons-httpclient-3.1.jar,file:///home/hadoop/hbase/lib/commons-io-2.4.jar,file:///home/hadoop/hbase/lib/commons-lang-2.6.jar,file:///home/hadoop/hbase/lib/commons-logging-1.2.jar,file:///home/hadoop/hbase/lib/commons-math-2.1.jar,file:///home/hadoop/hbase/lib/commons-math3-3.1.1.jar,file:///home/hadoop/hbase/lib/commons-net-3.1.jar,file:///home/hadoop/hbase/lib/core-3.1.1.jar,file:///home/hadoop/hbase/lib/curator-client-2.7.1.jar,file:///home/hadoop/hbase/lib/curator-framework-2.7.1.jar,file:///home/hadoop/hbase/lib/curator-recipes-2.7.1.jar,file:///home/hadoop/hbase/lib/disruptor-3.3.0.jar,file:///home/hadoop/hbase/lib/esapi-2.1.0.jar,file:///home/hadoop/hbase/lib/findbugs-annotations-1.3.9-1.jar,file:///home/hadoop/hbase/lib/gson-2.2.4.jar,file:///home/hadoop/hbase/lib/guava-12.0.1.jar,file:///home/hadoop/hbase/lib/hadoop-annotations-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-auth-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-aws-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-client-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-common-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-hdfs-2.6.0-cdh5.4.9-tests.jar,file:///home/hadoop/hbase/lib/hadoop-hdfs-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-mapreduce-client-app-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-mapreduce-client-common-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-mapreduce-client-core-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-mapreduce-client-jobclient-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-mapreduce-client-shuffle-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-yarn-api-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-yarn-client-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-yarn-common-2.6.0-cdh5.4.9.jar,file:///home/hadoop/hbase/lib/hadoop-yarn-server-commo
hadoop 6471 1 0 Jun28 ? 00:18:22 /usr/java/jdk1.7.0_60/bin/java -Xmx1024m -Dhive.log.dir=/var/log/hive -Dhive.log.file=hive-metastore.log -Dhive.log.threshold=INFO -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/home/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/home/hadoop -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Djava.library.path=/home/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xmx1000m -Xmx4096m -Xms1024m -XX:NewRatio=12 -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /home/hadoop/hive/lib/hive-service-1.2.1.jar org.apache.hadoop.hive.metastore.HiveMetaStore
hadoop 8800 1 0 Jun28 ? 00:44:00 /usr/java/jdk1.7.0_60/bin/java -cp /home/hadoop/lib/hadoop-lzo.jar:/home/hadoop/share/hadoop/common/*:/home/hadoop/share/hadoop/common/lib/*:/home/hadoop/share/hadoop/yarn/*:/home/hadoop/share/hadoop/yarn/lib/*:/home/hadoop/spark/lib/*:/home/hadoop/hive/lib/*:/home/hadoop/hbase/lib/*:/home/hadoop/spark/conf/:/home/hadoop/spark/jars/*:/home/hadoop/conf/ -Xmx1g -XX:MaxPermSize=256m org.apache.spark.deploy.history.HistoryServer

配置文件说明:

[beeswax]
hive_server_host=uhadoop-bwgkeu-master2 # 连接hive的服务器
hive_server_port=10000    # hiveserver2的端口
hive_conf_dir=/home/hadoop/hive/conf    # 配置文件
server_conn_timeout=1200    # 超时实际

主机映射关系

# cat /etc/hosts

10.19.128.248 uhadoop-bwgkeu-master1
10.19.196.141 uhadoop-bwgkeu-core4
10.19.80.123 uhadoop-bwgkeu-core2
10.19.185.160 uhadoop-bwgkeu-core1
10.19.91.236 uhadoop-bwgkeu-core3
10.19.72.208 uhadoop-bwgkeu-master2

简单的hive查询验证是否能够正常查询:
SELECT s07.description, s07.salary, s08.salary,
s08.salary - s07.salary
FROM
sample_07 s07 JOIN sample_08 s08
ON ( s07.code = s08.code)
WHERE
s07.salary < s08.salary
ORDER BY s08.salary-s07.salary DESC
LIMIT 1000

简单hive查询的例子
SELECT s07.description, s07.salary
FROM
sample_07 s07
LIMIT 10

hive_shell查询:

# hive
hive> select * from tbl_push_user_req limit 3;
时间: 2024-11-05 18:35:35

hue报错StructuredException: timed out (code THRIFTSOCKET): None的处理的相关文章

解决hue报错:timed out (code THRIFTSOCKET): None

报错栈: [15/Jun/2017 19:25:15 +0800] decorators ERROR error running <function execute at 0x7fba2804ecf8> Traceback (most recent call last): File "/home/work/hue-3.10.0/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator r

hue解决timed out(code THRIFTSOCKET):None

报错栈: Traceback (most recent call last): File "/home/work/hue-3.10.0/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator return func(*args, **kwargs) File "/home/work/hue-3.10.0/desktop/libs/notebook/src/notebook/api.py&

http报错之return error code:401 unauthorized

 根据HTTP返回码所表示的意思应该是未授权,没有输入账号和密码,因此解决方法就直接在HTTP包里面携带密码. 先利用shell产生user and password 的base64编码 将账号为admin,密码为admin的信息经base64编码为YWRtaW46YWRtaW4=. $ echo -n admin:admin | base64 YWRtaW46YWRtaW4= 同样也可以利用产生的结果去验证是不是账号为admin,密码为admin. $ echo -n YWRtaW46YW

SQL Tuning Advisor报错ORA-00600: internal error code, arguments: [kesqsMakeBindValue:obj]

执行SELECT dbms_sqltune.report_tuning_task(:tuning_task) FROM dual;  报错信息如下: ORA-00600: internal error code, arguments: [kesqsMakeBindValue:obj], [], [], [], [], [], [], [] ORA-06512: at "SYS.PRVT_ADVISOR", line 1624 ORA-06512: at "SYS.DBMS_A

安装xcode6 beta 后调试出现Unable to boot the iOS Simulator以及编译苹果官方Swift的demo报错failed with exit code 1的解决的方法

苹果昨天公布新语言Swift(雨燕),须要安装xcode6 以及mac os 系统为10.9以上. (xcode6 beta 可在官方下载.须要登录开发人员账号:mac os 系统直接更新就可以.在此就不详细说明了) 在安装完成后,打开xcode6,新建一个项目,编译正常,但执行却出错.模拟器无法正常启动(黑屏),xcode弹出Unable to boot the iOS Simulator. 重装xcode6.重新启动后依然报错. 后来在苹果官方下载专门演示swift的demo,编译时出错:

xdebug 一直报错 upstream timed out (110: Connection timed out) while reading response header from upstream

本地主机(Windows环境192.168.66.1)访问虚拟机(192.168.66.139)里面的搭建的php环境(系统centos6.5版本,php版本是5.5.30 ,xdebug 2.4.0),通过命令行pecl install xdebug安装的xdebug, 在php.ini配置xdebug [Xdebug]zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.soxdeb

Ambari启动hue报错

查看/usr/log/hue/error.log发现如下问题 [24/Nov/2019 16:57:53 ] supervisor ERROR Process /usr/lib/hue/build/env/bin/hue kt_renewer exited abnormally. Restarting it. [24/Nov/2019 16:57:53 ] supervisor ERROR Process /usr/lib/hue/build/env/bin/hue runcpserver ex

hive报错 Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections,

学习hive 使用mysql作为元数据  hive创建数据库和切换数据库都是可以的 但是创建表就是出问题 百度之后发现 是编码问题 特别记录一下~~~ 1.报错前如图: 2.在mysql数据库中执行如下: 1 ALTER DATABASE hive CHARACTER SET latin1; 3.修改编码后创建数据库成功:

解决HUE报错MultipleObjectsReturned: get() returned more than one Document2 -- it returned 2!

表现:界面上报错:,刚登陆进去就能看到,点击执行也会出现.日志里报: Traceback (most recent call last): File "/home/work/hue-3.10.0/desktop/libs/notebook/src/notebook/decorators.py", line 81, in decorator return func(*args, **kwargs) File "/home/work/hue-3.10.0/desktop/libs