I have installed and checked it with the command java -version which gave the following output:

openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.17.10.2-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

After that I downloaded spark 2.3.0 and tried to install it. At the last step, when I am trying to run the command at the location:

$SPARK_PATH sbin/start-all.sh

The output is as below:

starting org.apache.spark.deploy.master.Master,
logging to /usr/lib/spark/spark-2.3.0-bin-hadoop2.7/logs/spark-- org.apache.spark.deploy.master.Master-1-ubuntu.out
failed to launch: nice -n 0 /usr/lib/spark/spark-2.3.0-bin-hadoop2.7/bin/spark-class org.apache.spark.deploy.master.Master --host ubuntu --port 7077 --webui-port 8080
line 71: /usr/lib/java/jdk1.8.0_161/bin/java:
cannot execute binary file: Exec format error

I don't know what I am missing here.
I need some help!

P.S: The output of jps is:

14531 Worker
14568 Jps
  • bash: /usr/lib/java/jdk1.8.0_161/bin/java: cannot execute binary file: Exec format error – rattlesnake Apr 8 '18 at 7:35
  • Okay, how can I fix this issue?? – rattlesnake Apr 8 '18 at 10:54

Make sure that you have JAVA_HOME in spark-env.sh set to the working open JDK version you have installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.