Skip to main content
ssubhas
Gold ⭐️
Gold ⭐️
August 26, 2017

ERROR: "Couldn't find log associated with operation handle: OperationHandle [opType=EXECUTE_STATEMENT" while running Hive queries from Hue

  • October 5, 2026 at 8:41 AM
  • 2 replies
  • 7710 views
  • Translate All

While running Hive query from Hue, the query fails with the following error:

WARN [HiveServer2-Handler-Pool: Thread-41]: thrift.ThriftCLIService (ThriftCLIService.java:FetchResults(596)) - Error fetching results:
org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated with operation handle:
OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=1cd26ef5-00f8-4003-be5c-65e2a542ee18]
at org.apache.hive.service.cli.operation.OperationManager.getOperationLogRowSet
(OperationManager.java:257)
at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:656)
at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:79)
at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:37)
at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:64)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:536)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:60)
at com.sun.proxy.$Proxy29.fetchResults(Unknown Source)
at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:427)
at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:587)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1553)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1538)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

This is a known issue which is recorded under Jira HIVE-15100 and Hortonworks Internal BUG-37219.

Workaround

  1. Hard code the hive.server2.logging.operation.log.location parameter to /tmp/hive/operation_logs
  2. Assign it permission level 777 on Hiveserver2 node

2 replies

Richardxu18
Silver ⭐️
April 13, 2024

Does the directory have to be /tmp/hive/operation_logs? in cdp cluster,the location is /var/log/hive/operation_logs, and permission level 777 on Hiveserver2 node . I found that there are files generated under this location,But This mistake still exists

Translate
VidyaSargur
Community Manager
Community Manager
April 15, 2024

@Richardxu18, as this is an older article, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this article as a reference in your new post.

Translate
Regards, Vidya Sargur, Community Manager Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.