當(dāng)我們打開系統(tǒng)輸入hadoop啟動(dòng)命令start-all.sh時(shí)出現(xiàn)以下錯(cuò)誤:
按需定制網(wǎng)站可以根據(jù)自己的需求進(jìn)行定制,成都做網(wǎng)站、成都網(wǎng)站制作構(gòu)思過程中功能建設(shè)理應(yīng)排到主要部位公司成都做網(wǎng)站、成都網(wǎng)站制作的運(yùn)用實(shí)際效果公司網(wǎng)站制作網(wǎng)站建立與制做的實(shí)際意義
[root@master ~]# 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
我們查看進(jìn)程:
[root@master ~]# jps 2739 Jps [root@master ~]#
顯示我們hadoop沒有啟動(dòng)。
我的解決方法:
我們先查看我們當(dāng)前虛擬機(jī)系統(tǒng)的ip為192.168.40.128,
[root@master ~]# ifconfig eth2 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,與當(dāng)前系統(tǒng)的ip不一致。鍵盤按i編輯修改ip為當(dāng)前系統(tǒng)ip(192.168.40.128),按esc輸入:wq退出保存。然后重新啟動(dòng)start-all.sh
[root@master ~]# 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
啟動(dòng)成功,查看進(jìn)程
[root@master ~]# jps 3065 SecondaryNameNode 3400 Jps 3146 JobTracker 2951 DataNode 2843 NameNode 3260 TaskTracker
成功