Hadoop cluster built ha, the initial start of normal, the last few days when the launch of the occasional discovery, Namenode1 node after the start of a period of time (about 10 seconds-about half a minute), Namenode1 on the namenode process to stop, view the log:
1 .- ,- - +: Wu:Panax Notoginseng,617INFO org.apache.hadoop.ipc.Client:Retrying Connect to server:slave1/192.168.128.136:8485. Already tried9 Time(s); Retry policy is retryuptomaximumcountwithfixedsleep (maxretries=Ten, sleeptime= +MILLISECONDS)2 .- ,- - +: Wu:Panax Notoginseng,629WARN org.apache.hadoop.hdfs.server.namenode.FSEditLog:Unable to determine input streams from QJM to [192.168.128.135:8485,192.168.128.136:8485,192.168.128.137:8485]. Skipping.3Org.apache.hadoop.hdfs.qjournal.client.QuorumException:Got too many exceptions to achieve quorum size2/3.1Successful responses:4 192.168.128.137:8485: [[1557,1558], [1559,1560], [1561,1562], [1563,1564], [1565,1566], [1567,1568], [1569,1570], [1571,1572], [1573,1574], [1575,1576], [1577,1578], [1579,1580], [1581,1582], [1583,1584], [1585,1586], [1587,1588], [1589,1589], [1590,1591]]5 2Exceptions thrown:6 192.168.128.136:8485: Call from master/192.168.128.135To slave1:8485Failed on connection Exception:java.net.ConnectException:Connection refused; For MoreDetails See:http://wiki.apache.org/hadoop/connectionrefused7 192.168.128.135:8485: Call from master/192.168.128.135To master:8485Failed on connection Exception:java.net.ConnectException:Connection refused; For MoreDetails See:http://wiki.apache.org/hadoop/connectionrefused8At Org.apache.hadoop.hdfs.qjournal.client.QuorumException.create (Quorumexception.java:Bayi)9At Org.apache.hadoop.hdfs.qjournal.client.QuorumCall.rethrowException (Quorumcall.java:223)TenAt Org.apache.hadoop.hdfs.qjournal.client.AsyncLoggerSet.waitForWriteQuorum (Asyncloggerset.java:142) OneAt Org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.selectInputStreams (Quorumjournalmanager.java:471)
First, find out the reason after the information:
I started the cluster with start-al.sh, Journalnode (Port 8485) was started after Namenode. By default Namenode starts 10s (maxretries=10, sleeptime=1000) and Journalnode does not start, it will report the above error.
Second, the solution:
1. Modify the IPC parameters in the Core-site.xml
1 <!--Modify the IPC parameters in the Core-site.xml to prevent the connection Journalnode service from appearing connectexception -2 < Property>3 <name>Ipc.client.connect.max.retries</name>4 <value>100</value>5 <Description>Indicates the number of retries a client would make to establish a server connection.</Description>6 </ Property>7 < Property>8 <name>Ipc.client.connect.retry.interval</name>9 <value>10000</value>Ten <Description>Indicates the number of milliseconds a client would wait for before retrying to establish a server connection.</Description> One </ Property>
Note: The IPC parameters in the Core-site.xml can be fixed only for this issue where the connection time-out is not completed because the service is not started. If the target service itself does not start successfully, tuning the IPC parameter here is not valid.
2. Manual Step-up
1 #启动hadfs, note that there are many nodes that are executed. 2 hadoop-daemons. SH Start Journalnode 3 Hadoop-daemon. SH start Namenode #每个namenode都要执行 4 Hadoop-daemon. SH start ZKFC #每个namenode都要执行 5 hadoop-daemons. SH Start Datanode 6 #启动yarn 7 Start-yarn. SH
The way to start the cluster in steps, because Journalnode is started before Namenode, so the next time the connection is successful, it will not retry multiple times.
Third, error analysis again
Since HA was deployed, the first time I started it was stepped-up and did not experience the problem. After all is start-all.sh start, about 70% cases will have this problem, 30% of the start is normal, the reason, I think 70% when the Journalnode start relatively slow, and another time is to start relatively fast. It is true that when the cluster hosts have just turned on, it will be slow to start Hadoop, wait a while or stop after Hadoop for the first time, and then restart, in both cases, Hadoop starts faster. I'm a virtual machine and I usually start hadoop the first time, so it's a lot more time to hit this hole. Of course, the root cause is found, no matter how fast or slow the Hadoop startup Namenode will not hang up.
In addition, there are many reasons for exiting after Namenode startup, this article is only for the starting one, the specific situation needs to view the log and find the appropriate solution.
Acknowledgements: http://www.linuxidc.com/Linux/2016-03/129437.htm
Call from master/192.168.128.135 to master:8485 failed on connection exception:java.net.ConnectException:Connection ref Used