4

I am setting up a Multi-Node cluster and my NodeManager and ResourceManager processes are not starting for some reason and I can't figure out why. When I run the jps command, I only see the NameNode and SecondaryNameNode and JPS processes. As a result, my MapReduce job won't work. This is my configuration

yarn-site.xml - across NameNode and DataNodes

<configuration>
<property>
  <name>yarn.nodemanager.aux-services</name>
  <value>mapreduce_shuffle</value>
</property>
<property>
  <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
  <value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
    <name>yarn.resourcemanager.hostname</name>
    <value>ec2PathToMyNameNode.compute-1.amazonaws.com</value>
  </property>
</configuration>

And my hosts file is this on the NameNode:

nameNodeIP nameNodePublicDNS.compute-1.amazonaws.com
dataNode1IP dataNode1PublicDNS.compute-1.amazonaws.com
dataNode2IP dataNode2PublicDNS.compute-1.amazonaws.com
dataNode3IP dataNode3PublicDNS.compute-1.amazonaws.com
127.0.0.1 localhost

When I run my MapReduce job it says it's unable to connect at 8032. I am using Hadoop 3.1.2

Edit:

I Checked the logs and i found the following exception:

Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 83 more

Error injecting constructor, java.lang.NoClassDefFoundError: javax/activation/DataSource at org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver.(JAXBContextResolver.java:41) at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebApp.setup(RMWebApp.java:54) while locating org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver

1 error at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) at com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory$GuiceInstantiatedComponentProvider.getInstance(GuiceComponentProviderFactory.java:345)

Hadi
  • 36,233
  • 13
  • 65
  • 124
Namorange
  • 81
  • 1
  • 5

3 Answers3

2

Trying to figure out the issue

(1) Start-dfs.sh vs Start-all.sh

Check that you are using Start-all.sh command when you are trying to start hadoop because Start-dfs.sh will only start the namenode and datanodes

(2) Check the Hadoop logs

Check for the HADOOP_LOG_DIR global variable value to get the Log dir, because it will include all exception thrown when trying to start the Namenode Manager and the Resource Manager

(3) Check for the installed Java version

The error may be thrown by an incompatible Java version, check that you have installed the latest Java version.

(4) Check Hadoop Common issues

Based on the error you provided in the answer update you may find these issue links relevant:


More information

For more information you can check my article on Medium, it may give you some insights:

Hadi
  • 36,233
  • 13
  • 65
  • 124
1

my problem is that I used java11 to cooperate with hadoop.

so what i do is

1.rm /Library/Java/*

2.download java8 from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

3.install java8jdk and

4.fix the JAVA_HOME in hadoop-env.sh

5.stop-all.sh

6.start-dfs.sh

7.start-yarn.sh

-1

[pdash@localhost hadoop]$ export YARN_RESOURCEMANAGER_OPTS="--add-modules=ALL-SYSTEM" [pdash@localhost hadoop]$ export YARN_NODEMANAGER_OPTS="--add-modules=ALL-SYSTEM"

It will work for sure I tried from apache JIRA log ....Thank PRAFUL