The following issues were encountered during Hadoop startup:
2015-08-02 19:43:20,771 INFO Org.apache.hadoop.hdfs.server.datanode.DataNode:STARTUP_MSG:
/************************************************************
Startup_msg:starting DataNode
Startup_msg:host = slave1/192.168.198.21
Startup_msg:args = []
Startup_msg:version = 1.2.1
Startup_msg:build = Https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2-r 1503152; Compiled by ' Mattf ' on Mon Jul 15:23:09 PDT 2013
Startup_msg:java = 1.7.0_79
************************************************************/
2015-08-02 19:43:20,902 INFO org.apache.hadoop.metrics2.impl.MetricsConfig:loaded properties from Hadoop-metrics2.properties
2015-08-02 19:43:20,910 INFO Org.apache.hadoop.metrics2.impl.MetricsSourceAdapter:MBean for source metricssystem,sub =stats registered.
2015-08-02 19:43:20,911 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl:Scheduled snapshot period at 10 Second (s).
2015-08-02 19:43:20,911 INFO Org.apache.hadoop.metrics2.impl.MetricsSystemImpl:DataNode metrics system started
2015-08-02 19:43:21,033 INFO Org.apache.hadoop.metrics2.impl.MetricsSourceAdapter:MBean for source UGI registered.
2015-08-02 19:43:21,036 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl:Source name Ugi already exists!
2015-08-02 19:43:30,237 INFO org.apache.hadoop.ipc.Client:Retrying connect to server:master/192.168.198.20:9000. Already tried 8 time (s); Retry policy is Retryuptomaximumcountwithfixedsleep (maxretries=10, sleeptime=1 SECONDS)
2015-08-02 19:43:31,239 INFO org.apache.hadoop.ipc.Client:Retrying connect to server:master/192.168.198.20:9000. Already tried 9 time (s); Retry policy is Retryuptomaximumcountwithfixedsleep (maxretries=10, sleeptime=1 SECONDS)
2015-08-02 19:43:31,247 ERROR Org.apache.hadoop.hdfs.server.datanode.DataNode:java.io.IOException:Call to master/ 192.168.198.20:9000 failed on local exception:java.net.NoRouteToHostException: no route to host
At Org.apache.hadoop.ipc.Client.wrapException (client.java:1150)
At Org.apache.hadoop.ipc.Client.call (client.java:1118)
At Org.apache.hadoop.ipc.rpc$invoker.invoke (rpc.java:229)
At Com.sun.proxy. $Proxy 3.getProtocolVersion (Unknown Source)
At Org.apache.hadoop.ipc.RPC.checkVersion (rpc.java:422)
At Org.apache.hadoop.ipc.RPC.getProxy (rpc.java:414)
At Org.apache.hadoop.ipc.RPC.getProxy (rpc.java:392)
At Org.apache.hadoop.ipc.RPC.getProxy (rpc.java:374)
At Org.apache.hadoop.ipc.RPC.getProxy (rpc.java:453)
At Org.apache.hadoop.ipc.RPC.waitForProxy (rpc.java:335)
At Org.apache.hadoop.ipc.RPC.waitForProxy (rpc.java:300)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode (datanode.java:385)
At Org.apache.hadoop.hdfs.server.datanode.datanode.<init> (datanode.java:321)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance (datanode.java:1712)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode (datanode.java:1651)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode (datanode.java:1669)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain (datanode.java:1795)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.main (datanode.java:1812)
Caused by:java.net.NoRouteToHostException: no route to host
At Sun.nio.ch.SocketChannelImpl.checkConnect (Native Method)
Analysis:
This does not go to the host routing problem is not uncommon, generally either namenode and Datanode host name between itself Ping is ping not pass, this probability is small, because all know to ensure that master and slaves node is able to communicate normally, so will check. It is most likely that the firewall is not shutting down, or because the firewall status is not visible, so the firewall is shut down.
Solution:
(1) Ping the host name of the other slaves node from the Namenode host (note the host name of the slaves node ), if the ping is not possible because the/etc/hosts of the Namenode node is not configured with the host name and IP address mapping , which complements the mapping of the host name to the IP address.
(2) Ping the host name of the master node from the Datanode host (note also the host name of the node ), if the ping does not work, the reason may be the Datenode node/etc/hosts The mapping relationship between host name and IP address is not configured, and the mapping relationship between the host name and IP address is complete.
(3) Check whether the firewall of each machine node is turned off ( or the firewall is turned on, but open to our designated port, it is best to turn off the firewall):
The following checks the state of the firewall for different versions of the Linux system and shuts down the firewall:
---------------------------------------------------------------
Ubuntu ( Ubuntu-12.04-desktop-amd64 )
View firewall status: UFW status
Firewall off:UFW Disable
---------------------------------------------------------------
centos6.0
View firewall Status: Service iptables status
Turn off firewall: chkconfig iptables off #开机不启动防火墙服务
--------------------------------------------------------------
centos7.0 (the default is to use firewall as the firewall, and if it is not changed to iptables firewall, use the following command to view and turn off the firewall)
View firewall status: Firewall-cmd--state
Shut down firewall: Systemctl stop Firewalld.service
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Hadoop problem Java.net.NoRouteToHostException: no route to host