Bug 1554525 - When starting Resource Manager - java.lang.NoClassDefFoundError: net/sf/cglib/core/CodeGenerationException
Summary: When starting Resource Manager - java.lang.NoClassDefFoundError: net/sf/cglib...
Alias: None
Product: Fedora
Classification: Fedora
Component: hadoop
Version: 28
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Mike Miller
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-12 21:12 UTC by Aram Agajanian
Modified: 2018-12-10 23:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-12-10 23:19:57 UTC

Attachments (Terms of Use)

Description Aram Agajanian 2018-03-12 21:12:45 UTC
Description of problem:
We are trying to set up a multinode Hadoop cluster.  We have the hadoop-namenode and hadoop-datanode services running on different hosts.

When we start the hadoop-resourcemanager service on the same host as hadoop-namenode, we get the following error in the yarn-yarn-resourcemanager-picluster.cs.newpaltz.edu.log file.

2018-03-12 16:17:29,620 FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error starting ResourceManager
java.lang.NoClassDefFoundError: net/sf/cglib/core/CodeGenerationException
        at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:275)
        at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:144)
        at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:123)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:349)
        at com.google.inject.AbstractModule.install(AbstractModule.java:122)
        at com.google.inject.servlet.ServletModule.configure(ServletModule.java:52)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:99)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at org.apache.hadoop.yarn.webapp.WebApps$Builder.build(WebApps.java:281)
        at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:304)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startWepApp(ResourceManager.java:952)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1052)
        at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1186)
Caused by: java.lang.ClassNotFoundException: net.sf.cglib.core.CodeGenerationException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 21 more

Version-Release number of selected component (if applicable):
hadoop-common.noarch                                        2.7.3-6.fc27
hadoop-common-native.x86_64                                 2.7.3-6.fc27
hadoop-hdfs.noarch                                          2.7.3-6.fc27
hadoop-mapreduce.noarch                                     2.7.3-6.fc27
hadoop-mapreduce-examples.noarch                            2.7.3-6.fc27
hadoop-yarn.noarch                                          2.7.3-6.fc27

How reproducible:
Happens every time.

Steps to Reproduce:
1. Run command "systemctl start hadoop-resourcemanager"

Actual results:
The status of the hadoop-resourcemanager service becomes failed.
The java.log.NoClassDefFoundError appears in the log file

Expected results:
The Resource Manager runs without error.

Additional info:
We have been trying to increase the logging by changing the /etc/hadoop/yarn-env.sh file as follows.  We are unable to get any DEBUG messages in the log files in /var/log/hadoop-yarn:

#YARN_OPTS="$YARN_OPTS -Dhadoop.root.logger=${YARN_ROOT_LOGGER:-INFO,console}"
YARN_OPTS="$YARN_OPTS -Dhadoop.root.logger=DEBUG"
#YARN_OPTS="$YARN_OPTS -Dyarn.root.logger=${YARN_ROOT_LOGGER:-INFO,console}"
YARN_OPTS="$YARN_OPTS -Dyarn.root.logger=DEBUG"

Comment 1 Joel Smith 2018-03-23 20:58:56 UTC
I ran into this on Fedora 26. As a work-around, I ran the following on any nodes where I'm trying to run hadoop-resourcemanager.service or hadoop-nodemanager.service:

sudo ln -s /usr/share/java/cglib/cglib.jar /usr/share/hadoop/yarn/lib/

Comment 2 Ben Cotton 2018-11-27 16:29:45 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora Update System 2018-11-30 23:44:45 UTC
hadoop-2.7.7-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-beec9e3fda

Comment 4 Fedora Update System 2018-11-30 23:44:53 UTC
hadoop-2.7.7-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f1f44e4c6d

Comment 5 Fedora Update System 2018-12-01 01:38:59 UTC
hadoop-2.7.7-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-f1f44e4c6d

Comment 6 Fedora Update System 2018-12-01 02:44:10 UTC
hadoop-2.7.7-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-beec9e3fda

Comment 7 Randy Barlow 2018-12-10 23:19:57 UTC
An update associated with this bug has been pushed to stable.

Note You need to log in before you can comment on or make changes to this bug.