Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

WebHDFS UI via knox not accessible in HDFS HA cluster

WebHDFS UI via knox not accessible in HDFS HA cluster

Hi @dvillarreal, @Jonas Straub


I'm trying to access WebHDFS UI on my cluster where knox and HDFS HA is enabled.

When my Namenode1 is active and Namenode2 is in StandbyState, WebHDFS is accessible. But when Namennode2 becomes active and Namenode1 is stopped, WebHDFS is not accessible (Here Namenode1 is not in standby state, I have stopped it manually).

From error it looks like WebHDFS request is going to master-02 which is stopped instead of going to Active Namenode master-03.

When I manually change knox topology and write master-03 as first url in NAMENODE and HDFSUI, Knox starts to point master-03. So I think knox gateway points to first URL only.


Knox-topolgy is like below:

<provider>
<role>ha</role>
<name>HaProvider</name>
<enabled>true</enabled>
<param>
<name>WEBHDFS</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=1000;enabled=true</value>
</param>
<param>
<name>NAMENODE</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>HDFSUI</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>YARNUI</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>RESOURCEMANAGER</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>HIVE</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>HBASEUI</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
</provider>

<service>
<role>WEBHDFS</role>
<url>http://master-02:50070/webhdfs/</url>
<url>http://master-03:50070/webhdfs/</url>
</service>
<service>
<role>NAMENODE</role>
<url>hdfs://master-02:8020/</url>
<url>hdfs://master-03:8020/</url>
</service>
<service>
<role>HDFSUI</role>
<url>http://master-02:50070/</url>
<url>http://master-03:50070/</url>
</service>


Error that I get in logs are.

2019-03-01 09:01:59,436 WARN hadoop.gateway (DefaultDispatch.java:executeOutboundRequest(147)) - Connection exception dispatching request: http://master-02:50070/dfshealth.html org.apache.http.conn.HttpHostConnectException: Connect to master-02:50070 [master-02/10.100.69.15] failed: Connection refused (Connection refused)
org.apache.http.conn.HttpHostConnectException: Connect to master-02:50070 [master-02/10.100.69.15] failed: Connection refused (Connection refused)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)

Browser Error Image

106752-browser-error.jpg


Error Image of Gateway.log

106784-log-error-1.jpg

Thanks in Advance..




Don't have an account?
Coming from Hortonworks? Activate your account here