Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

Highlighted

HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

Trying file transfer from one cluster to another cluster in HA environment.

1.Added HA clusters multiple nameservices in hdfs-site.xml file

2. Stop and Start hadoop all services

3. Namenode service is down below error message.

org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /home/rajesh/tmp/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.

4. CHecked cluster service active or standby it failed.

[rajesh@mashdp ~]$ hdfs haadmin -getServiceState nn1 Illegal argument: Unable to determine the nameservice id. [rajesh@mashdp ~]$ hdfs haadmin -getServiceState nn2 Illegal argument: Unable to determine the nameservice id. [rajesh@mashdp ~]$ hdfs haadmin -getServiceState mn1 Illegal argument: Unable to determine the nameservice id. [rajesh@mashdp ~]$ hdfs haadmin -getServiceState mn2 Illegal argument: Unable to determine the nameservice id.

5. hdfs command also down.

[rajesh@mashdp ~]$ hdfs dfs -ls -R / 17/06/29 16:31:16 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 17/06/29 16:31:16 WARN hdfs.DFSUtil: Namenode for raccluster remains unresolved for ID mn1. Check your hdfs-site.xml file to ensure namenodes are configured properly. 17/06/29 16:31:16 WARN hdfs.DFSUtil: Namenode for raccluster remains unresolved for ID mn2. Check your hdfs-site.xml file to ensure namenodes are configured properly.

5 REPLIES 5

Re: HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.namenode.name.dir</name> <value>/rajesh/app/bigdata/data/namenode</value> </property> <property> <name> dfs.datanode.data.dir</name> <value>/rajesh/app/bigdata/data/datanode</value> </property> <property> <name>dfs.nameservices</name> <value>mycluster,raccluster</value> </property> <property> <name>dfs.ha.namenodes.mycluster</name> <value>nn1,nn2</value> </property> <property> <name>dfs.namenode.rpc-address.mycluster.nn1</name> <value>mashdp:8020</value> </property> <property> <name>dfs.namenode.rpc-address.mycluster.nn2</name> <value>slave2:8020</value> </property> <property> <name>dfs.namenode.http-address.mycluster.nn1</name> <value>mashdp:50070</value> </property> <property> <name>dfs.namenode.http-address.mycluster.nn2</name> <value>slave2:50070</value> </property> <property> <name>dfs.namenode.shared.edits.dir</name> <value>qjournal://mashdp:8485;slave2:8485;hpeco:8485/mycluster</value> </property> <property> <name>dfs.ha.automatic-failover.enabled</name> <value>true</value> </property> <property> <name>ha.zookeeper.quorum</name> <value>mashdp:2181,slave2:2181,hpeco:2181</value> </property> <property> <name>dfs.ha.fencing.methods</name> <value>sshfence</value> </property> <property> <name>yarn.resourcemanager.store.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore</value> </property> <property> <name>dfs.client.failover.proxy.provider.mycluster</name> <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property> <property> <name>dfs.ha.fencing.ssh.private-key-files</name> <value>/home/rajesh/.ssh/id_rsa</value> </property> <property> <name>dfs.replication</name> <value>3</value> </property> <property> <name>dfs.ha.fencing.ssh.connect-timeout</name> <value>3000</value> </property> <property> <name>dfs.client.failover.proxy.provider.raccluster</name> <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property> <property> <name>dfs.ha.namenodes.raccluster</name> <value>mn1,mn2</value> </property> <property> <name>dfs.namenode.rpc-address.raccluster.mn1</name> <value>namnod1:8020</value> </property> <property> <name>dfs.namenode.rpc-address.raccluster.mn2</name> <value>namnod2:8020</value> </property> <property> <name>dfs.namenode.http-address.raccluster.mn1</name> <value>namnod1:50070</value> </property> <property> <name>dfs.namenode.http-address.raccluster.mn2</name> <value>namnod2:50070</value> </property> </configuration>

Re: HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

It will be helpful if you attach the complete hdfs-site.xml from both the clusters (you can anonymize hostnames and IP addresses).

Re: HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

Re: HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

Super Mentor

@Rajesh Dheenan

Your service name is as following:

<property>
<name>dfs.ha.namenodes.raccluster</name>
<value>mn1,mn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.raccluster.mn1</name>
<value>namnod1:8020</value>
</property>
<property>
<name>dfs.namenode.rpc-address.raccluster.mn2</name>
<value>namnod2:8020</value>
</property>
<property>
<name>dfs.namenode.http-address.raccluster.mn1</name>
<value>namnod1:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.raccluster.mn2</name>
<value>namnod2:50070</value>
</property>

So please try the following commands: (Notice i am using mn1 and mn2 instead of nn1 & nn2)

# hdfs haadmin -getServiceState mn1
# hdfs haadmin -getServiceState mn2

.

Re: HA clusters multiple nameservices in hdfs-site.xml file brind down namenode service org.apache.hadoop.hdfs.server.common.InconsistentFSStateException:

Name node services is not in up.