connect to host hadoop port 22: No route to host

无线环境下,启动namenode时出现ssh错误


ssh: connect to host hadoop port 22: No route to host

Starting namenodes on [hadoop]
hadoop: ssh: connect to host hadoop port 22: No route to host
localhost: starting datanode, logging to /usr/hadoop/logs/hadoop-hadoop-datanode-Lenovo-V3000.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/hadoop/logs/hadoop-hadoop-secondarynamenode-Lenovo-V3000.out
hadoop@Lenovo-V3000:~$ ssh localhost
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-33-generic x86_64)








解决方法


查看  /etc/hosts 中配置的 IP  hostname 是否改变,无线环境下,IP 会自动分配
通过ip  a 查看相应的ip  与 /etc/hosts下的ip地址是否相同,不同要保持hosts文件与ip a 中的无线IP 保持一致




ip a



1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 50:7b:9d:0a:87:32 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:f8:9c:da:b0:a1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.210/24 brd 192.168.1.255 scope global dynamic wlp3s0
       valid_lft 83110sec preferred_lft 83110sec
    inet6 fe80::f69c:afa:2321:fd82/64 scope lin


cat /etc/hosts



127.0.0.1    localhost

127.0.1.1    Lenovo-V3000

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

#192.168.1.240 hadoop
192.168.1.210 hadoop


发现之前的是240,已经不存在,需要修改成210





你可能感兴趣的:(hadoop)