最近运行hadoop1.1出现map执行100%,reduce卡在0%的情况,甚至会出现无法启动datanode的情况。查看了一下日志,大致看到 Failed to fetch 字段,以及拒绝连接错误connection refused,查看配置没有发现问题,于是怀疑 /etc/hosts 文件配置的影响,参考了一下wiki的关于hadoop的connection refused页面,大致如下:
http://wiki.apache.org/hadoop/ConnectionRefused
Connection Refused
You get a ConnectionRefused Exception when there is a machine at the address specified, but there is no program listening on the specific TCP port the client is using -and there is no firewall in the way silently dropping TCP connection requests. If you do not know what a TCP connection request is, please consult the