Support Questions
Find answers, ask questions, and share your expertise

RESOURCEMANAGER HA is not working through Knox topology. Please help us.

We have already configured HA for RESOURCEMANAGER in Hadoop. It is working fine. . We have included the following ---config in knox topology(topology1) to support HA .

------------

<role>ha</role> <name>HaProvider</name> <enabled>true</enabled> <param> <name>WEBHDFS</name> <value>maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=3000;enabled=true</value> </param> <param> <name>RESOURCEMANAGER</name> <value>maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=3000;enabled=true</value> </param>

----------

-------

<service> <role>RESOURCEMANAGER</role>

<url>http://rmhost1:8088/ws</url>

<url>http://rmhost2::8088/ws</url>

</service>

-------

The below command is working fine when the rmhost1 is active resourcemanager.

curl -ivk -u narasik "http://knoxhost:8443/knox/topology1/resourcemanager/v1/cluster"

But it is failing when the rmhost2 is active resoucemanger.

The error details are as below.

==========================

Enter host password for user 'narasik':

* About to connect() to knoxhost port 8443 (#0) * Trying 53.20.25.82... connected

*Connected to knoxhost port 8443 (#0) * Server auth using Basic with user 'narasik'

> GET /knox/topology1/resourcemanager/v1/cluster HTTP/1.1

> Authorization: Basic ZWVkY19hX25hcmFzaWs6S2FuYXB1cmFAMDYwNDE5Nzc=

> User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10

> Host: knoxhost:8443

> Accept: */*

>

< HTTP/1.1 307 Temporary Redirect

HTTP/1.1 307 Temporary Redirect

< Date: Tue, 13 Mar 2018 11:24:42 GMT

Date: Tue, 13 Mar 2018 11:24:42 GMT

< Set-Cookie: JSESSIONID=1iup958ngi2i01ift6v8d6sbst;Path=/knox/topology;Secure;HttpOnly

Set-Cookie: JSESSIONID=1iup958ngi2i01ift6v8d6sbst;Path=/knox/topology1;Secure;HttpOnly

< Expires: Thu, 01 Jan 1970 00:00:00 GMT

Expires: Thu, 01 Jan 1970 00:00:00 GMT

< Set-Cookie: rememberMe=deleteMe; Path=/knox/topology1; Max-Age=0; Expires=Mon, 12-Mar-2018 11:24:42 GMT

Set-Cookie: rememberMe=deleteMe; Path=/knox/topology1; Max-Age=0; Expires=Mon, 12-Mar-2018 11:24:42 GMT

< Cache-Control: no-cache

Cache-Control: no-cache

< Expires: Tue, 13 Mar 2018 11:24:42 GMT

Expires: Tue, 13 Mar 2018 11:24:42 GMT

< Date: Tue, 13 Mar 2018 11:24:42 GMT

Date: Tue, 13 Mar 2018 11:24:42 GMT

< Pragma: no-cache

Pragma: no-cache

< Expires: Tue, 13 Mar 2018 11:24:42 GMT

Expires: Tue, 13 Mar 2018 11:24:42 GMT

< Date: Tue, 13 Mar 2018 11:24:42 GMT

Date: Tue, 13 Mar 2018 11:24:42 GMT

< Pragma: no-cache

Pragma: no-cache

< Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8

< X-Frame-Options: SAMEORIGIN X-Frame-Options: SAMEORIGIN

< Location: http://rmhost2:8088/ws/v1/cluster/?doAs=narasik

Location: http://rmhost2:8088/ws/v1/cluster/?doAs=narasik

< Server: Jetty(6.1.26.hwx) Server: Jetty(6.1.26.hwx)

< Content-Length: 77 Content-Length: 77

<

This is standby RM. The redirect url is: /ws/v1/cluster/?doAs=narasik

* Connection #0 to host knox host left intact

* Closing connection #0

==========================

1 REPLY 1

Expert Contributor

hi @Narasimha K

Looks like rmhost2 is in standby.

could you please check if the connection to rmhost2 is working without knox. i.e. does the url get auto redirected to Active rmhost2 when you connect against standby RM i.e. rmhost1.

Also, can you dump the output when rmhost1 is active resoucemanger. Need to check if

curl -ivk -u narasik "http://knoxhost:8443/knox/topology1/resourcemanager/v1/cluster"