Cannot initialize cluster exception while running job on Hadoop 2

The question is related to my previous question. All daemons are running, jps shows:

6663 JobHistoryServer 7213 ResourceManager 9235 Jps 6289 DataNode 6200 NameNode 7420 NodeManager 

but the wordcount example continues to fail with the following exception:

 ERROR security.UserGroupInformation: PriviledgedActionException as:root (auth:SIMPLE) cause:java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses. Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses. at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120) at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82) at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75) at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1238) at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1234) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491) at org.apache.hadoop.mapreduce.Job.connect(Job.java:1233) at org.apache.hadoop.mapreduce.Job.submit(Job.java:1262) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1286) at WordCount.main(WordCount.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) 

Since he says that the problem is in the configuration, I post the configuration files here. The goal is to create a single cluster node.

yarn site.xml

 <?xml version="1.0"?> <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> </configuration> 

core-site.xml

 <configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> </configuration> 

<strong> HDFS-site.xml

  <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/home/hduser/yarn/yarn_data/hdfs/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/home/hduser/yarn/yarn_data/hdfs/datanode</value> </property> </configuration> 

mapred-site.xml

 <configuration> <property> <name>mapreduce.framework.name</name> <value>Yarn</value> </property> </configuration> 

Say what is missing or what I am doing wrong.

+6
source share
5 answers

You have the upper part of Yarn , which probably does not allow it to be resolved. Try the lower case version that is offered in the official documentation .

 <configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration> 
+4
source

I had a similar problem, but yarn was not a problem. After adding the following jars to my classpath, the problem is resolved:

  • hasoop-mapreduce-client-jobclient-2.2.0.2.0.6.0-76
  • hasoop-mapreduce-client-common-2.2.0.2.0.6.0-76
  • hasoop-mapreduce-client-shuffle-2.2.0.2.0.6.0-76
+19
source

It seems like I had a happy day, and I went with this exception through "all" of these reasons. Short description:

+2
source

In my case, I tried to use sqoop and ran into this error. Turns out I was pointing to the latest hadoop 2.0 version available from the CDH repository for which sqoop was not supported. The cloudera version was 2.0.0-cdh4.4.0 in which yarn support was integrated.

When I used 2.0.0-cdh4.4.0 under hadoop-0.20, the problem disappeared.
Hope this helps.

+1
source

changing mapreduce_shuffle to mapreduce.shuffle made it work in my case

0
source

Source: https://habr.com/ru/post/956895/


All Articles