[
https://issues.apache.org/jira/browse/KNOX-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000189#comment-14000189
]
Kevin Minder edited comment on KNOX-365 at 5/16/14 7:31 PM:
------------------------------------------------------------
>From the logs this is the telling information
{code}
2014-05-16 01:23:58,521 ERROR hadoop.gateway
(UrlRewriteProcessor.java:rewrite(160)) - Failed to rewrite URL:
https://ip-54-40-237-171.huronc.merck.com/gateway/cluster/webhdfs/v1/?op=GETHOMEDIRECTORY,
direction: IN via rule: WEBHDFS/webhdfs/inbound/namenode/root, status: FAILURE
2014-05-16 01:23:58,524 ERROR hadoop.gateway
(AbstractGatewayFilter.java:doFilter(68)) - Failed to execute filter:
java.lang.NullPointerException
{code}
The interesting thing here is the lack of a port component in the authority
portion of the URL. I think there are changes that in master that would cause
this to fail a bit more elegantly (i.e. no NPE) but I'm guessing it will still
fail. For the curious, this is the rule in question.
{code}
<rule dir="IN" name="WEBHDFS/webhdfs/inbound/namenode/root"
pattern="*://*:*/**/webhdfs/{version}/?{**}">
<rewrite template="{$serviceUrl[WEBHDFS]}/{version}/?{**}"/>
</rule>
{code}
It is expecting a port so the pattern matching is failing and then things are
going bad from there. The changes in master handle this a bit more gracefully
but it looks like the URL matching needs to handle ":*" matching no port.
was (Author: kminder):
>From the logs this is the telling information
2014-05-16 01:23:58,521 ERROR hadoop.gateway
(UrlRewriteProcessor.java:rewrite(160)) - Failed to rewrite URL:
https://ip-54-40-237-171.huronc.merck.com/gateway/cluster/webhdfs/v1/?op=GETHOMEDIRECTORY,
direction: IN via rule: WEBHDFS/webhdfs/inbound/namenode/root, status: FAILURE
2014-05-16 01:23:58,524 ERROR hadoop.gateway
(AbstractGatewayFilter.java:doFilter(68)) - Failed to execute filter:
java.lang.NullPointerException
The interesting thing here is the lack of a port component in the authority
portion of the URL. I think there are changes that in master that would cause
this to fail a bit more elegantly (i.e. no NPE) but I'm guessing it will still
fail. For the curious, this is the rule in question.
<rule dir="IN" name="WEBHDFS/webhdfs/inbound/namenode/root"
pattern="*://*:*/**/webhdfs/{version}/?{**}">
<rewrite template="{$serviceUrl[WEBHDFS]}/{version}/?{**}"/>
</rule>
It is expecting a port so the pattern matching is failing and then things are
going bad from there. The changes in master handle this a bit more gracefully
but it looks like the URL matching needs to handle ":*" matching no port.
> 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
> Fix For: 0.5.0
>
> Attachments: logs.zip
>
>
> 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.2#6252)