Problem creating spark context on Microsoft SQL Server Big Data Clusters.

Hello knime community!

For some time now we have been trying to connect to the HDFS and create spark context on our Spark cluster with the following workflow:

2022-01-10 10_10_27- - Remote Desktop Connection

Connecting to HDFS with kerberos seems to work fine, using HDFS connector (webHDFS with SSL/HttpFS with SSL) or KNOX, yet the Create Spark Context node gives the following error:

ERROR Create Spark Context (Livy) 3:8 Execute failed: Failed to upload Kryo version detector job: Cannot retry request with a non-repeatable request entity. (NonRepeatableRequestException)

We found this error message in the KNIME > org.knime.bigdata.spark.core.livy.source_4.4.0.v202106241517.jar > > 449. line
but couldn’t find what is causing it.
Running the node creates the livy session ID and the workfolder on HDFS for it, but crashes right after.
We overcame a lot of different errors, but got stuck here.

Is this UseCase supported on the Analytics Platform?
Are we missing a configuration?

Thanks in advance!

Hi @botichello and welcome to the KNIME community!

Running Spark via Livy on a secured cluster should work fine. Can you provide some details about your cluster (Type, Cluster Version and Spark Version)? E.g. Cloudera 7.1.7 and Spark 3.0.

The debug logs in KNIME might contain more information. You can enable them in Preferences → KNIME and then select DEBUG as Log Level. Can you post the logs here?

Hi @sascha.wolke!

We are using Microsoft Sql Server Big Data Clusters with CU13, It’s the 15.0.4178.15 version number (SQL Server Big Data Clusters CU13 release notes - SQL Server Big Data Clusters | Microsoft Docs),
with spark version of 3.1.2.

The Error logs for the relevant part are the following:

