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

Dilli Arumugam commented on KNOX-156:
-------------------------------------

Content that is being added to out box sandbox.xml to clarify the intent and 
use hostmap provider properties

       <provider>
            <!--
              Defines mapping rule for mapping host names in hadoop service 
response to call back host names.
              For example,  a hadoop service running in AWS may carry AWS 
internal host names in the response.
              But,  if we have to make a call back to AWS host, we have to use 
the external host name.

              If the external hostname and internal host names are same,  turn 
of this provider by setting the value of
              enabled parameter as false.

              The name parameter specifies the external hostname.
              The value parameter specifies corresponding internal host names.
              If Knox sees a request coming from client for internal host name, 
              Knox would do the mapping and make downstream call to the 
external host name.

              Wierdly enough when you are using sandbox, external hostname 
happens to be localhost,
              as seen in out of box sandbox.xml. In real clusters, external 
hostnames would almost never be localhost.
            -->
            <role>hostmap</role>
            <name>static</name>
            <enabled>true</enabled>
            
<param><name>localhost</name><value>sandbox,sandbox.hortonworks.com</value></param>
        </provider>

                
> file upload through Knox broken
> -------------------------------
>
>                 Key: KNOX-156
>                 URL: https://issues.apache.org/jira/browse/KNOX-156
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Dilli Arumugam
>            Assignee: Dilli Arumugam
>             Fix For: 0.3.0
>
>
> File upload through Knox is broken for a secure cluster
> Sample Session
> curl -i -k -u guest:guest-password  -X PUT 
> "https://localhost:8443/gateway/sandbox/webhdfs/v1/user/guest/tmp/test/workflow.xml?op=CREATE";
> HTTP/1.1 307 Temporary Redirect
> Set-Cookie: JSESSIONID=1px0mbnrrgkxj1lqeqqbj71xu6;Path=/gateway/sandbox;Secure
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Cache-Control: no-cache
> Expires: Wed, 25 Sep 2013 05:28:46 GMT
> Date: Wed, 25 Sep 2013 05:28:46 GMT
> Pragma: no-cache
> Expires: Wed, 25 Sep 2013 05:28:46 GMT
> Date: Wed, 25 Sep 2013 05:28:46 GMT
> Pragma: no-cache
> Location: 
> https://localhost:8443/gateway/sandbox/webhdfs/data/v1/webhdfs/v1/user/guest/tmp/test/workflow.xml?_=AAAACAAAABAAAAEAD8cp88KIgAIQ3DUPCL3tigmydUJaBzgAfIrem7Q9wHCHAhWoOOIRADAgaItv0bAOe4JOjr8Ao0UvASr5pbRs9XXhHvA7Ta4rf2Wzh6gMewh74dr-3hRimzOi7Mqr56zHEhhEFHeVkwYh336vdTw7anLFYSyJ8utMzWYbJZi0lQmrulbbrYfPwbO_Egd2BOKVpSx_sx8YBQdSsD3zopuIu1IUu2ntpboxUdURMSol5IlB9aLfchSKladdiQPL4DH38rdq_p-9PRfXRr-8tJ13Eaf1ScpF4pAD95dz0vrQnjYmxLYTNEtSD9CcTAGnh7VIFPkTHMiGfe_3R_LenbnQTMO_Mv6lV4qdqWbrTyLLLFtjdH9g3FBQgg
> Server: Jetty(6.1.26)
> Content-Type: application/octet-stream
> Content-Length: 0
> url -i -k -u guest:guest-password  -T workflow.xml -X PUT 
> 'https://localhost:8443/gateway/sandbox/webhdfs/data/v1/webhdfs/v1/user/guest/tmp/test/workflow.xml?_=AAAACAAAABAAAAEAD8cp88KIgAIQ3DUPCL3tigmydUJaBzgAfIrem7Q9wHCHAhWoOOIRADAgaItv0bAOe4JOjr8Ao0UvASr5pbRs9XXhHvA7Ta4rf2Wzh6gMewh74dr-3hRimzOi7Mqr56zHEhhEFHeVkwYh336vdTw7anLFYSyJ8utMzWYbJZi0lQmrulbbrYfPwbO_Egd2BOKVpSx_sx8YBQdSsD3zopuIu1IUu2ntpboxUdURMSol5IlB9aLfchSKladdiQPL4DH38rdq_p-9PRfXRr-8tJ13Eaf1ScpF4pAD95dz0vrQnjYmxLYTNEtSD9CcTAGnh7VIFPkTHMiGfe_3R_LenbnQTMO_Mv6lV4qdqWbrTyLLLFtjdH9g3FBQgg'
> HTTP/1.1 100 Continue
> HTTP/1.1 500 Server Error
> Set-Cookie: JSESSIONID=1lzqff3va0b0m1efex8rnfzg18;Path=/gateway/sandbox;Secure
> Content-Length: 0
> Server: Jetty(8.1.12.v20130726)
> Snippets from gateway console
> 13/09/24 22:24:19 INFO hadoop.gateway: Dispatch request: PUT 
> http://localhost:1022/webhdfs/v1/user/guest/tmp/test/workflow.xml?delegation=IQAFZ3Vlc3QEa25veARrbm94igFBU5I5hYoBQXeevYUMHBRK3h6YIcyS4BSFU85h8YZPEq6XsxJXRUJIREZTIGRlbGVnYXRpb24TMTkyLjE2OC42NC4xMDE6ODAyMA&op=CREATE&namenoderpcaddress=c6401.ambari.apache.org:8020&overwrite=false&doAs=gue
> ...
> 13/09/24 22:24:19 WARN hadoop.gateway: Connection exception dispatching 
> request: 
> http://localhost:1022/webhdfs/v1/user/guest/tmp/test/workflow.xml?delegation=IQAFZ3Vlc3QEa25veARrbm94igFBU5I5hYoBQXeevYUMHBRK3h6YIcyS4BSFU85h8YZPEq6XsxJXRUJIREZTIGRlbGVnYXRpb24TMTkyLjE2OC42NC4xMDE6ODAyMA&op=CREATE&namenoderpcaddress=c6401.ambari.apache.org:8020&overwrite=false&doAs=guest
>  org.apache.http.conn.HttpHostConnectException: Connection to 
> http://localhost:1022 refused

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to