[
https://issues.apache.org/jira/browse/KNOX-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13778502#comment-13778502
]
Dilli Arumugam commented on KNOX-156:
-------------------------------------
Runing java -jar bin/shell.jar samples/ExampleWebHdfsPutGet.groovy reports 500
error in groovy shell terminal.
However, curl, and groovy dsl show similar results in gateway console.
Please see the snippet below.
Some comments on the snippet.
Hadoop gave Location header http://c6401.ambari.apache.org:1022/.. for redirect.
This gets encrypted and goes to the client.
On way back, on following the redirect, we make call to hadoop at
http://localhost:1022
This results in connection error.
Please remember my cluster is not running in a normal sandbox.
It is a cluster set up by ambari.
One configuration that I would like to draw your attention is in my sandbo.xml
for hostmap:
<role>hostmap</role>
<name>static</name>
<enabled>true</enabled>
<param><name>localhost</name><value>c6401,c6401.ambari.apache.org</value></param>
Do you see a problem with this setting?
Or it is a problem in rewriting/encryption/decryption?
13/09/25 22:52:19 DEBUG http.wire: << "Location:
http://c6401.ambari.apache.org:1022/webhdfs/v1/user/guest/tmp/test/workflow.xml?op=OPEN&delegation=IQAFZ3Vlc3QEa25veARrbm94igFBWNM5uIoBQXzfvbgxHhS0Iu0jZQNA_b5arkHA24XCvbUj9xJXRUJIREZTIGRlbGVnYXRpb24TMTkyLjE2OC42NC4xMDE6ODAyMA&namenoderpcaddress=c6401.ambari.apache.org:8020&offset=0[\r][\n]"
13/09/25 22:52:19 DEBUG http.wire: << "Content-Length: 0[\r][\n]"
13/09/25 22:52:19 DEBUG http.wire: << "Server: Jetty(6.1.26)[\r][\n]"
13/09/25 22:52:19 DEBUG http.wire: << "[\r][\n]"
13/09/25 22:52:19 INFO hadoop.gateway: Dispatch response status: 307
13/09/25 22:52:20 INFO hadoop.gateway: Received request: GET
/webhdfs/data/v1/webhdfs/v1/user/guest/tmp/test/workflow.xml?_=AAAACAAAABAAAADw5RW8-rWPgDB_6V5uckPQ0nk_7WUHiymxrv7lEGhjik8f6e1ttUx0cQcuczjdOp9jjmCEPqPY1JZ5bxQXvdMjvbkrMAb6dLikDrpZSpKGDvTegX2k5AxbqBKYfY-FdqwzdnnZ0mKpo83764ADkc0gw7oO1n3V8k6wCzf_7KedxM-Lip9PSSLPQRrrDS0aGc9JIs3-YFqqkP4ndsENUZauZ6-I08BlstgWsVwOWRW62LzYgKLlXDWHhCezGKY9pBmWNxsd1Q_VUsqJC_ATQ9G-HCka_7-gU9FeFu_tu4Pk2Andll_pDPilzAGYTdcErvuiaFFvPeziifVmWz_sFiceosTGtlVBxMjr
13/09/25 22:52:20 INFO hadoop.gateway: Dispatch request: GET
http://localhost:1022/webhdfs/v1/user/guest/tmp/test/workflow.xml?delegation=IQAFZ3Vlc3QEa25veARrbm94igFBWNM5uIoBQXzfvbgxHhS0Iu0jZQNA_b5arkHA24XCvbUj9xJXRUJIREZTIGRlbGVnYXRpb24TMTkyLjE2OC42NC4xMDE6ODAyMA&op=OPEN&namenoderpcaddress=c6401.ambari.apache.org:8020&doAs=guest&offset=0
13/09/25 22:52:20 WARN hadoop.gateway: Connection exception dispatching
request:
http://localhost:1022/webhdfs/v1/user/guest/tmp/test/workflow.xml?delegation=IQAFZ3Vlc3QEa25veARrbm94igFBWNM5uIoBQXzfvbgxHhS0Iu0jZQNA_b5arkHA24XCvbUj9xJXRUJIREZTIGRlbGVnYXRpb24TMTkyLjE2OC42NC4xMDE6ODAyMA&op=OPEN&namenoderpcaddress=c6401.ambari.apache.org:8020&doAs=guest&offset=0
org.apache.http.conn.HttpHostConnectException: Connection to
http://localhost:1022 refused
org.apache.http.conn.HttpHostConnectException: Connection to
http://localhost:1022 refused
> file upload through Knox broken for a secure cluster
> ----------------------------------------------------
>
> 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
> 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