hadoop启动start-all.sh出错(master: ssh: connect to host master port 22: Connection refused)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop启动start-all.sh出错(master: ssh: connect to host master port 22: Connection refused)相关的知识,希望对你有一定的参考价值。
当我们打开系统输入hadoop启动命令start-all.sh时出现以下错误:
[[email protected] ~]# start-all.sh starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-master.out master: ssh: connect to host master port 22: Network is unreachable master: ssh: connect to host master port 22: Network is unreachable starting jobtracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-jobtracker-master.out master: ssh: connect to host master port 22: Network is unreachable
我们查看进程:
[[email protected] ~]# jps 2739 Jps [[email protected] ~]#
显示我们hadoop没有启动。
我的解决方法:
我们先查看我们当前虚拟机系统的ip为192.168.40.128,
[[email protected] ~]# ifconfig eth1 Link encap:Ethernet HWaddr 00:0C:29:4E:BC:7A inet addr:192.168.40.128 Bcast:192.168.40.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe4e:bc7a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:127 errors:0 dropped:0 overruns:0 frame:0 TX packets:134 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12497 (12.2 KiB) TX bytes:14291 (13.9 KiB) Interrupt:19 Base address:0x2024 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:24 errors:0 dropped:0 overruns:0 frame:0 TX packets:24 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1616 (1.5 KiB) TX bytes:1616 (1.5 KiB)
然后我们编辑查看/etc/hosts文件里的配置:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.80.100 master#hadoop的ip配置 ~ ~ ~ "/etc/hosts" 3L, 180C
我们可以看到master,hadoop的ip配置为:192.168.80.100,与当前系统的ip不一致。键盘按i编辑修改ip为当前系统ip(192.168.40.128),按esc输入:wq退出保存。然后重新启动start-all.sh
[[email protected] ~]# start-all.sh starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-master.out master: Warning: Permanently added the RSA host key for IP address ‘192.168.40.128‘ to the list of known hosts. master: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-datanode-master.out master: starting secondarynamenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-secondarynamenode-master.out starting jobtracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-jobtracker-master.out master: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-tasktracker-master.out
启动成功,查看进程
[[email protected] ~]# jps 3065 SecondaryNameNode 3400 Jps 3146 JobTracker 2951 DataNode 2843 NameNode 3260 TaskTracker
成功
本文出自 “上前后” 博客,请务必保留此出处http://updown.blog.51cto.com/9780213/1773952
以上是关于hadoop启动start-all.sh出错(master: ssh: connect to host master port 22: Connection refused)的主要内容,如果未能解决你的问题,请参考以下文章
关于hadoop单机配置问题执行hadoop namenode -format并start-all.sh后用jps查看并没有启动成功
关于HADOOP用jps看进程,只能看到namenode,Jps跟Nodemanager,之前都能看,启动是用start-all.sh