2022-01-10 14:31:19,593 : DEBUG : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : SparkJarRegistry : Create Spark Context (Livy) : 0:6 : Time to collect all jars for Spark version 3.0: 725 ms
2022-01-10 14:31:55,486 : DEBUG : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : LivySparkContext : Create Spark Context (Livy) : 0:6 : Uploading Kryo version detector job jar.
2022-01-10 14:31:55,524 : INFO  : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : LivySparkContext : Create Spark Context (Livy) : 0:6 : Destroying Livy Spark context 
2022-01-10 14:31:55,857 : INFO  : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : SparkContext : Create Spark Context (Livy) : 0:6 : Spark context sparkLivy://3405e6ed-a9ac-4c13-9fe1-5dcff85952a4 changed status from OPEN to CONFIGURED
2022-01-10 14:31:55,858 : DEBUG : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : Node : Create Spark Context (Livy) : 0:6 : reset
2022-01-10 14:31:55,858 : DEBUG : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : SparkNodeModel : Create Spark Context (Livy) : 0:6 : In reset() of SparkNodeModel. Calling deleteSparkDataObjects.
2022-01-10 14:31:55,858 : DEBUG : pool-7-thread-1 :  : DestroyAndDisposeSparkContextTask :  :  : Destroying and disposing Spark context: sparkLivy://3405e6ed-a9ac-4c13-9fe1-5dcff85952a4
2022-01-10 14:31:55,858 : INFO  : pool-7-thread-1 :  : LivySparkContext :  :  : Destroying Livy Spark context 
2022-01-10 14:31:55,859 : ERROR : KNIME-Worker-0-Create Spark Context (Livy) 0:6 :  : Node : Create Spark Context (Livy) : 0:6 : Execute failed: Failed to upload Kryo version detector job: Cannot retry request with a non-repeatable request entity. (NonRepeatableRequestException)
java.util.concurrent.ExecutionException: org.apache.http.client.ClientProtocolException
	at java.base/ Source)
	at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
	at org.knime.bigdata.spark.core.livy.context.LivySparkContext.waitForFuture(
	at org.knime.bigdata.spark.core.livy.context.LivySparkContext.uploadKryoVersionDetectorJob(
	at org.knime.bigdata.spark.core.livy.context.LivySparkContext.detectKryoVersion(
	at org.knime.bigdata.spark.core.context.SparkContext.ensureOpened(
	at org.knime.bigdata.spark.core.livy.node.create.LivySparkContextCreatorNodeModel2.executeInternal(
	at org.knime.bigdata.spark.core.node.SparkNodeModel.execute(
	at org.knime.core.node.NodeModel.executeModel(
	at org.knime.core.node.Node.invokeFullyNodeModelExecute(
	at org.knime.core.node.Node.execute(
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(
	at org.knime.core.util.ThreadUtils$
	at java.base/java.util.concurrent.Executors$ Source)
	at java.base/ Source)
	at org.knime.core.util.ThreadPool$
	at org.knime.core.util.ThreadPool$
Caused by: org.apache.http.client.ClientProtocolException
	at org.apache.http.impl.client.InternalHttpClient.doExecute(
	at org.apache.http.impl.client.CloseableHttpClient.execute(
	at org.apache.http.impl.client.CloseableHttpClient.execute(
	at org.apache.livy.client.http.LivyConnection.executeRequest(
	at org.apache.livy.client.http.LivyConnection.access$000(
	at org.apache.livy.client.http.LivyConnection$
	at java.base/ Method)
	at java.base/ Source)
	at org.apache.livy.client.http.LivyConnection.sendRequest(
	at org.apache.livy.client.http.HttpClient$
	at org.apache.livy.client.http.HttpClient$
	at java.base/ Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
	at java.base/ Source)
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
	at org.apache.http.impl.execchain.MainClientExec.execute(
	at org.apache.http.impl.execchain.ProtocolExec.execute(
	at org.apache.http.impl.execchain.RedirectExec.execute(
	at org.apache.http.impl.client.InternalHttpClient.doExecute(
	... 16 more

Hi @botichello,

I’m sorry, but KNIME currently only supports Spark up to version 3.0 and you have to select the matching Spark version in the Livy node. We are already working on this and hopefully support more Spark versions in one of the next KNIME releases.

Hi @sascha.wolke,

We have another server with BDC CU12
(SQL Server Big Data Clusters CU12 release notes - SQL Server Big Data Clusters | Microsoft Docs)
It uses Spark 2.4
and livy 0.6

Running this workflow with same configs and certificates to connect the server with 2.4 gives the exact same error log, so it’s surely not about the spark version.

Any other lead for this issue?

May I ask about your roadmap on the implementation of new spark versions?


Hi @botichello,

was this the full error log you posted above? The interesting part in the Stacktrace would be at the end and unfortunately seem to be missing. Maybe the Livy log contains some more information?

Right now we do not support Microsoft SQL Server Big Data Clusters as we never tested it. It seems to use the usual tools like Hadoop/Livy and you might be able to get it running with KNIME. I can’t reproduce this as I don’t have a test SQL Server Big Data Cluster at the moment.

Spark 3.2 support is on the next KNIME summer release roadmap, but it’s not yet finished and plans might change.

Thank you for the answers @sascha.wolke,

Sadly that is all the log I have, tried to config the spark logs with plugins/org.apache.axis…/lib/ (scala - Get Full Stack Trace in Spark Log - Stack Overflow), but It still shows “… 16 more”.

Can I configure it elsewhere?

I also found that it’s irrelevant, because those are already in the stacktrace
(stack trace - How to read the full stacktrace in Java where it says e.g. "... 23 more" - Stack Overflow)

So there won’t be more info in the spark logs.

Hi @botichello,

the logs above are from the Livy Client / Apache HttpClient that should use the KNIME logger, there is no Spark or Log4j involved at all. If there is nothing more, than the NonRepeatableRequestException seems to be the last mentioned problem. I have never seen such error before and can’t reproduce this right now. You might try to look into the Cluster logs and check KNOX, Livy and YARN container logs. Maybe its an permission problem and KNOX or Livy fails somewhere.

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