You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by 郝东 <do...@163.com> on 2015/02/10 11:42:08 UTC

Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)

Re:RE: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Rohith

Thanks very much!







At 2015-02-10 18:57:03, "Rohith Sharma K S" <ro...@huawei.com> wrote:


Currently automatic failover is not supported by YARN. This is open issue in Yarn

Refer : https://issues.apache.org/jira/i#browse/YARN-1177

 

Thanks & Regards

Rohith Sharma K S

 

From:郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To:user@hadoop.apache.org
Subject: Can not execute failover for RM HA

 

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)

 

Re:RE: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Rohith

Thanks very much!







At 2015-02-10 18:57:03, "Rohith Sharma K S" <ro...@huawei.com> wrote:


Currently automatic failover is not supported by YARN. This is open issue in Yarn

Refer : https://issues.apache.org/jira/i#browse/YARN-1177

 

Thanks & Regards

Rohith Sharma K S

 

From:郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To:user@hadoop.apache.org
Subject: Can not execute failover for RM HA

 

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)

 

Re:RE: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Rohith

Thanks very much!







At 2015-02-10 18:57:03, "Rohith Sharma K S" <ro...@huawei.com> wrote:


Currently automatic failover is not supported by YARN. This is open issue in Yarn

Refer : https://issues.apache.org/jira/i#browse/YARN-1177

 

Thanks & Regards

Rohith Sharma K S

 

From:郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To:user@hadoop.apache.org
Subject: Can not execute failover for RM HA

 

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)

 

Re:RE: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Rohith

Thanks very much!







At 2015-02-10 18:57:03, "Rohith Sharma K S" <ro...@huawei.com> wrote:


Currently automatic failover is not supported by YARN. This is open issue in Yarn

Refer : https://issues.apache.org/jira/i#browse/YARN-1177

 

Thanks & Regards

Rohith Sharma K S

 

From:郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To:user@hadoop.apache.org
Subject: Can not execute failover for RM HA

 

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)

 

RE: Can not execute failover for RM HA

Posted by Rohith Sharma K S <ro...@huawei.com>.
Currently automatic failover is not supported by YARN. This is open issue in Yarn
Refer : https://issues.apache.org/jira/i#browse/YARN-1177

Thanks & Regards
Rohith Sharma K S

From: 郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To: user@hadoop.apache.org
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)


RE: Can not execute failover for RM HA

Posted by Rohith Sharma K S <ro...@huawei.com>.
Currently automatic failover is not supported by YARN. This is open issue in Yarn
Refer : https://issues.apache.org/jira/i#browse/YARN-1177

Thanks & Regards
Rohith Sharma K S

From: 郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To: user@hadoop.apache.org
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)


Re:Re: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Xuan Gong

Thanks very much.





At 2015-02-11 02:07:54, "Xuan Gong" <xg...@hortonworks.com> wrote:


Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.




If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"
Thanks


Xuan Gong




From: 郝东 <do...@163.com>
Reply-To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Subject: Can not execute failover for RM HA



I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)




Re:Re: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Xuan Gong

Thanks very much.





At 2015-02-11 02:07:54, "Xuan Gong" <xg...@hortonworks.com> wrote:


Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.




If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"
Thanks


Xuan Gong




From: 郝东 <do...@163.com>
Reply-To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Subject: Can not execute failover for RM HA



I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)




Re:Re: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Xuan Gong

Thanks very much.





At 2015-02-11 02:07:54, "Xuan Gong" <xg...@hortonworks.com> wrote:


Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.




If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"
Thanks


Xuan Gong




From: 郝东 <do...@163.com>
Reply-To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Subject: Can not execute failover for RM HA



I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)




Re:Re: Can not execute failover for RM HA

Posted by 郝东 <do...@163.com>.
Hi, Xuan Gong

Thanks very much.





At 2015-02-11 02:07:54, "Xuan Gong" <xg...@hortonworks.com> wrote:


Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.




If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"
Thanks


Xuan Gong




From: 郝东 <do...@163.com>
Reply-To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org" <us...@hadoop.apache.org>
Subject: Can not execute failover for RM HA



I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)




Re: Can not execute failover for RM HA

Posted by Xuan Gong <xg...@hortonworks.com>.
Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.


If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

  1.  set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
  2.  If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"

Thanks

Xuan Gong


From: 郝东 <do...@163.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)



RE: Can not execute failover for RM HA

Posted by Rohith Sharma K S <ro...@huawei.com>.
Currently automatic failover is not supported by YARN. This is open issue in Yarn
Refer : https://issues.apache.org/jira/i#browse/YARN-1177

Thanks & Regards
Rohith Sharma K S

From: 郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To: user@hadoop.apache.org
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)


Re: Can not execute failover for RM HA

Posted by Xuan Gong <xg...@hortonworks.com>.
Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.


If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

  1.  set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
  2.  If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"

Thanks

Xuan Gong


From: 郝东 <do...@163.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)



Re: Can not execute failover for RM HA

Posted by Xuan Gong <xg...@hortonworks.com>.
Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.


If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

  1.  set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
  2.  If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"

Thanks

Xuan Gong


From: 郝东 <do...@163.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)



Re: Can not execute failover for RM HA

Posted by Xuan Gong <xg...@hortonworks.com>.
Right now, RM HA does not use ZKFC. So, we can not use this command “yarn rmadmin -failover rm1 rm2” now.


If you use the default HA configuration, you set up a Automatic RM HA. In order to failover manually,  you have two options:

  1.  set up manual RM HA by set the configuration “yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin –transitionToStandby rm2” to control which rm goes to active by yourself.
  2.  If you really want to experiment the manual failover when automatic failover enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual rm2"

Thanks

Xuan Gong


From: 郝东 <do...@163.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)



RE: Can not execute failover for RM HA

Posted by Rohith Sharma K S <ro...@huawei.com>.
Currently automatic failover is not supported by YARN. This is open issue in Yarn
Refer : https://issues.apache.org/jira/i#browse/YARN-1177

Thanks & Regards
Rohith Sharma K S

From: 郝东 [mailto:donhoff_h@163.com]
Sent: 10 February 2015 16:12
To: user@hadoop.apache.org
Subject: Can not execute failover for RM HA

I just set up ResourceManager HA. Both of the resourcemanagers started correctly. When I killed the active one, the other became active. But when I used the following command to do a manual failover, I got exceptions. I don't know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: RMHAServiceTarget doesn't have a corresponding ZKFC address
    at org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)