Hadoop exception and handling Summary-01 (pony-original), hadoop-01

Source: Internet
Author: User

Hadoop exception and handling Summary-01 (pony-original), hadoop-01

 

Test environment:

Local: MyEclipse

Cluster: Vmware 11 + 6 Centos 6.5

Hadoop version: 2.4.0 (configured as automatic HA)

Test Background:

After four normal tests of the MapReduce Program (hereinafter referred to as MapReduce), a new MR program is executed, and the console information of MyEclipse is stuck, I remotely connect to NameNode to view the system directory. At this time, I looked at the MyEclipse console and found that an exception has been thrown as follows:

Org. apache. hadoop. ipc. RemoteException (org. apache. hadoop. ipc. StandbyException): Operation category READ is not supported in state standby

Check whether the two NameNode statuses have been changed to Standby on the Web page. This makes me very strange. In the cluster configuration for automatic fault recovery, all of them will become Standby.

Prevent impermanence copy: Add author link: http://www.cnblogs.com/hadoop2015/

 

Solution:

Method 1: (the result does not work)

By using Shell commands, hadoop/bin/hdfs haadmin-failover -- forceactive hadoop2 hadoop1 (note that this method was originally forced to switch NameNode during manual fault recovery)

Returned results, not supported, and prompt sincerely. This method works only when manual failover is performed.

Method 2: (effective)

I used JPS to check the status of the ZooKeeper cluster and found that there were no signs of failure. It turned out to be the reason for ZK, So I restarted the ZK cluster.

Then restart ZKFailoverController (DFSZKFailoverController): If this role does not exist, the NameNode will not be automatically switched.

 

Although NameNode is more reliable than Hadoop1 through the HA mechanism, the number of ZK clusters must be guaranteed. I only set ZK clusters with three nodes, the reliability of ZK clusters must be ensured: the number of active ZK nodes> (total number of ZK nodes-1)/2. therefore, a lot of ZK cluster nodes are king.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.