P.S:请不要将此标记为重复
嗨,
我一直在尝试在伪分布式模式下设置和运行Hadoop。当我运行start-all.sh脚本时,我得到了这个输出:
starting namenode, logging to /home/raveesh/Hadoop/hadoop-0.20.2/bin/../logs/..
localhost: ssh: connect to host localhost port 22: Connection refused
localhost: ssh: connect to host localhost port 22: Connection refused
starting jobtracker, logging to /home/raveesh/Hadoop/hadoop-0.20.2/bin/../logs/..
localhost: ssh: connect to host localhost port 22: Connection refused
raveesh@raveeshL:~/Hadoop/hadoop-0.20.2/bin$
这就是我所做的。我使用:
安装了open-ssh服务器和客户端sudo apt-get install openssh-server openssh-client
我已经在
中启动了ssh服务器sudo service ssh start
我得到输出:
ssh start/running, process 5466
我还运行了以下命令:
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
但是当我运行start-all脚本时,它仍然显示连接被拒绝。我也尝试了here提到的提示,但我无法让它发挥作用。我在防火墙后面,我正在使用Ubuntu。有什么东西我不见了吗?
非常感谢任何帮助。
感谢。
答案 0 :(得分:3)
安装ssh后,还应启用无密码登录。
% ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
% cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys