Spark runs on Yarn cluster exitCode=13: Spark runs on Yarn cluster exitCode=13: hadoop hadoop

Spark runs on Yarn cluster exitCode=13:


It seems that you have set the master in your code to be local

SparkConf.setMaster("local[*]")

You have to let the master unset in the code, and set it later when you issue spark-submit

spark-submit --master yarn-client ...


If it helps someone

Another possibility of this error is when you put incorrectly the --class param


I had exactly the same problem but the above answer didn't work.Alternatively, when I ran this with spark-submit --deploy-mode client everything worked fine.