Created on 12-04-2015 06:01 PM - edited 09-16-2022 02:51 AM
Hi,
I have just built a Pseudo Node cluster following below article:
Initally I had missed to install Java however, after getting below error while formatting NameNode I installed Java 1.6:
JAVA_HOME is not set and could not be found.
Even after installing it (jdk-6u31-linux-amd64.rpm), I am still getting below error (a bit different but I guess related to Java). I feel I need to explicitly set the paths in .bashrc, hadoo-env.sh and /etc/profile files (not sure though). I am unsure how do I do it for the same (as I am pretty new to Linux and Hadoop).
[node1@primary ~]$ sudo -u hdfs hdfs namenode -format [sudo] password for node1: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/hdfs/server/namenode/NameNode : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit. [node1@primary ~]$ java -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [node1@primary ~]$
Would be great if someone could help.
Thanks
snm1523
Created 12-15-2015 05:51 PM
Created 12-15-2015 05:51 PM
Created 12-28-2015 07:32 AM
Thank you for the help, Harsh.
Have updated to version 1.8.0_65 which worked.
Thanks
Snm1523