- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unsupported major.minor version 51.0 in CDH 5.10
- Labels:
-
Apache Hive
-
Cloudera Manager
-
HDFS
Created on ‎04-14-2017 10:41 AM - edited ‎09-16-2022 04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Clean install of CDH 5.10 - Running any hadoop ** command returns the "Unsupported major.minor version 51.0" error message on any node in the cluster. Found while working through Testing the Installation....
Occurs with or without the "Java Home Directory" setting override in Hosts Configuration in Cloudera Manager.
hdfs@hadoop1:/> hadoop fs
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/fs/FsShell : 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.fs.FsShell. Program will exit.
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Fri Apr 14 12:31:18 2017 from 10.4.4.44
hadoop1:~ # sudo su hdfs
hdfs@hadoop1:/root> hadoop version
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/util/VersionInfo : 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.util.VersionInfo. Program will exit
There are two versions of Java in /usr/java
jdk1.6.0_31
jdk1.7.0_67-cloudera
$PATH = /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
Created on ‎04-17-2017 12:12 PM - edited ‎04-17-2017 12:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Brian,
CDH 5.10 does not support JDK release versions below 1.7.x. Your JAVA_HOME must not point to jdk1.6.0_31. As this JDK is not supported by the platform I would recommend that you remove this JDK from all host in your environment as an inital troubleshooting step. You can also set environment variables like the Java Home in your global profiles, agent defaults, etc. However I would recommend removing the old JDK first.
Customer Operations Engineer | Security SME | Cloudera, Inc.
Created ‎04-17-2017 12:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We uninstalled the earlier version of Java from all nodes, restarted all, and confirmed our $JAVA_HOME is now pointed to the correct version of Java.
This corrected the issue and we were able to validate the environment.
Created ‎04-25-2017 01:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the actual solution to uninstalling the lower version of JAVA located in the /usr/jdk-1.6.0_31-fcs.x86_64 directory.
- Determine if this java version was installed using RPM
- Open the Terminal Window
- Login as the super user
- Try to find the package by typing: rpm -qa
- Copy the long list of packages to a text editor so you can check for jdk-1.6.0_31-fcs.x86_64
- Do a find for 'jdk-1.6.0_31-fcs.x86_64'
- If found, it was installed using RPM and should be uninstalled using RPM
- Go back to the Terminal Window
- Do a find for 'jdk-1.6.0_31-fcs.x86_64'
- Copy the long list of packages to a text editor so you can check for jdk-1.6.0_31-fcs.x86_64
- RPM Uninstall
- Verify the directory is there by going to the /usr/java directory and listing it's contents
- cd /usr/java
- ls -l
- Check to see what your JAVA_HOME variable is set to
- $JAVA_HOME
- returns jdk-1.6.0_31-fcs.x86_64
- $JAVA_HOME
- Remove the lower version of Java using the RPM
- rpm -e jdk-1.6.0_31-fcs.x86_64
- Verify the directory has been removed
- ls -l
- Exit the Terminal Window
- Exit
- Verify the directory is there by going to the /usr/java directory and listing it's contents
- Open the Termina Window and login as the Super User
- Verify the JAVA_HOME has changed to the correct version of Java
- $JAVA_HOME
- Results should be the correct version of Java, not the old jdk-1.6.0_31-fcs.x86_64 or whatever version yours is that needed to be removed.
- $JAVA_HOME
- Repeat 2-4 for each node in your cluster.
This is what I actually had to do to remove the offending version of Java and ensure that all nodes were running on the same version of JAVA.
Created ‎04-14-2017 01:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found my $JAVA_HOME returns
/usr/java/jdk1.6.0_31
Unsure how to change this for all users to
/usr/java/jdk1.7.0_67-cloudera
Created on ‎04-17-2017 12:12 PM - edited ‎04-17-2017 12:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Brian,
CDH 5.10 does not support JDK release versions below 1.7.x. Your JAVA_HOME must not point to jdk1.6.0_31. As this JDK is not supported by the platform I would recommend that you remove this JDK from all host in your environment as an inital troubleshooting step. You can also set environment variables like the Java Home in your global profiles, agent defaults, etc. However I would recommend removing the old JDK first.
Customer Operations Engineer | Security SME | Cloudera, Inc.
Created ‎04-17-2017 12:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We uninstalled the earlier version of Java from all nodes, restarted all, and confirmed our $JAVA_HOME is now pointed to the correct version of Java.
This corrected the issue and we were able to validate the environment.
Created on ‎04-21-2017 10:43 AM - edited ‎04-21-2017 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@task def install_jdk8_centos(): sudo("yum install -y wget") sudo('cd /opt/ && tar xzf jdk-8u121-linux-x64.tar.gz && cd /opt/jdk1.8.0_121/') sudo("alternatives --install /usr/bin/java java /opt/jdk1.8.0_121/bin/java 2") sudo("alternatives --set java /opt/jdk1.8.0_121/bin/java") sudo("alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_121/bin/jar 2") sudo("alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_121/bin/javac 2") sudo("alternatives --set jar /opt/jdk1.8.0_121/bin/jar") sudo("alternatives --set javac /opt/jdk1.8.0_121/bin/javac") sudo("export JAVA_HOME=/opt/jdk1.8.0_121") sudo("export JRE_HOME=/opt/jdk1.8.0_121/jre") sudo("export PATH=$PATH:/opt/jdk1.8.0_121/bin:/opt/jdk1.8.0_121/jre/bin") sudo("echo JAVA_HOME=/opt/jdk1.8.0_121 | tee -a /etc/environment") sudo("echo JRE_HOME=/opt/jdk1.8.0_121/jre | tee -a /etc/environment") sudo("echo PATH=$PATH:/opt/jdk1.8.0_121/bin:/opt/jdk1.8.0_121/jre/bin | tee -a /etc/environment")
With that style of fabfile fabric script and setting the java home directory in CM, the infamous unsupported major.minor problem was vanquished for me.
Source of exquisite instructions: https://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/
Created ‎04-25-2017 01:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the actual solution to uninstalling the lower version of JAVA located in the /usr/jdk-1.6.0_31-fcs.x86_64 directory.
- Determine if this java version was installed using RPM
- Open the Terminal Window
- Login as the super user
- Try to find the package by typing: rpm -qa
- Copy the long list of packages to a text editor so you can check for jdk-1.6.0_31-fcs.x86_64
- Do a find for 'jdk-1.6.0_31-fcs.x86_64'
- If found, it was installed using RPM and should be uninstalled using RPM
- Go back to the Terminal Window
- Do a find for 'jdk-1.6.0_31-fcs.x86_64'
- Copy the long list of packages to a text editor so you can check for jdk-1.6.0_31-fcs.x86_64
- RPM Uninstall
- Verify the directory is there by going to the /usr/java directory and listing it's contents
- cd /usr/java
- ls -l
- Check to see what your JAVA_HOME variable is set to
- $JAVA_HOME
- returns jdk-1.6.0_31-fcs.x86_64
- $JAVA_HOME
- Remove the lower version of Java using the RPM
- rpm -e jdk-1.6.0_31-fcs.x86_64
- Verify the directory has been removed
- ls -l
- Exit the Terminal Window
- Exit
- Verify the directory is there by going to the /usr/java directory and listing it's contents
- Open the Termina Window and login as the Super User
- Verify the JAVA_HOME has changed to the correct version of Java
- $JAVA_HOME
- Results should be the correct version of Java, not the old jdk-1.6.0_31-fcs.x86_64 or whatever version yours is that needed to be removed.
- $JAVA_HOME
- Repeat 2-4 for each node in your cluster.
This is what I actually had to do to remove the offending version of Java and ensure that all nodes were running on the same version of JAVA.
Created ‎01-03-2018 08:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Cloudera team, we do not use any support from cloudera as of now. I see that CDH 5.8.3 is not supported on CentOS 7.3 as recommended by cloudera, we tested this version on 7.3 and have not seen any issues so far. Could you please let us know the potential issues for running 5.8.3 on Centos 7.3 or is it in terms of cloudera support recommended.
Created ‎01-07-2018 02:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @cloud123user,
One of the advantages of having Cloudera distribute hadoop is that Cloudera will test for stability on certain OSes. CDH 5.8.3 was not tested on CentOS 7.3. This does not mean that it won't work and it probably will. The "supported" part here indicates that we cannot give the level of assurance to our users that we have tested and confirm that it should work.
While 5.8.3 will likely work on Centos 7.3, we would recommend upgrading to a Cloudera Manager and CDH version that we have tested on 7.3 at your earliest convenience.
-Ben
Created ‎01-08-2018 11:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
