hadoop 不能正常启动
启动 hadoop 后,datanode 的 log 里一直报错,提示连不上 namenode。
2011-03-30 00:14:00,582 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 0 time(s).
2011-03-30 00:14:01,583 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 1 time(s).
2011-03-30 00:14:02,585 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 2 time(s).
2011-03-30 00:14:03,586 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 3 time(s).
2011-03-30 00:14:04,588 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 4 time(s).
2011-03-30 00:14:05,590 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 5 time(s).
2011-03-30 00:14:06,591 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 6 time(s).
2011-03-30 00:14:07,593 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 7 time(s).
2011-03-30 00:14:08,594 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 8 time(s).
2011-03-30 00:14:09,596 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: uec-fe/16.157.63.10:9000. Already tried 9 time(s).
2011-03-30 00:14:09,597 INFO org.apache.hadoop.ipc.RPC: Server at uec-fe/16.157.63.10:9000 not available yet, Zzzzz...
经过测试,在 namenode 上能连接 9000 端口。推测 hadoop 启动 ipc server 时只绑定在本地地址上。修改 /etc/hosts,把与 hostname 相关的配置删除后,hadoop 成功启动。
1 楼 chenlinping 2011-03-31 猜想:
/etc/hosts文件中有集群中所有机器的ip dns配置很重要。
执行一下hostname命令,看下是否正确。