hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nauroth <cnaur...@hortonworks.com>
Subject Re: How do I run ZKFC on a different node that is not the name node?
Date Thu, 10 Dec 2015 18:35:39 GMT

I can see 2 potential problems.

1. I see property "dfs.ha.namenodescluster" below.  If that is really what
you have in your hdfs-site.xml, and not just a copy-paste error, then it
looks like there is a missing period.  "dfs.ha.namenodes.cluster" would be
the correct property name.

2. Standard deployment is to run ZKFC on the same host as the NameNode
that it watches.  This eliminates a potential failure mode of network
partition between the ZKFC running on one host and the NameNode running on
another host.  The ZKFC startup logic tries to pair up automatically with
the correct NameNode by scanning the configured NameNode addresses to see
which one is a network address on the same host.  If you aren't running
the ZKFC on the same host as the NameNode, then this automatic detection
logic won't work and it will abort.  If you can't arrange to run the ZKFC
on the same host as the NameNode, then it's possible to override this
automatic detection by explicitly pointing the ZKFC to one of the
NameNodes in hdfs-site.xml.  You would need to set property
dfs.ha.namenode.id to either nn1 or nn2.

    The ID of this namenode. If the namenode ID is not configured it
    is determined automatically by matching the local node's address
    with the configured address.

I hope this helps.

--Chris Nauroth

On 12/9/15, 8:07 PM, "F21" <f21.groups@gmail.com> wrote:

>I am receiving this error when trying to format zookeeper using the zkfc:
>Exception in thread "main"
>org.apache.hadoop.HadoopIllegalArgumentException: Could not get the
>namenode ID of this node. You may run zkfc on the node other than
>     at 
>     at 
>There wasn't any information regarding this on the web. I am running the
>namenode, journalnode, datanode and zkfc within separate docker
>This is the configuration in the zkfc container (I have launched 3 of
><?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
>   <property>
>     <name>dfs.permissions.superusergroup</name>
>     <value>hadoop</value>
>   </property>
>   <property>
>   </property>
>   <property>
>     <name>dfs.ha.fencing.methods</name>
>     <value>shell(/bin/true)</value>
>   </property>
>   <property>
>     <name>ha.zookeeper.quorum</name>
>     <value>zookeeper:2181</value>
>   </property>
>   <property>
>     <name>dfs.nameservices</name>
>     <value>cluster</value>
>   </property>
>   <property>
>     <name>dfs.ha.namenodescluster</name>
>     <value>nn1,nn2</value>
>   </property>
>   <property>
>     <name>dfs.namenode.rpc-address.cluster.nn1</name>
>     <value>namenode1:8020</value>
>   </property>
>   <property>
>     <name>dfs.namenode.rpc-address.cluster.nn2</name>
>     <value>namenode2:8020</value>
>   </property>
>   <property>
>     <name>dfs.namenode.http-address.cluster.nn1</name>
>     <value>namenode1:50070</value>
>   </property>
>   <property>
>     <name>dfs.namenode.http-address.cluster.nn2</name>
>     <value>namenode2:50070</value>
>   </property>
>Any ideas how I can get this working?
>To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
>For additional commands, e-mail: user-help@hadoop.apache.org

To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org

View raw message