我是靠谱客的博主 无限灰狼,最近开发中收集的这篇文章主要介绍connect to host hadoop port 22: No route to host无线环境下,启动namenode时出现ssh错误解决方法,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

无线环境下,启动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: <LOOPBACK,UP,LOWER_UP> 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: <NO-CARRIER,BROADCAST,MULTICAST,UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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





最后

以上就是无限灰狼为你收集整理的connect to host hadoop port 22: No route to host无线环境下,启动namenode时出现ssh错误解决方法的全部内容,希望文章能够帮你解决connect to host hadoop port 22: No route to host无线环境下,启动namenode时出现ssh错误解决方法所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部