在设置hadoop时SSH出现问题 [英] Something goes wrong with the SSH while setting up hadoop

查看:184
本文介绍了在设置hadoop时SSH出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个新的鱼hadoop.I安装Ubuntu 12.10在我的电脑上,我想安装Hadoop在伪分布式模式在一个单一的节点。我搜索,并得到了很多教程,但我有一个问题与SSH。我做了什么教程说。
我确定问题是关于SSH.I得到openssh服务器,并且这样做:

hadoop00 @ WebsoftStation:〜$ ssh-keygen -t dsa -P - f〜/ .ssh / id_dsa
hadoop00 @ WebsoftStation:〜/ .ssh $ cat〜/ .ssh / id_dsa.pub >> authorized_keys



成功ssh我的本地主机像这样:

hadoop00 @ WebsoftStation:〜$ ssh localhost

它工作。
所以我改变了路径到hadoop然后:

hadoop00 @ WebsoftStation:/ usr / local / hadoop $ sudo bin / start-all.sh

[sudo] hadoop00的密码:

启动namenode,记录到/usr/local/hadoop/libexec/../logs/hadoop-root-namenode-WebsoftStation.out

root @ localhost的密码:

root @ localhost的密码:localhost:权限被拒绝,请重试。

那么问题是什么?

解决方案

您已经为当前帐户设置了无密码的ssh。因为,当你可以使用ssh localhost没有任何问题,你需要做的下一件事是给你的脚本的执行权限。
执行以下命令:

  chmod + x bin / *。为所有脚本分配执行权限
./start.all ---->执行脚本

注意:Hadoop也可以在没有使用hadoop-daemon .sh脚本。使用无密码ssh的唯一优势是,./start.all脚本会在每个节点中代表您执行此操作。


I'm a new fish for hadoop.I installed Ubuntu 12.10 on my computer and I wanna install Hadoop in pseudo-distributed mode on one single node.I searched and get lots of tutorials but I have a problem with the SSH.I did what the tutorial said. I am sure the problem is about the SSH.I get the openssh-server,and had done this:
hadoop00@WebsoftStation:~$ssh-keygen -t dsa -P "" -f ~/.ssh/id_dsa hadoop00@WebsoftStation:~/.ssh$cat ~/.ssh/id_dsa.pub >> authorized_keys

Then I can successfully ssh my localhost like this:
hadoop00@WebsoftStation:~$ssh localhost
It worked. So I changed the path to hadoop and then:
hadoop00@WebsoftStation:/usr/local/hadoop$ sudo bin/start-all.sh
[sudo] password for hadoop00:
starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-WebsoftStation.out
root@localhost's password:
root@localhost's password: localhost: Permission denied, please try again.
So,what's the problem?

解决方案

You have setup password-less ssh for only your current account. Since, when you can use ssh localhost without any problem, the thing you need to do next is giving execution permission to your scripts. Execute the following commands:

chmod +x bin/*.sh  ---> assigns execution permission to all the scripts
./start.all        ----> executes the script

Note: Hadoop can also be run without having password-less ssh setup using hadoop-daemon.sh script. The only advantage with password-less ssh is that, the ./start.all, script will take the trouble of doing that on behalf of you in each of the nodes.

这篇关于在设置hadoop时SSH出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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