Spark Yarn/bin/bash:/bin/java:is a Directory__spark

Source: Internet
Author: User
Tags stack trace

Mac Os 10.12 +hadoop2.7.2+spark1.6.1


./bin/spark-submit--class org.apache.spark.examples.SparkPi     --master yarn--deploy-mode     - Driver-memory 4g     --executor-memory 2g     --executor-cores 1    lib/spark-examples*.jar     10

Error message

Container id:container_1498071443097_0003_02_000001 Exit code:127 Stack trace:exitcodeexception exitcode=127:at org. Apache.hadoop.util.Shell.runCommand (shell.java:545) at Org.apache.hadoop.util.Shell.run (shell.java:456) at Org.apache.hadoop.util.shell$shellcommandexecutor.execute (shell.java:722) at Org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer ( defaultcontainerexecutor.java:212) at Org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call (Containerlaunch.java : 302) at Org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call ( containerlaunch.java:82) at Java.util.concurrent.FutureTask.run (futuretask.java:266) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1142) at Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:617) at Java.lang.Thread.run ( thread.java:745) Container exited with a Non-zero exit code 127 failing this attEmpt.
	 Failing the application. Applicationmaster host:n/a applicationmaster RPC Port:-1 queue:default start time:1498071881965 final status: 
 FAILED Tracking url:http://localhost:8088/cluster/app/application_1498071443097_0003 User:


RM Yonder Log tip/bin/bash:/bin/java:is a directory


Solution that will:

Vim etc/hadoop/hadoop-env.sh

In the

Export Java_home=${java_home}

Amended to

Export Java_home=/library/java/javavirtualmachines/jdk1.8.0_77.jdk/contents/home

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.