Thanks Sandeep.
I am trying to understand what you said. Should I do below:
1. download service.xml and rewrite.xml from link [1].
2. replace the ones under /var/lib/knox/data-2.6.4.0-91/
services/hdfsui/2.7.0/
3. in the topology file,
change:
<service>
<role>HDFSUI</role>
<url>http://{DOMAIN}:50070</url>
</service>
to:
<service>
<role>HDFSUI</role>
<url>http://{DOMAIN}:50070/*2.7.0/*</url>
</service>
Thanks for clarification.
On Mon, Jul 9, 2018 at 3:35 PM, Sandeep Moré <[email protected]> wrote:
> There were a bunch of fixes that went into Knox 1.1.0 (currently in the
> process of releasing) that fixes a bunch of issues with HDFSUI.
> We also added new service defs [1] that has those fixes.
>
> If you are using older version of knox, try adding these to your hdfsui
> service folder (services/hdfsui/). Because of a bug [2] Knox does not
> always pick up the latest service defs. so you will have to specify HDFSUI
> version in your topology (3.0.0 in this case).
>
> Let me know if you run into issues.
>
> Best,
> Sandeep
>
>
> [1] https://github.com/apache/knox/tree/master/gateway-
> service-definitions/src/main/resources/services/hdfsui/3.0.0
> [2] https://issues.apache.org/jira/browse/KNOX-1349
>
>
> On Mon, Jul 9, 2018 at 6:16 PM Lian Jiang <[email protected]> wrote:
>
>> Hi,
>>
>> I am following https://community.hortonworks.
>> com/articles/81713/configure-knox-to-access-hdfs-ui.html to expose hdfs
>> ui via knox.
>>
>> I have tested that all below curl commands worked:
>>
>> on namenode:
>> curl http://localhost:50070/
>> curl http://localhost:50070/dfshealth.html
>>
>> on a random machine:
>> curl -vvv -k -u guest:"{PASSWORD}" https://{DOMAIN}/gateway/ui/hdfs
>>
>> However, in web browser, https://{DOMAIN}/gateway/ui/hdfs is redirected
>> to https://{DOMAIN}/gateway/ui/dfshealth.html which is not available. I
>> observed that /var/lib/knox/data-2.6.4.0-91/
>> services/hdfsui/2.7.0/rewrite.xml already has:
>>
>> <rule dir="IN" name="HDFSUI/hdfs/inbound/namenode/dfs"
>> pattern="*://*:*/**/hdfs/dfshealth.html">
>> <rewrite template="{$serviceUrl[HDFSUI]}/dfshealth.html"/>
>> </rule>
>>
>> what else do I need to do make hdfs ui work via knox? Appreciate any clue.
>>
>