New Contributor
Posts: 1
Registered: ‎10-31-2016

Hue- Hive error

[ Edited ]

I am getting the error when running the query 'Select * from table'


Fetching results ran into the following error(s):

Bad status for request TFetchResultsReq(fetchType=0, operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='\x85\x8b5\xa3\xd5\xe3N\xf6\x9a8t>5s\x8e\xd8', guid='v"\xf5\xdd\xf6>J\xc7\x98\x16K\xeau\x81C+')), orientation=4, maxRows=100): TFetchResultsResp(status=TStatus(errorCode=0, errorMessage='Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=7622f5dd-f63e-4ac7-9816-4bea7581432b]', sqlState=None, infoMessages=['*org.apache.hive.service.cli.HiveSQLException:Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=7622f5dd-f63e-4ac7-9816-4bea7581432b]:12:11', '', '', '', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$', '', '', 'org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$', 'org.apache.thrift.server.TThreadPoolServer$', '', 'java.util.concurrent.ThreadPoolExecutor$', ''], statusCode=3), results=None, hasMoreRows=None)


But able to get the result when I am running the same query from hive CLI and after invalidating running from impala also..


Environment Details:

cdh 5.7.1


Posts: 1,111
Topics: 1
Kudos: 285
Solutions: 134
Registered: ‎04-22-2014

Re: Hue- Hive error



This type of error can have various causes, but there are a few things to do before troubleshooting this much further:




Restart Hue and Hive services to make sure that HiveServer2 is talking to the Metastore properly and that any Hive sessions are cleared out.


If the problem still occcurs continue on...




Test with beeline. Hue talks to HiveServer2 and the exception you showed is returned by HiveServer2.  If you use the deprecated "hive" CLI, that communicates with the Metastore directly and impala-shell communicates with the daemon.  Testing with beeline will be a more accurate indicator of the HiveServer2 health.  Testing with Impala and hive CLI shows that the metastore is functioning, but now we need to determine if HiveServer2 seems to be ok.


Let us know the command you ran and the results

Cloudera Employee
Posts: 723
Registered: ‎07-30-2013

Re: Hue- Hive error

Are you using Impala HA with a Load Balancer?
Posts: 777
Registered: ‎05-16-2016

Re: Hue- Hive error

Can you verify where you logs are pointing .


also verify this in your hive-site.xml and make sure that value is true .


The above should help you.


also for fruther information refer this link