[jira] [Created] (KNOX-463) Knox's Shell cannot run HBase commands without import

2014-10-31 Thread Sumit Gupta (JIRA)
Sumit Gupta created KNOX-463:


 Summary: Knox's Shell cannot run HBase commands without import
 Key: KNOX-463
 URL: https://issues.apache.org/jira/browse/KNOX-463
 Project: Apache Knox
  Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Sumit Gupta
Priority: Minor


After launching the shell the following is needed before running any HBase 
commands.

import org.apache.hadoop.gateway.shell.hbase.HBase;

This should be added to 
gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/Shell.java



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


[jira] [Assigned] (KNOX-365) NPE when using xinetd for port forwarding to Knox

2014-10-31 Thread Kevin Minder (JIRA)

 [ 
https://issues.apache.org/jira/browse/KNOX-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Minder reassigned KNOX-365:
-

Assignee: Kevin Minder

 NPE when using xinetd for port forwarding to Knox
 -

 Key: KNOX-365
 URL: https://issues.apache.org/jira/browse/KNOX-365
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Reporter: Kevin Minder
Assignee: Kevin Minder
 Fix For: 0.5.0

 Attachments: logs.zip, rewrite.xml.diff


 Has anyone had any success using a port forwarder (like xinetd) to forward 
 443 to knox gateway 8443?
 I keep getting this exception: 
 2014-05-13 17:41:13,976 ERROR hadoop.gateway 
 (GatewayServlet.java:service(122)) - Failed to execute filter: 
 javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException: 
 java.security.PrivilegedActionException: javax.servlet.ServletException: 
 java.lang.NullPointerException
 My initial thought is that the knox url rewriting mechanism is expecting the 
 port '8443' to exist?



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


Re: [VOTE] Release Apache Knox 0.5.0

2014-10-31 Thread Sumit Gupta
+1 (non-binding).

I built the branch successfully as well as downloaded the RC, verified 
signatures and installed it. After install I went through testing against 
various services like HDFS, HBase and Hive. I also went through various 
sections of the 0.5.0 user guide successfully. Some of the sections I tested 
out more thoroughly were the Identity Assertion, Authorization, Secure 
Clusters, Web App Security, SSO Provider and Client DSL, amongst others.

All my testing was done with Knox running on a Mac and the services running on 
a Centos 6.4 VM, where the services where installed and managed by Ambari.

Sumit.

On Oct 26, 2014, at 3:48 PM, larry mccay lmc...@apache.org wrote:

 All -
 
 A new candidate for the Apache Knox 0.5.0 release is available at:
 https://dist.apache.org/repos/dist/dev/knox/knox-0.5.0/
 
 The release candidate is a zip archive of the sources in:
 https://git-wip-us.apache.org/repos/asf/knox.git
 Branch v0.5.0 (git checkout -b v0.5.0)
 
 The SHA1 checksum of the archive is
 482051f4ff9a6495bc53c9f2f94616d44e19c724.
 The KEYS file for signature validation is available at:
 https://dist.apache.org/repos/dist/release/knox/KEYS
 
 Please vote on releasing this package as Apache Knox 0.5.0.
 The vote is open for the next 72 hours and passes if a majority of at
 least three +1 Apache Knox PMC votes are cast.
 
 [ ] +1 Release this package as Apache Knox 0.5.0
 [ ] -1 Do not release this package because...
 
 Thanks,
 
 --larry


-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.


[jira] [Updated] (KNOX-464) Location headers have work hostname when used behind load balancer

2014-10-31 Thread Kevin Minder (JIRA)

 [ 
https://issues.apache.org/jira/browse/KNOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Minder updated KNOX-464:
--
Description: 
curl -i -u guest:guest-password -X PUT 
'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'

https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj

To avoid confusion the 'backend' in the URL above is in no way correct but is 
in part caused because nginx is sending that value in the Host header.  That is 
peculiar to nginx and could be fixed with nginx configuration.

The issue here is that Knox used the hostname from the Host header and the 
local port.  I'm not exactly sure what the right answer it but I'm sure mixing 
is bad.  We should either be using the information from the Host header or the 
information from the local endpoint of the socket.  The way Knox was working 
before the fix for KNOX-439 was to use the local endpoint information so I'm 
going to fix this issue making that assumption.  

I used nginx to reproduce the issue.  This is the final configured I used to 
verify the fix.  Note that the 'proxy_redirect' would need to be removed to see 
exactly what Knox is returning and compare to what is shown above.
{code}
worker_processes  1;

events {
worker_connections  1024;
}

http {
include   mime.types;
default_type  application/octet-stream;

sendfileon;

keepalive_timeout  65;

upstream backend {
server c6402.ambari.apache.org:8443;
}

server {
listen   8080;
server_name  localhost;

location / {
proxy_pass  https://backend;
proxy_redirect  https://c6402.ambari.apache.org:8443/ 
http://$host:$server_port/;
}

}

}
{code}

  was:
I used nginx to reproduce the failure.  This is the configured I used.
{code}
worker_processes  1;

events {
worker_connections  1024;
}

http {
include   mime.types;
default_type  application/octet-stream;

sendfileon;

keepalive_timeout  65;

upstream backend {
server c6402.ambari.apache.org:8443;
}

server {
listen   8080;
server_name  localhost;

location / {
proxy_pass  https://backend;
proxy_redirect  https://c6402.ambari.apache.org:8443/ 
http://$host:$server_port/;
}

}

}
{code}


 Location headers have work hostname when used behind load balancer
 --

 Key: KNOX-464
 URL: https://issues.apache.org/jira/browse/KNOX-464
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Affects Versions: 0.5.0
Reporter: Kevin Minder
Assignee: Kevin Minder
Priority: Critical
 Fix For: 0.6.0


 curl -i -u guest:guest-password -X PUT 
 'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
 https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj
 To avoid confusion the 'backend' in the URL above is in no way correct but is 
 in part caused because nginx is sending that value in the Host header.  That 
 is peculiar to nginx and could be fixed with nginx configuration.
 The issue here is that Knox used the hostname from the Host header and the 
 local port.  I'm not exactly sure what the right answer it but I'm sure 
 mixing is bad.  We should either be using the information from the Host 
 header or the information from the local endpoint of the socket.  The way 
 Knox was working before the fix for KNOX-439 was to use the local endpoint 
 information so I'm going to fix this issue making that assumption.  
 I used nginx to reproduce the issue.  This is the final configured I used to 
 verify the fix.  Note that the 'proxy_redirect' would need to be removed to 
 see exactly what Knox is returning and compare to what is shown above.
 {code}
 worker_processes  1;
 events {
 worker_connections  1024;
 }
 http {
 include   mime.types;
 default_type  application/octet-stream;
 sendfileon;
 keepalive_timeout  65;
 upstream backend {
 server c6402.ambari.apache.org:8443;
 }
 server {
 listen   8080;
 server_name  localhost;
 location / {
 proxy_pass  https://backend;
 proxy_redirect  

[jira] [Updated] (KNOX-464) Location headers have wrong hostname when used behind load balancer

2014-10-31 Thread Kevin Minder (JIRA)

 [ 
https://issues.apache.org/jira/browse/KNOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Minder updated KNOX-464:
--
Description: 
When you make a request like this that is routed through a load balancer 
{code}
curl -i -u guest:guest-password -X PUT 
'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
{code}
Knox currently will return something like this
{code}
https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj
{code}
To avoid confusion the 'backend' in the URL above is in no way correct but is 
in part caused because nginx is sending that value in the Host header.  That is 
peculiar to nginx and could be fixed with nginx configuration.

The issue here is that Knox used the hostname from the Host header and the 
local port.  I'm not exactly sure what the right answer it but I'm sure mixing 
is bad.  We should either be using the information from the Host header or the 
information from the local endpoint of the socket.  The way Knox was working 
before the fix for KNOX-439 was to use the local endpoint information so I'm 
going to fix this issue making that assumption.  

I used nginx to reproduce the issue.  This is the final configured I used to 
verify the fix.  Note that the 'proxy_redirect' would need to be removed to see 
exactly what Knox is returning and compare to what is shown above.
{code}
worker_processes  1;

events {
worker_connections  1024;
}

http {
include   mime.types;
default_type  application/octet-stream;

sendfileon;

keepalive_timeout  65;

upstream backend {
server c6402.ambari.apache.org:8443;
}

server {
listen   8080;
server_name  localhost;

location / {
proxy_pass  https://backend;
proxy_redirect  https://c6402.ambari.apache.org:8443/ 
http://$host:$server_port/;
}

}

}
{code}

  was:
curl -i -u guest:guest-password -X PUT 
'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'

https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj

To avoid confusion the 'backend' in the URL above is in no way correct but is 
in part caused because nginx is sending that value in the Host header.  That is 
peculiar to nginx and could be fixed with nginx configuration.

The issue here is that Knox used the hostname from the Host header and the 
local port.  I'm not exactly sure what the right answer it but I'm sure mixing 
is bad.  We should either be using the information from the Host header or the 
information from the local endpoint of the socket.  The way Knox was working 
before the fix for KNOX-439 was to use the local endpoint information so I'm 
going to fix this issue making that assumption.  

I used nginx to reproduce the issue.  This is the final configured I used to 
verify the fix.  Note that the 'proxy_redirect' would need to be removed to see 
exactly what Knox is returning and compare to what is shown above.
{code}
worker_processes  1;

events {
worker_connections  1024;
}

http {
include   mime.types;
default_type  application/octet-stream;

sendfileon;

keepalive_timeout  65;

upstream backend {
server c6402.ambari.apache.org:8443;
}

server {
listen   8080;
server_name  localhost;

location / {
proxy_pass  https://backend;
proxy_redirect  https://c6402.ambari.apache.org:8443/ 
http://$host:$server_port/;
}

}

}
{code}


 Location headers have wrong hostname when used behind load balancer
 ---

 Key: KNOX-464
 URL: https://issues.apache.org/jira/browse/KNOX-464
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Affects Versions: 0.5.0
Reporter: Kevin Minder
Assignee: Kevin Minder
Priority: Critical
 Fix For: 0.6.0


 When you make a request like this that is routed through a load balancer 
 {code}
 curl -i -u guest:guest-password -X PUT 
 'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
 {code}
 Knox currently will return something like this
 {code}
 

[jira] [Updated] (KNOX-464) Location headers have wrong hostname when used behind load balancer

2014-10-31 Thread Kevin Minder (JIRA)

 [ 
https://issues.apache.org/jira/browse/KNOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Minder updated KNOX-464:
--
Summary: Location headers have wrong hostname when used behind load 
balancer  (was: Location headers have work hostname when used behind load 
balancer)

 Location headers have wrong hostname when used behind load balancer
 ---

 Key: KNOX-464
 URL: https://issues.apache.org/jira/browse/KNOX-464
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Affects Versions: 0.5.0
Reporter: Kevin Minder
Assignee: Kevin Minder
Priority: Critical
 Fix For: 0.6.0


 curl -i -u guest:guest-password -X PUT 
 'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
 https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj
 To avoid confusion the 'backend' in the URL above is in no way correct but is 
 in part caused because nginx is sending that value in the Host header.  That 
 is peculiar to nginx and could be fixed with nginx configuration.
 The issue here is that Knox used the hostname from the Host header and the 
 local port.  I'm not exactly sure what the right answer it but I'm sure 
 mixing is bad.  We should either be using the information from the Host 
 header or the information from the local endpoint of the socket.  The way 
 Knox was working before the fix for KNOX-439 was to use the local endpoint 
 information so I'm going to fix this issue making that assumption.  
 I used nginx to reproduce the issue.  This is the final configured I used to 
 verify the fix.  Note that the 'proxy_redirect' would need to be removed to 
 see exactly what Knox is returning and compare to what is shown above.
 {code}
 worker_processes  1;
 events {
 worker_connections  1024;
 }
 http {
 include   mime.types;
 default_type  application/octet-stream;
 sendfileon;
 keepalive_timeout  65;
 upstream backend {
 server c6402.ambari.apache.org:8443;
 }
 server {
 listen   8080;
 server_name  localhost;
 location / {
 proxy_pass  https://backend;
 proxy_redirect  https://c6402.ambari.apache.org:8443/ 
 http://$host:$server_port/;
 }
 }
 }
 {code}



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


[jira] [Resolved] (KNOX-464) Location headers have wrong hostname when used behind load balancer

2014-10-31 Thread Kevin Minder (JIRA)

 [ 
https://issues.apache.org/jira/browse/KNOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Minder resolved KNOX-464.
---
Resolution: Fixed

 Location headers have wrong hostname when used behind load balancer
 ---

 Key: KNOX-464
 URL: https://issues.apache.org/jira/browse/KNOX-464
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Affects Versions: 0.5.0
Reporter: Kevin Minder
Assignee: Kevin Minder
Priority: Critical
 Fix For: 0.6.0

 Attachments: KNOX-464.patch


 When you make a request like this that is routed through a load balancer 
 {code}
 curl -i -u guest:guest-password -X PUT 
 'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
 {code}
 Knox currently will return something like this
 {code}
 https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj
 {code}
 To avoid confusion the 'backend' in the URL above is in no way correct but is 
 in part caused because nginx is sending that value in the Host header.  That 
 is peculiar to nginx and could be fixed with nginx configuration.
 The issue here is that Knox used the hostname from the Host header and the 
 local port.  I'm not exactly sure what the right answer it but I'm sure 
 mixing is bad.  We should either be using the information from the Host 
 header or the information from the local endpoint of the socket.  The way 
 Knox was working before the fix for KNOX-439 was to use the local endpoint 
 information so I'm going to fix this issue making that assumption.  
 I used nginx to reproduce the issue.  This is the final configured I used to 
 verify the fix.  Note that the 'proxy_redirect' would need to be removed to 
 see exactly what Knox is returning and compare to what is shown above.
 {code}
 worker_processes  1;
 events {
 worker_connections  1024;
 }
 http {
 include   mime.types;
 default_type  application/octet-stream;
 sendfileon;
 keepalive_timeout  65;
 upstream backend {
 server c6402.ambari.apache.org:8443;
 }
 server {
 listen   8080;
 server_name  localhost;
 location / {
 proxy_pass  https://backend;
 proxy_redirect  https://c6402.ambari.apache.org:8443/ 
 http://$host:$server_port/;
 }
 }
 }
 {code}



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


[jira] [Commented] (KNOX-464) Location headers have wrong hostname when used behind load balancer

2014-10-31 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KNOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14192085#comment-14192085
 ] 

ASF subversion and git services commented on KNOX-464:
--

Commit f1f4fa2239c2218405e19d65bb12f89ee31305e8 in knox's branch 
refs/heads/master from [~kevin.minder]
[ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=f1f4fa2 ]

KNOX-464: Location headers have wrong hostname when used behind load balancer


 Location headers have wrong hostname when used behind load balancer
 ---

 Key: KNOX-464
 URL: https://issues.apache.org/jira/browse/KNOX-464
 Project: Apache Knox
  Issue Type: Bug
  Components: Server
Affects Versions: 0.5.0
Reporter: Kevin Minder
Assignee: Kevin Minder
Priority: Critical
 Fix For: 0.6.0


 When you make a request like this that is routed through a load balancer 
 {code}
 curl -i -u guest:guest-password -X PUT 
 'http://localhost:8080/gateway/default/webhdfs/v1/tmp/LICENSE?op=CREATE'
 {code}
 Knox currently will return something like this
 {code}
 https://backend:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/LICENSE?_=CBCQccBhGqTbDtfqAt7vzK1H39SnCZo7W14qCIs67ctZAJDXr9fEyJbo1H9AO8prLGdV8Jmz5TO_novslggJwY7E9Vep4eFP0auaxVpfBz4QG-ktSuviEU5aHl8om_SkuGLOwSDjBRZASXrV1huqKU-K_mKkCaPnC0NkCpRQRL0LMkGvB8yrl6_1vNkaoXTxwjm0kp1EhgniovHJVmfcPbjKmmoh-boVy1cj
 {code}
 To avoid confusion the 'backend' in the URL above is in no way correct but is 
 in part caused because nginx is sending that value in the Host header.  That 
 is peculiar to nginx and could be fixed with nginx configuration.
 The issue here is that Knox used the hostname from the Host header and the 
 local port.  I'm not exactly sure what the right answer it but I'm sure 
 mixing is bad.  We should either be using the information from the Host 
 header or the information from the local endpoint of the socket.  The way 
 Knox was working before the fix for KNOX-439 was to use the local endpoint 
 information so I'm going to fix this issue making that assumption.  
 I used nginx to reproduce the issue.  This is the final configured I used to 
 verify the fix.  Note that the 'proxy_redirect' would need to be removed to 
 see exactly what Knox is returning and compare to what is shown above.
 {code}
 worker_processes  1;
 events {
 worker_connections  1024;
 }
 http {
 include   mime.types;
 default_type  application/octet-stream;
 sendfileon;
 keepalive_timeout  65;
 upstream backend {
 server c6402.ambari.apache.org:8443;
 }
 server {
 listen   8080;
 server_name  localhost;
 location / {
 proxy_pass  https://backend;
 proxy_redirect  https://c6402.ambari.apache.org:8443/ 
 http://$host:$server_port/;
 }
 }
 }
 {code}



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