title: Application failed 2 times due to AM Container
body: <p>
  Hi All,</p>
  
  <p>I am running a Spark job written in JAVA which is processing an Eexcel file and writing the output as a JSON string. </p>
  
  <p>The Excel file to be processed is kept in S3. I am running the job on Amazon EMR.  </p>
  
  
  
  <p>
  The result should be a JSON string </p>
  
  <p>
  But i am getting the following error </p>
  
  <pre><code>diagnostics: Application application_1513081568718_0001 failed 2 times due to AM Container for app
  attempt_1513081568718_0001_000002 exited with  exitCode: 10
  For more detailed output, check application tracking page:http://ip-172-31-76-243.ec2.internal:8088/cluster/app/application_1513081568718_0001Then, click on links to logs of each attempt.
  Diagnostics: Exception from container-launch.
  Container id: container_1513081568718_0001_02_000001
  Exit code: 10
  </code></pre>
  
  <p>Any help is highly appreciated.</p>