[ 
https://issues.apache.org/jira/browse/KNOX-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15068196#comment-15068196
 ] 

Kevin Minder commented on KNOX-520:
-----------------------------------

[~Alexandre LINTE] < What version of Knox are you using?  Knox 0.6.0 added 
support for X-Forwarded headers (e.g. X-Forwarded-Host=knox-server:443) so if 
they are sent by the load balancer with the correct port that should take care 
of it.  If this doesn't work, Knox 0.6.0 also added support for a 
gateway-site.xml property gateway.frontend.url that allows you to hard code 
what you want the first part of your URLs to be.  You could use 
gateway.frontend.url=https://knox-server/gateway for example.

> WEBHDFS with knox doesn't support PAT for OPEN operation
> --------------------------------------------------------
>
>                 Key: KNOX-520
>                 URL: https://issues.apache.org/jira/browse/KNOX-520
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.5.0
>         Environment: Centos 6
> Hadoop 2.6
>            Reporter: LINTE
>             Fix For: 0.7.0
>
>
> Network topology : 
>                 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/==>
>  knox1 ==\            
> Load balancer 
> =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;==>
>    Namenodes
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\==>
>  knox2 ==/      
> A VIP (dns : knox-server) is supported by the load balancer, listening on 443 
> TCP port (HTTPS).
> knox1 and knox2 listen on 8443 TCP port (HTTPS).
> So the traffic is NATed/PATed from knox-server:443 to knox1:8443 or 
> knox2:8443.
> When doing an open operation on a file with webhdfs API throught knox it 
> fails beacuse of a bad redirection 307.
> First request from the client (authenticated)
>    ==> https://knox-server/gateway/sandbox/webhdfs/v1/tmp/myfile?OP=OPEN
> Response for this request by knox : 
>    ==> Location: 
> https://knox-server:8443/gateway/sandbox/webhdfs/v1/tmp/myfile?_=<my_access_token>
> So the Knox gateway response contains a redirection to the good dns 
> (knox-server) but to the unPATed port (8443) it should be 443.
> Redirection should be like the first request : 
>    ==>  Location : 
> https://knox-server/gateway/sandbox/webhdfs/v1/tmp/myfile?_=<my_access_token>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to