Hadoop——Namenode HA搭建问题记录

记录一、

在搭建Namenode HA后,需要先启动journalnode,然后进行namenode format,在启动第二台namenode时需要先向元数据拉取到第二台namenode中,使用 hdfs haadmin -bootstrapStandby进行拉取,不然启动第二台namenode时会出现org.apache.hadoop.hdfs.server.common.InconsisteneFSStateException:Directory ... is an inconsistent state:storage directory does not exist or it not accessable.错误

 

记录二、

在配置自动故障转移,格式化zkfc时,hdfs zkfc -format出现java.net.UnknowHostException:hadoop01:2181;hadoop02:2181;hadoop03:2181 Name or service not known

at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)

...

经过检查发现在core-site.xml中配置ha.zookeeper.quorum的value多个机器地址直接使用了分号;进行分割,应该使用逗号,进行分割

修改前:

 
                ha.zookeeper.quorum
                hadoop01:2181;hadoop02:2181;hadoop03:2181

 

修改后:

 
                ha.zookeeper.quorum
                hadoop01:2181,hadoop02:2181,hadoop03:2181

你可能感兴趣的:(Hadoop)