Hadoop:start-dfs.sh连接被拒绝 [英] Hadoop : start-dfs.sh Connection refused

查看:722
本文介绍了Hadoop:start-dfs.sh连接被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在debian/stretch64上有一个无聊的盒子 我尝试使用文档安装Hadoop3 http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.htm

I have a vagrant box on debian/stretch64 I try to install Hadoop3 with documentation http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.htm

当我运行start-dfs.sh时 我有这条消息

When I run start-dfs.sh I have this message

vagrant@stretch:/opt/hadoop$ sudo sbin/start-dfs.sh
Starting namenodes on [localhost]
pdsh@stretch: localhost: connect: Connection refused
Starting datanodes
pdsh@stretch: localhost: connect: Connection refused
Starting secondary namenodes [stretch]
pdsh@stretch: stretch: connect: Connection refused
vagrant@stretch:/opt/hadoop$

当然,我尝试使用以下命令更新hadoop-env.sh: 导出HADOOP_SSH_OPTS =-p 22"

of course I tried to update my hadoop-env.sh with : export HADOOP_SSH_OPTS="-p 22"

ssh localhost工作(无密码)

ssh localhost work (without password)

我不知道该如何解决该问题

I have not ideas what I can change to solve this problem

推荐答案

默认情况下,pdsh的工作方式存在问题(请参见编辑),但是Hadoop可以不使用它. Hadoop检查系统是否在/usr/bin/pdsh上具有pdsh,如果有,请使用它.摆脱使用pdsh的一种简单方法是编辑$HADOOP_HOME/libexec/hadoop-functions.sh

There is a problem the way pdsh works by default (see edit), but Hadoop can go without it. Hadoop checks if the system has pdsh on /usr/bin/pdsh and uses it if so. An easy way get away from using pdsh is editing $HADOOP_HOME/libexec/hadoop-functions.sh

替换行

if [[ -e '/usr/bin/pdsh' ]]; then

作者

if [[ ! -e '/usr/bin/pdsh' ]]; then

然后hadoop没有pdsh,一切正常.

then hadoop goes without pdsh and everything works.

一个更好的解决方案将使用pdsh,但使用ssh代替rsh,如

A better solution would be use pdsh, but with ssh instead rsh as explained here, so replace line from $HADOOP_HOME/libexec/hadoop-functions.sh:

PDSH_SSH_ARGS_APPEND="${HADOOP_SSH_OPTS}" pdsh \

作者

PDSH_RCMD_TYPE=ssh PDSH_SSH_ARGS_APPEND="${HADOOP_SSH_OPTS}" pdsh \

肥胖:正如我在评论中提到的那样,仅做export PDSH_RCMD_TYPE=ssh是行不通的.我不知道为什么...

Obs: Only doing export PDSH_RCMD_TYPE=ssh, as I mention in the comment, doesn't work. I don't know why...

我还打开了一个问题,并提交了此问题的补丁: HADOOP-15219

I've also opened a issue and submitted a patch to this problem: HADOOP-15219

这篇关于Hadoop:start-dfs.sh连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