Hi Josh,

Thanks for the reply.

In your example:

`docker pull joshelser/sqlline && docker run -ti joshelser/sqlline
"jdbc:avatica:remote:url=https://cloudapp.azure.com:8443/gateway/sandbox/avatica/;avatica_user=guest;avatica_password=guest-password;authentication=BASIC"`

Are you expecting Knox to authenticate with either LDAP or Kerberos? 

My end goal is to have Power BI use an ODBC driver to connect to Avatica 
through Knox (secured with Kerberos) to retrieve data.

PS. I've been struggling to set up Kerberos with Knox on an HDP server. Any 
advice here would be useful too.

Kind regards,
Ben

Ben Jovanic | Software Engineer
Energy, Utilities & Telco | CGI
2nd floor, Inovo Building 121 George Street, Glasgow, G1 1RD, UK
M: +44 7917 505 645
ben.jova...@cgi.com | cgi-group.co.uk

CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI 
Group Inc. and its affiliates may be contained in this message. If you are not 
a recipient indicated or intended in this message (or responsible for delivery 
of this message to such person), or you think for any reason that this message 
may have been addressed to you in error, you may not use or copy or deliver 
this message to anyone else. In such case, you should destroy this message and 
are asked to notify the sender by reply e-mail.

________________________________________
From: Josh Elser [els...@apache.org]
Sent: 15 February 2017 16:24
To: Jovanic, Ben
Cc: dev@knox.apache.org
Subject: Re: Validating Avatica Support with Knox

Hiya,

Thanks for the ping, Larry. I wasn't subscribed (but am now :wink:)

Ben -- Remember that there is a difference between the JDBC URL and the
HTTP URL. The HTTP URL is how your client knows how to "find" the Knox
gateway service and then how the gateway knows how to forward your
request to the back-end Avatica server. The JDBC URL is used to state
what JDBC Driver class should be used and the client-side options that
driver should use.

Thus, your second example would not be expected to work.

I'm guessing that your first example did work. There isn't presently any
UI component to the Avatica server. It's only meant to be used with a
proper driver to programmatically access the server, e.g. the Avatica
JDBC driver, the phoenix-pythondb driver, or the Golang driver.

The following are two open issues that might help in the future.

https://issues.apache.org/jira/browse/CALCITE-1195
https://issues.apache.org/jira/browse/CALCITE-1405

If you're "docker-comfortable", you can try the following image I have
that launches an instance of sqlline. Beware that Docker's networking
might be finicky.

https://hub.docker.com/r/joshelser/sqlline/

something like..

`docker pull joshelser/sqlline && docker run -ti joshelser/sqlline
"jdbc:avatica:remote:url=https://cloudapp.azure.com:8443/gateway/sandbox/avatica/;avatica_user=guest;avatica_password=guest-password;authentication=BASIC"`

- Josh

