ssh: connect to host hadoop000 port 22: Connection timed out

报错如下:

[hadoop@hadoop000 sbin]$ ./start-dfs.sh

18/01/24 22:46:38 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [hadoop000]
hadoop000: ssh: connect to host hadoop000 port 22: Connection timed out
hadoop000: ssh: connect to host hadoop000 port 22: Connection timed out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: secondarynamenode running as process 3195. Stop it first.
18/01/24 22:48:48 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

解决过程:

 1、ifconfig看了下ip地址

2、在cmd上ping了下,发现并无问题

3、使用sudo service iptables status命令查看防火墙状态,也没有问题

[hadoop@hadoop000 ~]$ sudo service iptables status
iptables: Firewall is not running.

我们使用sudo chkconfig iptables off来永久关闭防火墙,如果使用sudo service iptables stop将临时关闭防火墙,会在下一次关机重启后重置,建议使用第一种

4、最后看了下 sudo vi /etc/hosts

终于找到问题,原来是ip被修改了。

猜你喜欢

转载自blog.csdn.net/dingxl555/article/details/87632937