hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "清如许" <475053...@qq.com>
Subject Failed to active namenode when config HA
Date Sun, 28 Sep 2014 18:56:36 GMT
Hi,

I'm new to hadoop and meet some problems when config HA.
Below are some important configuration in core-site.xml

  <property>
    <name>dfs.nameservices</name>
    <value>ns1,ns2</value>
  </property>
  <property>
    <name>dfs.ha.namenodes.ns1</name>
    <value>nn1,nn3</value>
  </property>
  <property>
    <name>dfs.ha.namenodes.ns2</name>
    <value>nn2,nn4</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.ns1.nn1</name>
    <value>namenode1:9000</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.ns1.nn3</name>
    <value>namenode3:9000</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.ns2.nn2</name>
    <value>namenode2:9000</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.ns2.nn4</name>
    <value>namenode4:9000</value>
  </property>
  <property>
    <name>dfs.namenode.shared.edits.dir</name>
    <value>qjournal://datanode2:8485;datanode3:8485;datanode4:8485/ns1</value>
  </property>
  <property>
    <name>dfs.client.failover.proxy.provider.ns1</name>
    <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
  </property>
  <property>
    <name>dfs.ha.fencing.methods</name>
    <value>sshfence</value>
  </property>
  <property>
    <name>dfs.ha.fencing.ssh.private-key-files</name>
    <value>/home/hduser/.ssh/id_rsa</value>
  </property>
  <property>
    <name>dfs.ha.fencing.ssh.connect-timeout</name>
    <value>30000</value>
  </property>
  <property>
    <name>dfs.journalnode.edits.dir</name>
    <value>/home/hduser/mydata/hdfs/journalnode</value>
  </property>

(two nameservice ns1,ns2 is for configuring federation later. In this step, I only want launch
ns1 on namenode1,namenode3)

After configuration, I did the following steps
firstly,  I start jornalnode on datanode2,datanode3,datanode4
secondly I format datanode1 and start namenode on it
then i run 'hdfs namenode -bootstrapStandby' on the other namenode and start namenode on it

Everything seems fine unless no namenode is active now, then i tried to active one by running

hdfs haadmin -transitionToActive nn1 on namenode1
but strangely it says "Illegal argument: Unable to determine the nameservice id."

Could anyone tell me why it cannot determine nn1 from my configuration?
Is there something wrong in my configuraion?

Thanks a lot!!!
Mime
View raw message