Haddop 配置引起的
WARN org.mortbay.log: /getimage: java.io.IOException: GetImage failed. java.io.IOException: Content-Length header is not provided by the namenode when trying to fetch http://127.0.1.1:50090/getimage?getimage=1
最近在翻看NameNode的log时发现经常有这一段信息出现:
看来是SecondNameNode在向NameNode获取Image时出的问题。虽然不影响hdfs使用,但是SecondName
备份功能失效,任其下去万一NameNode挂了那可就无处申冤了。
经过Google大神帮助,得知需要在hdfs-site.xml中手动配置dfs.secondary.http.address,这个配置项的默认值如下
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>0.0.0.0:50090</value>
<description>
The secondary namenode http server address and port.
If the port is 0 then the server will start on a free port.
</description>
</property>
需要明确指明SecondName,与conf/master里面的名称一样
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>test-dn2:50090</value>
<description>
The secondary namenode http server address and port.
If the port is 0 then the server will start on a free port.
</description>
</property>