为什么在hadoop中从节点突然失去了与主节点的连接?

pftdvrlh  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(223)

我已经在一个集群上安装了hadoop2.7.2,其中一个主集群(ubuntu15.10)和两个从集群(slave2,3)由virtualbox托管。
我已经运行了几个例子,如wordcount,它都工作正常。但是当我试着运行自己的工作时,比如说myjob,它一开始运行得很好,但是过了一段时间,它肯定会被这个错误打断:

INFO ipc.Client: Retrying connect to server:      slave3/xxx.216.227.176(the ip of slave):38046. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)

有时是奴隶2,有时是奴隶3。我通过ssh连接到那个奴隶 the connection is closed by remote .
但是virtualbox显示slave运行得很好,我可以对该slave执行ressh,但是所有hadoop进程都被杀死了。需要指出的是,我自己的作业比示例作业运行的时间长。
一开始,我认为可能是配置文件导致了一些错误,所以,我在master和slaves上重新安装了hadoop。但错误仍然存在。
所以,我认为这可能是由于我的网络配置在从属节点。所以,我改变了奴隶的ip地址 ...183 to ...176 重新安装hadoop。
我重新运行作业,此时作业运行的时间比平时长。但是,在Map阶段基本结束的时候( map 86% reduce 28% ),由于相同的错误,它失败了! INFO ipc.Client: Retrying connect to server: slave3/125..227.(the ip of slave):38046. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS) 还有一些东西登录了 yarn-user-resourcemanager-Master.log :

java.net.ConnectException: Call From Master/xxx.216.227.186 to slave2:44592 failed on connection exception: java.net.ConnectException: refuse to connect; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

似乎应用程序运行的时间越长,失败的可能性就越大。
这是我的主机文件:

127.0.0.1       localhost                                                                                                                                                                                           

# 127.0.1.1      Master

xxx.216.227.186 Master                                                                                                                                                                                              
xxx.216.227.185 slave1# the slave1 has some problem thus do not connect to the cluster                                                                                                                                                                                       
xxx.216.227.176 slave2                                                                                                                                                                                              
xxx.216.227.166 slave3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback                                                                                                                                                                                  
fe00::0 ip6-localnet                                                                                                                                                                                                
ff00::0 ip6-mcastprefix                                                                                                                                                                                             
ff02::1 ip6-allnodes                                                                                                                                                                                                
ff02::2 ip6-allrouters

为什么?如何修复?谢谢!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题