2

I am trying to create hadoop 3.1 cluster on Ubuntu 18 machine. I am following the steps given here Hadoop cluster steps and currently I setup only one machine but when I tried to run commands like "hadoop version" or "hdfs namenode -format" I am getting following error:

*Unrecognized option: -

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.*

Error Image

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
hemant A
  • 185
  • 14
  • This is likely set incorrectly ... `JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")`... I'm not sure why you followed that site rather than the official Hadoop documentation. You really don't need to build Hadoop from source... And that page is almost a year old for an alpha build of Hadoop... Keep in mind that most external services (like Spark) aren't yet supporting Hadoop3 – OneCricketeer May 29 '18 at 12:14
  • @cricket_007: Thank you. I will check that. I am trying Hadoop for the first time and someone pointed me to this site, so I followed the steps given there. You are right about Hadoop3 because as I was looking into the issue, I did not find much regarding version 3. I will check JAVA_HOME variable. If the issue still persists then I will try with lower version of Hadoop. – hemant A May 30 '18 at 16:41
  • The best way to debug this would be to find the `$HADOOP_HOME/bin/hadoop` script, open in a text editor, then under the `#!/bin/bash` line would be to add a line `set -xv`, then run `hadoop version` command again. Then add that output to the question as text rather than an image – OneCricketeer May 30 '18 at 18:39

0 Answers0