Ah, didn't think of that !
Thanks Sumit !

On Mon, Oct 31, 2016 at 9:54 AM, Sumit Gupta <[email protected]>
wrote:

> Hi Mohammad,
>
> Not sure if I got all the details right for what you need, but if you want
> to proxy knox and have knox use that proxy’s host and port, then we have a
> facility to configure that URL as the ‘frontend URL’.
>
> This can be configured as the property ‘gateway.frontend.url’ in the
> gateway-site.xml file. Some details can be found here:
>
> http://knox.apache.org/books/knox-0-9-1/user-guide.html#
> Gateway+Server+Configuration
>
>
> HTH,
> Sumit
>
>
> From: Sandeep More <[email protected]>
> Reply-To: "[email protected]" <[email protected]>
> Date: Monday, October 31, 2016 at 9:36 AM
> To: "[email protected]" <[email protected]>, Mohammad Islam <
> [email protected]>
> Cc: "[email protected]" <[email protected]>
> Subject: Re: Knox can't load UI when being proxied
>
> Hello Mohammad,
>
> This looks more like an issue with the proxy host (i.e. EXTERNAL_HOST in
> this case), the reason I think so is because KNOX_HOST seems to work fine
> when accessed directly as per your observation.
>
> I also noticed that you are using https for EXTERNAL_HOST and http for
> KNOX_KNOX, could this be perhaps an issue forwarding https (something like
> https_proxy variable not set correctly) ?
>
> Also do you see any errors in Knox gateway logs ?
> Hope that helps !
>
> Best,
> Sandeep
>
>
>
> On Sun, Oct 30, 2016 at 4:09 PM, Mohammad Islam <[email protected]>
> wrote:
>
>> Hi,
>> I was successfully able to load Namenode UI through Knox (i.e
>> http://<KNOX_HOST>:*8445*/gateway/sandbox/hdfs)
>>
>> However, when I tried to proxy the Knox service from another frontend
>> service due to firewall, it could not load the namenode UI. Looks like the
>> cause was the js and css files could not be download by browser. A typical
>> error message looks like this: "*[Error] Failed to load resource: The
>> request timed out.
>> (https://<EXTERNAL_HOST>:8445/gateway/sandbox/hdfs/static/jquery-1.10.2.min.jsjquery-1.10.2.min.js,*
>> "
>>
>> When further investigation revealed it was the port issue. For example,
>> my KNOX port was 8445 whereas my proxy service was running on host
>> EXTERNAL_HOST with *default* port. I believe the port was 80 and *NOT*
>> 8445. For some reason, Knox was creating the file download path with port
>> 8445 which was knox port not the proxy port.
>> For testing purpose, I tried to manually download the file without any
>> port and it was working fine.
>>
>> Now, I believe it is related to rewrite approach. Also I think it is a
>> Bug. Is this already resolved? If not, any pointer to look to provide a
>> patch?
>>
>> Regards,
>> Mohammad
>>
>>
>>
>>
>>
>>
>

Reply via email to