Hadoop测试任务失败,无法连接到slave从机

Q:

//执行
[root@hadoop01 hadoop]# bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.0.jar wordcount /input/LICENSE.txt /output22
//报错
2018-06-27 19:07:00,000 INFO ipc.Client: Retrying connect to server: hadoop02_.yu.net/192.168.221.146:45901. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)
2018-06-27 19:07:08,632 INFO ipc.Client: Retrying connect to server: hadoop04_.yu.net/192.168.221.148:48072. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)
2018-06-27 19:07:09,634 INFO ipc.Client: Retrying connect to server: hadoop04_.yu.net/192.168.221.148:48072. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)

执行测试任务时,链接不到从机,且每次链接不到的从机都不同。

A:

1、 检测防火墙是否设置正常

2、检测主机名是否一致正确(检查/etc/hosts 文件)

3、删除/etc/hosts中的localhost等两行,否则会报找不到主机localhost。

4、保持多台服务器时间同步。

5、检查配置文件workers,和slaves的主机名是否一致

6、测试是否可以ping通别名

ping hadoop_2.yu.net    //这是错误主机名
···

7、ssh免密传出设置是否正常,检测ssh免密登录

8、检测主机名是否标准

hadoop_2是错误主机名,改为hadoop02

总结: hadoop对主机名(FQDN)要求很严格,hosts文件中有localhost不行,主机名有下划线也不行,虽然在启动时没有问题,但是执行任务时就会出错!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值