Jovanic, Ben wrote:
> Hi Larry,
>
> I'm using the 0.11.0 release.
>
> Kind regards,
> Ben
>
> Ben Jovanic | Software Engineer
> Energy, Utilities&  Telco | CGI
> 2nd floor, Inovo Building 121 George Street, Glasgow, G1 1RD, UK
> M: +44 7917 505 645
> ben.jova...@cgi.com | cgi-group.co.uk
>
> CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI 
> Group Inc. and its affiliates may be contained in this message. If you are 
> not a recipient indicated or intended in this message (or responsible for 
> delivery of this message to such person), or you think for any reason that 
> this message may have been addressed to you in error, you may not use or copy 
> or deliver this message to anyone else. In such case, you should destroy this 
> message and are asked to notify the sender by reply e-mail.
>
> ________________________________________
> From: larry mccay [lmc...@apache.org]
> Sent: 15 February 2017 15:03
> To: dev@knox.apache.org; Josh Elser
> Subject: Re: Validating Avatica Support with Knox
>
> Hi Ben -
>
> Thanks for reporting this difficulty - I will need to review the docs and
> instructions and get back to you.
> I am copying Josh on this thread just in case he isn't subscribed - he
> contributed the service definition for avatica.
>
> Just to make sure... you have a build from master or 0.11.0 release
> deployed in azure that you are trying - right?
>
> thanks,
>
> --larry
>
>
>
> On Wed, Feb 15, 2017 at 9:54 AM, Jovanic, Ben<ben.jova...@cgi.com>  wrote:
>
>> Hi,
>>
>> I work for CGI and have been looking at Knox recently for a project. I've
>> been working with John McParland who has contributed to Knox with Solr
>> support.
>>
>> I'm currently trying to get Knox and Avatica working together. I've
>> followed the instructions on this JIRA ticket (https://issues.apache.org/
>> jira/browse/KNOX-844) but I've encountered an error.
>>
>> When doing the following:
>>
>> ```
>> $ curl -k -u guest:guest-password -X GET "https://cloudapp.azure.com:
>> 8443/gateway/sandbox/avatica/"
>> <HTML>
>> <HEAD>
>> <TITLE>Error 404 - Not Found</TITLE>
>> <BODY>
>> <H2>Error 404 - Not Found.</H2>
>> No context on this server matched or handled this request.<BR>Contexts
>> known to this server are:<ul></ul><hr><a href="http://eclipse.org/jetty";><img
>> border= 0  src="/favicon.ico"/></a>&nbsp;<a 
>> href="http://eclipse.org/jetty";>Powered
>> by Jetty:// Java Web Server</a><hr/>
>>
>> </BODY>
>> </HTML>
>> ```
>>
>> The 404 makes sense since navigating to http://cloudapp.azure.com:8765/
>> shows the same 404 message.
>>
>> And looking in the Knox gateway.log file we see Knox has authenticated
>> fine:
>>
>> ```
>> 2017-02-15 11:20:02,681 INFO  hadoop.gateway 
>> (KnoxLdapRealm.java:getUserDn(691))
>> - Computed userDn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org using
>> dnTemplate for principal: guest
>> ```
>>
>> However, when using the Avatica parameters with those semicolons it falls
>> over:
>>
>> ```
>> $ curl -k -u guest:guest-password -X GET "https://cloudapp.azure.com:
>> 8443/gateway/sandbox/avatica/;avatica_user=guest;avatica_
>> password=guest-password;authentication=BASIC"
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>> <title>Error 500 Server Error</title>
>> </head>
>> <body><h2>HTTP ERROR 500</h2>
>> <p>Problem accessing /gateway/sandbox/avatica/;avatica_user=guest;avatica_
>> password=guest-password;authentication=BASIC. Reason:
>> <pre>     Server Error</pre></p><hr><i><small>Powered by
>> Jetty://</small></i><hr/>
>>
>> </body>
>> </html>
>> ```
>>
>> And the gateway.log now:
>>
>> ```
>> 2017-02-15 11:32:32,281 INFO  hadoop.gateway 
>> (KnoxLdapRealm.java:getUserDn(691))
>> - Computed userDn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org using
>> dnTemplate for principal: guest
>> 2017-02-15 11:32:32,291 ERROR hadoop.gateway 
>> (UrlRewriteProcessor.java:rewrite(169))
>> - Failed to rewrite URL: https://cloudapp.azure.com:
>> 8443/gateway/sandbox/avatica/;avatica_user=username;avatica_
>> password=password;authentication=BASIC, direction: IN via rule:
>> AVATICA/avatica/inbound/root, status: FAILURE
>> 2017-02-15 11:32:32,292 ERROR hadoop.gateway 
>> (UrlRewriteProcessor.java:rewrite(169))
>> - Failed to rewrite URL: https://cloudapp.azure.com:
>> 8443/gateway/sandbox/avatica/;avatica_user=username;avatica_
>> password=password;authentication=BASIC, direction: IN via rule:
>> AVATICA/avatica/inbound/root, status: FAILURE
>> 2017-02-15 11:32:32,311 WARN  hadoop.gateway 
>> (DefaultDispatch.java:executeOutboundRequest(146))
>> - Connection exception dispatching request:  org.apache.http.client.
>> ClientProtocolException
>> org.apache.http.client.ClientProtocolException
>>      at org.apache.http.impl.client.InternalHttpClient.doExecute(
>> InternalHttpClient.java:186)
>>      at org.apache.http.impl.client.CloseableHttpClient.execute(
>> CloseableHttpClient.java:82)
>>      at org.apache.http.impl.client.CloseableHttpClient.execute(
>> CloseableHttpClient.java:107)
>>      at org.apache.http.impl.client.CloseableHttpClient.execute(
>> CloseableHttpClient.java:55)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> executeOutboundRequest(DefaultDispatch.java:129)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.executeRequest(
>> DefaultDispatch.java:115)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> doGet(DefaultDispatch.java:277)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter$
>> GetAdapter.doMethod(GatewayDispatchFilter.java:123)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter.doFilter(
>> GatewayDispatchFilter.java:106)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.rewrite.api.
>> UrlRewriteServletFilter.doFilter(UrlRewriteServletFilter.java:60)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:91)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:88)
>>      at java.security.AccessController.doPrivileged(Native Method)
>>      at javax.security.auth.Subject.doAs(Subject.java:415)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:138)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:75)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter.
>> doFilter(ShiroSubjectIdentityAdapter.java:72)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:61)
>>      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
>> AdviceFilter.java:108)
>>      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
>> AdviceFilter.java:137)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:66)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(
>> AbstractShiroFilter.java:449)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(
>> AbstractShiroFilter.java:365)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
>> AbstractShiroFilter.java:362)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ResponseCookieFilter.
>> doFilter(ResponseCookieFilter.java:50)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.XForwardedHeaderFilter.doFilter(
>> XForwardedHeaderFilter.java:30)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:139)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:91)
>>      at org.apache.hadoop.gateway.services.metrics.impl.instr.
>> InstrumentedGatewayFilter.doFilter(InstrumentedGatewayFilter.java:70)
>>      at org.apache.hadoop.gateway.GatewayServlet.service(
>> GatewayServlet.java:141)
>>      at org.eclipse.jetty.servlet.ServletHolder.handle(
>> ServletHolder.java:812)
>>      at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> ServletHandler.java:587)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:143)
>>      at org.eclipse.jetty.security.SecurityHandler.handle(
>> SecurityHandler.java:577)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doHandle(SessionHandler.java:223)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doHandle(ContextHandler.java:1127)
>>      at org.eclipse.jetty.servlet.ServletHandler.doScope(
>> ServletHandler.java:515)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doScope(SessionHandler.java:185)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doScope(ContextHandler.java:1061)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:141)
>>      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
>> ContextHandlerCollection.java:215)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.trace.TraceHandler.handle(
>> TraceHandler.java:51)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.filter.CorrelationHandler.
>> handle(CorrelationHandler.java:39)
>>      at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(
>> GzipHandler.java:529)
>>      at org.eclipse.jetty.server.handler.HandlerCollection.
>> handle(HandlerCollection.java:110)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>      at org.eclipse.jetty.server.HttpConnection.onFillable(
>> HttpConnection.java:257)
>>      at org.eclipse.jetty.io.AbstractConnection$2.run(
>> AbstractConnection.java:544)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>> QueuedThreadPool.java:635)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
>> QueuedThreadPool.java:555)
>>      at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.http.ProtocolException: Target host is not specified
>>      at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(
>> DefaultRoutePlanner.java:70)
>>      at org.apache.http.impl.client.InternalHttpClient.determineRoute(
>> InternalHttpClient.java:124)
>>      at org.apache.http.impl.client.InternalHttpClient.doExecute(
>> InternalHttpClient.java:183)
>>      ... 78 more
>> 2017-02-15 11:32:32,312 ERROR hadoop.gateway 
>> (AbstractGatewayFilter.java:doFilter(63))
>> - Failed to execute filter: java.io.IOException: Service connectivity error.
>> 2017-02-15 11:32:32,313 ERROR hadoop.gateway 
>> (AbstractGatewayFilter.java:doFilter(63))
>> - Failed to execute filter: java.io.IOException: Service connectivity error.
>> 2017-02-15 11:32:32,320 ERROR hadoop.gateway 
>> (AbstractGatewayFilter.java:doFilter(66))
>> - Failed to execute filter: javax.servlet.ServletException:
>> org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>> 2017-02-15 11:32:32,322 ERROR hadoop.gateway 
>> (AbstractGatewayFilter.java:doFilter(66))
>> - Failed to execute filter: javax.servlet.ServletException:
>> org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>> 2017-02-15 11:32:32,322 ERROR hadoop.gateway 
>> (GatewayFilter.java:doFilter(145))
>> - Gateway processing failed: javax.servlet.ServletException:
>> org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>> javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException:
>> java.security.PrivilegedActionException: java.io.IOException: Service
>> connectivity error.
>>      at org.apache.shiro.web.servlet.AdviceFilter.cleanup(
>> AdviceFilter.java:196)
>>      at org.apache.shiro.web.filter.authc.AuthenticatingFilter.
>> cleanup(AuthenticatingFilter.java:155)
>>      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
>> AdviceFilter.java:148)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:66)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(
>> AbstractShiroFilter.java:449)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(
>> AbstractShiroFilter.java:365)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
>> AbstractShiroFilter.java:362)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ResponseCookieFilter.
>> doFilter(ResponseCookieFilter.java:50)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.XForwardedHeaderFilter.doFilter(
>> XForwardedHeaderFilter.java:30)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:139)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:91)
>>      at org.apache.hadoop.gateway.services.metrics.impl.instr.
>> InstrumentedGatewayFilter.doFilter(InstrumentedGatewayFilter.java:70)
>>      at org.apache.hadoop.gateway.GatewayServlet.service(
>> GatewayServlet.java:141)
>>      at org.eclipse.jetty.servlet.ServletHolder.handle(
>> ServletHolder.java:812)
>>      at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> ServletHandler.java:587)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:143)
>>      at org.eclipse.jetty.security.SecurityHandler.handle(
>> SecurityHandler.java:577)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doHandle(SessionHandler.java:223)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doHandle(ContextHandler.java:1127)
>>      at org.eclipse.jetty.servlet.ServletHandler.doScope(
>> ServletHandler.java:515)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doScope(SessionHandler.java:185)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doScope(ContextHandler.java:1061)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:141)
>>      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
>> ContextHandlerCollection.java:215)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.trace.TraceHandler.handle(
>> TraceHandler.java:51)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.filter.CorrelationHandler.
>> handle(CorrelationHandler.java:39)
>>      at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(
>> GzipHandler.java:529)
>>      at org.eclipse.jetty.server.handler.HandlerCollection.
>> handle(HandlerCollection.java:110)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>      at org.eclipse.jetty.server.HttpConnection.onFillable(
>> HttpConnection.java:257)
>>      at org.eclipse.jetty.io.AbstractConnection$2.run(
>> AbstractConnection.java:544)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>> QueuedThreadPool.java:635)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
>> QueuedThreadPool.java:555)
>>      at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:385)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter.
>> doFilter(ShiroSubjectIdentityAdapter.java:72)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:61)
>>      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
>> AdviceFilter.java:108)
>>      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
>> AdviceFilter.java:137)
>>      ... 48 more
>> Caused by: java.security.PrivilegedActionException: java.io.IOException:
>> Service connectivity error.
>>      at java.security.AccessController.doPrivileged(Native Method)
>>      at javax.security.auth.Subject.doAs(Subject.java:415)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:138)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:75)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      ... 54 more
>> Caused by: java.io.IOException: Service connectivity error.
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> executeOutboundRequest(DefaultDispatch.java:147)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.executeRequest(
>> DefaultDispatch.java:115)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> doGet(DefaultDispatch.java:277)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter$
>> GetAdapter.doMethod(GatewayDispatchFilter.java:123)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter.doFilter(
>> GatewayDispatchFilter.java:106)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.rewrite.api.
>> UrlRewriteServletFilter.doFilter(UrlRewriteServletFilter.java:60)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:91)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:88)
>>      ... 61 more
>> 2017-02-15 11:32:32,339 ERROR hadoop.gateway 
>> (GatewayServlet.java:service(146))
>> - Gateway processing failed: javax.servlet.ServletException:
>> org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>> javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException:
>> java.security.PrivilegedActionException: java.io.IOException: Service
>> connectivity error.
>>      at org.apache.shiro.web.servlet.AdviceFilter.cleanup(
>> AdviceFilter.java:196)
>>      at org.apache.shiro.web.filter.authc.AuthenticatingFilter.
>> cleanup(AuthenticatingFilter.java:155)
>>      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
>> AdviceFilter.java:148)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:66)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(
>> AbstractShiroFilter.java:449)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(
>> AbstractShiroFilter.java:365)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
>> AbstractShiroFilter.java:362)
>>      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
>> OncePerRequestFilter.java:125)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ResponseCookieFilter.
>> doFilter(ResponseCookieFilter.java:50)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.XForwardedHeaderFilter.doFilter(
>> XForwardedHeaderFilter.java:30)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:139)
>>      at org.apache.hadoop.gateway.GatewayFilter.doFilter(
>> GatewayFilter.java:91)
>>      at org.apache.hadoop.gateway.services.metrics.impl.instr.
>> InstrumentedGatewayFilter.doFilter(InstrumentedGatewayFilter.java:70)
>>      at org.apache.hadoop.gateway.GatewayServlet.service(
>> GatewayServlet.java:141)
>>      at org.eclipse.jetty.servlet.ServletHolder.handle(
>> ServletHolder.java:812)
>>      at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> ServletHandler.java:587)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:143)
>>      at org.eclipse.jetty.security.SecurityHandler.handle(
>> SecurityHandler.java:577)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doHandle(SessionHandler.java:223)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doHandle(ContextHandler.java:1127)
>>      at org.eclipse.jetty.servlet.ServletHandler.doScope(
>> ServletHandler.java:515)
>>      at org.eclipse.jetty.server.session.SessionHandler.
>> doScope(SessionHandler.java:185)
>>      at org.eclipse.jetty.server.handler.ContextHandler.
>> doScope(ContextHandler.java:1061)
>>      at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:141)
>>      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
>> ContextHandlerCollection.java:215)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.trace.TraceHandler.handle(
>> TraceHandler.java:51)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.apache.hadoop.gateway.filter.CorrelationHandler.
>> handle(CorrelationHandler.java:39)
>>      at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(
>> GzipHandler.java:529)
>>      at org.eclipse.jetty.server.handler.HandlerCollection.
>> handle(HandlerCollection.java:110)
>>      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>      at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>      at org.eclipse.jetty.server.HttpConnection.onFillable(
>> HttpConnection.java:257)
>>      at org.eclipse.jetty.io.AbstractConnection$2.run(
>> AbstractConnection.java:544)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>> QueuedThreadPool.java:635)
>>      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
>> QueuedThreadPool.java:555)
>>      at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.shiro.subject.ExecutionException: 
>> java.security.PrivilegedActionException:
>> java.io.IOException: Service connectivity error.
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:385)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter.
>> doFilter(ShiroSubjectIdentityAdapter.java:72)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
>> ProxiedFilterChain.java:61)
>>      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
>> AdviceFilter.java:108)
>>      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
>> AdviceFilter.java:137)
>>      ... 48 more
>> Caused by: java.security.PrivilegedActionException: java.io.IOException:
>> Service connectivity error.
>>      at java.security.AccessController.doPrivileged(Native Method)
>>      at javax.security.auth.Subject.doAs(Subject.java:415)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:138)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain.call(ShiroSubjectIdentityAdapter.java:75)
>>      at org.apache.shiro.subject.support.SubjectCallable.
>> doCall(SubjectCallable.java:90)
>>      at org.apache.shiro.subject.support.SubjectCallable.call(
>> SubjectCallable.java:83)
>>      at org.apache.shiro.subject.support.DelegatingSubject.
>> execute(DelegatingSubject.java:383)
>>      ... 54 more
>> Caused by: java.io.IOException: Service connectivity error.
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> executeOutboundRequest(DefaultDispatch.java:147)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.executeRequest(
>> DefaultDispatch.java:115)
>>      at org.apache.hadoop.gateway.dispatch.DefaultDispatch.
>> doGet(DefaultDispatch.java:277)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter$
>> GetAdapter.doMethod(GatewayDispatchFilter.java:123)
>>      at org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter.doFilter(
>> GatewayDispatchFilter.java:106)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.rewrite.api.
>> UrlRewriteServletFilter.doFilter(UrlRewriteServletFilter.java:60)
>>      at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(
>> AbstractGatewayFilter.java:61)
>>      at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(
>> GatewayFilter.java:332)
>>      at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(
>> GatewayFilter.java:232)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:91)
>>      at org.apache.hadoop.gateway.filter.ShiroSubjectIdentityAdapter$
>> CallableChain$1.run(ShiroSubjectIdentityAdapter.java:88)
>>      ... 61 more
>> ```
>>
>> I believe the important part is:
>>
>> ```
>> 2017-02-15 11:40:18,461 ERROR hadoop.gateway 
>> (UrlRewriteProcessor.java:rewrite(169))
>> - Failed to rewrite URL: https://hdp24sandbox-v2.
>> ukwest.cloudapp.azure.com:8443/gateway/sandbox/avatica;
>> avatica_user=username;avatica_password=password;authentication=BASIC,
>> direction: IN via rule: AVATICA/avatica/inbound/root, status: FAILURE
>> ```
>>
>> Which reveals that the URL is not matching the route properly.
>>
>> I've modified the rewrite.xml file for Avatica in several different ways
>> but I cannot get Knox to accept semicolons in the URL.
>> Any help would be appreciated.
>>
>> Kind regards,
>> Ben Jovanic
>>

Reply via email to