jobtracker.info could only be replicated to 0 nodes, instead of 1 错误解决

阅读更多
最近在搭建Hadoop环境,用的是cygwin伪分布方式,但是一切都配置好后,执行命令start-all.sh,观察一下启动情况,执行JPS命令观察可以发现,只启动了namenode和jobtracker这两个,剩下三个节点没有启动

jobtracker.info could only be replicated to 0 nodes, instead of 1 错误解决_第1张图片

看了一下日志文件的目录,确实只启动了两个几点。

jobtracker.info could only be replicated to 0 nodes, instead of 1 错误解决_第2张图片

打开这两个节点的日志后,都显示的一样的内容,就是“java.io.IOException: File xxxxxxxxx/jobtracker.info could only be replicated to 0 nodes, instead of 1”,应该是连接错误,连接不到9000端口。

引用
hadoop-xxxx-namenode-XXXX.log


中报错:

2011-11-27 20:27:06,281 INFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 9000, call addBlock(/opt/hadoop/tmp/mapred/system/jobtracker.info, DFSClient_502181644) from 127.0.0.1:2278: error: java.io.IOException: File /opt/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1271)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:422)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:396)
	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)

于是就在网上一顿找文章,网上说什么的都有,大部分都说是防火墙问题,于是我就关闭了防火墙,把系统的防火墙都关掉了,重新格式化,再次执行start-all.sh命令,结果还是不行。

经过多方询问吧,网友给我一个建议,就是把“masters”和“slaves”中都配置上主机的IP,我配置的是“127.0.0.1”,这样问题就解决了,重新格式化后,5个节点顺利的启动起来了。


  • jobtracker.info could only be replicated to 0 nodes, instead of 1 错误解决_第3张图片
  • 大小: 57.5 KB
  • jobtracker.info could only be replicated to 0 nodes, instead of 1 错误解决_第4张图片
  • 大小: 72.7 KB
  • 查看图片附件

你可能感兴趣的:(jobtracker.info,replicated,nodes,instead)