ssh与集群下级节点的连接失败

时间:2013-05-31 17:45:26

标签: linux ssh connection out timed

通过以下命令在集群的从属节点上执行服务启动:

hadoop@one:/export/hadoop-1.0.1/bin$. ./start-all.sh

不是我第一次收到结果

starting namenode, logging to /export/hadoop-1.0.1/libexec/../logs/hadoop--namenode-one.out
192.168.1.10: starting datanode, logging to /export/hadoop-1.0.1/libexec/../logs/hadoop-hadoop-datanode-myhost2.out
192.168.1.11: ssh: connect to host 192.168.1.11 port 22: Connection timed out
192.168.1.5: starting secondarynamenode, logging to /export/hadoop-1.0.1/libexec/../logs/hadoop-hadoop-secondarynamenode-one.out
starting jobtracker, logging to /export/hadoop-1.0.1/libexec/../logs/hadoop--jobtracker-one.out
192.168.1.10: starting tasktracker, logging to /export/hadoop-1.0.1/libexec/../logs/hadoop-hadoop-myhost2.out
192.168.1.11: ssh: connect to host 192.168.1.11 port 22: Connection timed out

如何解决以下错误:

ssh: connect to host port 22: Connection timed out

hadoop@one: /export/hadoop-1.0.1/bin$ ssh -vvv 192.168.1.10
Sun_SSH_1.5, SSH protocols 1.5/2.0, OpenSSL 0x1000004f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0 
debug1: Connecting to 192.168.1.10 [192.168.1.10] port 22
debug1: connect to address 192.168.1.10 port 22: Connection timed out
ssh: connect to host 192.168.1.10 port 22: Connection timed out

如何纠正错误?

1 个答案:

答案 0 :(得分:0)

您的计算机上是否运行了sshd守护程序?您的操作系统可能带有ssh,但是为了启动sshd守护程序,您需要完全安装ssh。完成后我的意思是:

  

ssh:我们用来连接远程机器的命令 - 客户端。

     

sshd:在服务器上运行并允许客户端访问的守护程序   连接到此服务器。

此外,请确保端口22没有问题。如果您仍然遇到问题,请尝试使用-v开关进行ssh以获取完整的跟踪。

ssh -v myhost2

您可以here查看ssh的详细说明。