home/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1问题解决

来源:互联网 发布:2016电脑安全软件排行 编辑:程序博客网 时间:2024/05/22 00:47

本人Hadoop菜鸟。这个问题是在master节点运行hadoop dfs -put /home/hadoop/test_data/word /input出现的,在master节点查了好久也在网上查了很多资料都没有解决。

后来换位思考了一下,是不是应该在slave1节点找找原因呢,通过核查slave节点的日志发现不断出现以下信息:

2017-11-07 18:35:25,092 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 0 time(s).
2017-11-07 18:35:26,095 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 1 time(s).
2017-11-07 18:35:27,099 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 2 time(s).
2017-11-07 18:35:28,102 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 3 time(s).
2017-11-07 18:35:29,105 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 4 time(s).
2017-11-07 18:35:30,108 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.115:9000. Already tried 5 time(s).

在网上找了资料,得知该问题是在etc/hosts中的配置是否有127.0.1.1 造成的(原因:127.0.1.1是debian中的本地回环。这个造成了hadoop解析出现问题。这个设置应该是在做伪分布式的hadoop集群的时候,留下来的)。如果有把其屏蔽或者删除,重启各节点即可。在此感谢http://www.cnblogs.com/dyllove98/archive/2013/06/20/3147024.html的朋友。

修改前:

[root@master hadoop-0.20.2-cdh3u6]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1              localhost.localdomain localhost master
::1             localhost6.localdomain6 localhost6
#192.168.117.128 bogon
192.168.1.115 master
192.168.1.43 slave1


修改后:

[root@master hadoop-0.20.2-cdh3u6]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              localhost.localdomain localhost master
::1             localhost6.localdomain6 localhost6
#192.168.117.128 bogon
192.168.1.115 master
192.168.1.43 slave1

最后重启一下各个节点就正常了。

阅读全文
0 0