Upgrade Fails With java.lang.ClassNotFoundException: Class com.sas.lasr.hadoop.NameNodeService not found

0 votes
5 views
asked Aug 28, 2017 in Hadoop by admin (4,410 points)
Summary

Symptoms

While upgrading CDH, upgrade fails to start HDFS. CM shows the error:

"Failed to execute command Start on service HDFS"

The HDFS Namenode  startup fails with error. The errors in namenode_log.out under (/var/log/hadoop-hdfs) shows:

2017-01-26 02:07:33,337 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 8022: starting
2017-01-26 02:07:33,342 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.sas.lasr.hadoop.NameNodeService not found

Caused by: java.lang.ClassNotFoundException: Class com.sas.lasr.hadoop.NameNodeService not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2105)
at org.apache.hadoop.conf.Configuration.getClasses(Configuration.java:2174)
... 7 more
Applies To
Cause


SAS is integrated with CDH and when HDFS starts up (as part of the upgrade wizard), the SAS required classes cannot be located either because the SAS JAR files are not in the appropriate directory or CLASSPATH is not set correctly.

The new CDH parcels directory does not have the SAS jar files:
This can be confirmed by checking the directories of the old and new CDH version. e.g. if upgrading from 5.5 to 5.9:
In the 5.5 /opt/cloudera/parcels/CDH_5.5/lib/hadoop/lib the following exists:

-rwxr-xr-x 1 root root 209410 Jan 29 2016 sas.lasr.hadoop.jar
-rwxr-xr-x 1 root root 97490 Jan 29 2016 sas.grid.provider.yarn.jar
-rwxr-xr-x 1 root root 601814 Jan 29 2016 sas.lasr.jar

These files do not exist in 5.9 CDH parcels folder (/opt/cloudera/parcels/CDH 5.9/lib/hadoop/lib)

The SAS jar files is not in the CLASSPATH. 
In CM under HDFS, search for "HDFS Service Environment Advanced Configuration Snippet (Safety Valve)" and check if the classpath is defined: e.g.
HADOOP_CLASSPATH=/location_to_sas_jar_files

Instructions


The new CDH parcels directory does not have the SAS jar files. This is a temporary solution and will break future upgrades. Though not a long term solution, this will allow the upgrade to complete.
1. Copy the sas jar files from the old CDH version (5.5) directory to new CDH version (5.9) directory.
    e.g. cp  /opt/cloudera/parcels/<CDH_5.5>/lib/hadoop/lib/sas*   /opt/cloudera/parcels/<CDH_5.9>/lib/hadoop/lib

2.  This needs to be done on  all Namenode and Datanodes.

3. Complete the upgrade manually as per documentation for the appropriate CDH version.

The recommended solution is:
1. Copy the libraries to a location outside of the /opt/cloudera/parcels directory 
2. In CM under HDFS, search for "HDFS Service Environment Advanced Configuration Snippet (Safety Valve)" and  add/update the classpath  e.g.
            HADOOP_CLASSPATH=/location_to_sas_jar_files/*

 

Please log in or register to answer this question.

...