4

When I am running spark job on cluster mode I am facing following issue:

6/05/25 12:42:55 INFO Client: Application report for application_1464166348026_0025 (state: RUNNING)
16/05/25 12:42:56 INFO Client: Application report for application_1464166348026_0025 (state: FINISHED)
16/05/25 12:42:56 INFO Client:
         client token: N/A
         diagnostics: N/A
         ApplicationMaster host: 10.255.8.181
         ApplicationMaster RPC port: 0
         queue: root.pimuser
         start time: 1464172925289
         final status: FAILED
         tracking URL: http://test-hadoop-001.localdomain:8088/proxy/application_1464166348026_0025/history/application_1464166348026_0025/2
         user: pimuser
Exception in thread "main" org.apache.spark.SparkException: Application application_1464166348026_0025 finished with failed status
        at org.apache.spark.deploy.yarn.Client.run(Client.scala:927)
        at org.apache.spark.deploy.yarn.Client$.main(Client.scala:973)
        at org.apache.spark.deploy.yarn.Client.main(Client.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
16/05/25 12:42:56 INFO ShutdownHookManager: Shutdown hook called

Following Command I am using to run the job.

spark-submit --driver-java-options -XX:MaxPermSize=2048m --driver-memory 4g --deploy-mode cluster  --master yarn --files cluster.xls  --class com.app.test.Matching    target/test-0.0.1-SNAPSHOT-jar-with-dependencies.jar

Even I tried --master yarn-cluster also but I got same error.

I am using cloudera 5.5 ,Hadoop 2.6.0-cdh5.5.1 and Spark 1.5 versions.

Aravind Kumar Anugula
  • 1,304
  • 3
  • 14
  • 35
  • I hope in your code you are setting `master` as `local`, that's why its failing. when you run the code In cluster remove the master setup from code and pass it as argument. – Shankar Sep 12 '16 at 13:22
  • Thanks Shankar. In my code I haven't set any deploy mode. I read in spark documentation i.e "**Alternatively, if your application is submitted from a machine far from the worker machines (e.g. locally on your laptop), it is common to use cluster mode to minimize network latency between the drivers and the executors. Currently only YARN supports cluster mode for Python applications.**" [http://spark.apache.org/docs/latest/submitting-applications.html](http://spark.apache.org/docs/latest/submitting-applications.html) – Aravind Kumar Anugula Sep 14 '16 at 05:41
  • 1
    I would look at the stdout/stderr in the driver logs to know what exactly has caused this? – Neeraj Malhotra Jun 13 '17 at 12:11

0 Answers0