Error when running DB Query Reader

I’m getting the below error. I’m using the hive connector node to connect to processdatalake, one of my collogues has set up their connection the same way without issue. Not sure where to start in order to troubleshoot this error, any direction would be helpful.

ERROR DB Query Reader 0:16 Execute failed: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380)
at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:257)
at org.apache.hive.service.cli.operation.SQLOperation.access$800(SQLOperation.java:91)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:363)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Hi @tkelhamMIL and welcome to the Knime Community.

It’s a bit hard to troubleshoot this without knowing what was done and how the workflow looks like.

May be we can start with 3 things to look at:

  1. What is the query that you are running?
  2. Was your connection still alive when you executed your query?
  3. Does the user you are using have the proper access?

I think all of the 3 above can be tested a once:

  1. Create a test workflow (new workflow file, or somewhere in your current workflow) with only the connector and the query reader/executor.
  2. Once the 2 nodes are ready, that is user is configured for the connector, and test query is ready for the query reader/executor, execute the query reader/executor node. It will automatically run the first node, that is the connector node, and make sure the query is run right after the connection is established.

This will make sure that the connection has not timed out, and will test if the user has proper access.

2 Likes

Hi @bruno29a the workflow is set up with a credentials node (yes, I have proper access and get a green stoplight. The query runs correctly when in datalake) , then there is a Hive connector node which also connects (green stoplight) which is then connected to the DB query reader which is where the error occurs when trying to run the query.
the query being run is rather simple
SELECT
column 1,
column 2,
column 3
FROM
DB.table
GROUP BY
column 1,
column 2,
column 3

the query does not run even when trying to “evaluate” the same error is returned

Hi @tkelhamMIL and welcome to the KNIME Community,

This might happen if Hive can’t launch the container on your cluster and might have many reasons. Not sure what cluster you are running but having a look in the YARN logs of the container launched by Hive usually brings up more details about the error.

Cheers
Sascha

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.