Error in Dataflow

Muruga Muthukrishnan 20 Reputation points
2023-03-14T15:26:47.15+00:00

Hi,

We are using synapse analytics, while loading data using dataflow we are getting the below error.

Error Message:

{"message":"Job failed due to reason: Cannot call methods on a stopped SparkContext.\nThis stopped SparkContext was created at:\n\norg.apache.spark.SparkContext.getOrCreate(SparkContext.scala)\norg.apache.livy.rsc.driver.SparkEntries.sc(SparkEntries.java:52)\norg.apache.livy.rsc.driver.SparkEntries.sparkSession(SparkEntries.java:66)\norg.apache.livy.repl.AbstractSparkInterpreter.postStart(AbstractSparkInterpreter.scala:144)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply$mcV$sp(SparkInterpreter.scala:114)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:89)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:89)\norg.apache.livy.repl.AbstractSparkInterpreter.restoreContextClassLoader(AbstractSparkInterpreter.scala:491)\norg.apache.livy.repl.SparkInterpreter.start(SparkInterpreter.scala:89)\norg.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:279)\norg.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:268)\nscala.concurrent.impl.Future$Prom. Details:java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext.\nThis stopped SparkContext was created at:\n\norg.apache.spark.SparkContext.getOrCreate(SparkContext.scala)\norg.apache.livy.rsc.driver.SparkEntries.sc(SparkEntries.java:52)\norg.apache.livy.rsc.driver.SparkEntries.sparkSession(SparkEntries.java:66)\norg.apache.livy.repl.AbstractSparkInterpreter.postStart(AbstractSparkInterpreter.scala:144)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply$mcV$sp(SparkInterpreter.scala:114)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:89)\norg.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:89)\norg.apache.livy.repl.AbstractSparkInterpreter.restoreContextClassLoader(AbstractSparkInterpreter.scala:491)\norg.apache.livy.repl.SparkInterpreter.start(SparkInterpreter.scala:89)\norg.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:279)\norg.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:268)\nscala.concurrent.impl.Futu","failureType":"UserError","target":"ADLS to Synapse","errorCode":"DFExecutorUserError"}

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,696 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,586 Reputation points Microsoft Employee
    2023-03-20T07:56:55.39+00:00

    Hello @Muruga Muthukrishnan,

    Thanks for the question and using MS Q&A platform.

    This error message indicates that the SparkContext used by the Azure Data Factory pipeline has been stopped and the pipeline job has failed as a result. Here are some steps that you can follow to troubleshoot and resolve this issue:

    1. Restart SparkContext: Try restarting the SparkContext to see if this resolves the issue. You can stop and start the SparkContext from the Azure portal.
    2. Check Logs: Check the logs of the Spark job to identify any errors or exceptions that may be causing the SparkContext to stop. The logs can provide more details about the root cause of the issue.
    3. Check Data Factory Dependencies: Check if all the required dependencies for the Data Factory pipeline are installed and configured properly. Ensure that there are no conflicting dependencies that may be causing issues with the SparkContext.
    4. Increase resources: If the above steps do not resolve the issue, try increasing the resources allocated to the Data Factory pipeline. You can increase the number of nodes, memory, or vCores for the Spark pool or modify the configuration of the Data Factory pipeline.
    5. If you are still unable to resolve the issue, you may open a support ticket where the backend engineers will assist you in troubleshooting and resolving the issue.

    Hope this helps. Do let us know if you any further queries.