Created 02-10-2021 04:38 AM
Hello,
I am trying to setup single node apache hadoop 2-7.4. But getting error while starting namenode "ERROR Failed to start namenode.
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.ShellGroupssMapping not found".
Please find the attached configuration files and logs:
1. core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.security.group.mapping</name>
<value>org.apache.hadoop.security.ShellGroupssMapping</value>
<code>bash -c groups</code>
</property>
</configuration>
2. hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/opt/nn</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/opt/dn</value>
</property>
</configuration>
3.mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
4. yarn-site.xml
<configuration>
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
./hadoop-daemon.sh start namenode
************************************************************/
2021-02-10 12:19:53,731 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
2021-02-10 12:19:53,737 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: createNameNode []
2021-02-10 12:19:54,138 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2021-02-10 12:19:54,261 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2021-02-10 12:19:54,261 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system started
2021-02-10 12:19:54,265 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: fs.defaultFS is hdfs://localhost:9000
2021-02-10 12:19:54,266 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Clients are to use localhost:9000 to access this namenode/service.
2021-02-10 12:19:54,331 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.ShellGroupssMapping not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2229)
at org.apache.hadoop.security.Groups.<init>(Groups.java:80)
at org.apache.hadoop.security.Groups.<init>(Groups.java:74)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:303)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:285)
at org.apache.hadoop.security.UserGroupInformation.setConfiguration(UserGroupInformation.java:313)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:632)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:819)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:803)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1500)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.ShellGroupssMapping not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2197)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2221)
... 10 more
Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.ShellGroupssMapping not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195)
... 11 more
2021-02-10 12:19:54,335 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2021-02-10 12:19:54,337 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at big-demo.us-central1-a.c.krishna-setup.internal/
************************************************************/
Request and appreciate if anyone please help me.
Thanks
Created 04-03-2021 01:35 PM
java.lang.ClassNotFoundException: Class org.apache.hadoop.security.ShellGroupssMapping not found
In your core-site.xml make following change and restart hadoop
Changed this property to ---->> hadoop.security.group.mapping
Value: org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback
Refer: