<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to setup knox for Hive LLAP in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211338#M173280</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/17944/nshelke.html" nodeid="17944"&gt;@nshelke&lt;/A&gt;&lt;P&gt;1) Edit the Advanced topology of your KNOX service to add LLAP service&lt;/P&gt;&lt;P&gt;&amp;lt;service&amp;gt;&lt;BR /&gt;&amp;lt;role&amp;gt;LLAP&amp;lt;/role&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;http://&amp;lt;LLAP server host&amp;gt;:&amp;lt;HTTP PORT NUMBER&amp;gt;/{{hive_http_path}}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/service&amp;gt;&lt;BR /&gt;&lt;BR /&gt;2) Go to the below location in your KNOX server machine:-&lt;BR /&gt;/usr/hdp/&amp;lt;HDP VERSION&amp;gt;/knox/data/services&lt;BR /&gt;&lt;BR /&gt;3) Copy the hive directory present in the location and rename it as llap&lt;/P&gt;&lt;P&gt;4) Edit the services.xml and rewrite.xml as below:-&lt;/P&gt;&lt;P&gt;servcies.xml&lt;BR /&gt;------------&lt;BR /&gt;&amp;lt;service role="LLAP" name="llap" version="0.13.0"&amp;gt;&lt;BR /&gt;&amp;lt;routes&amp;gt;&lt;BR /&gt;&amp;lt;route path="/llap"/&amp;gt;&lt;BR /&gt;&amp;lt;/routes&amp;gt;&lt;BR /&gt;&amp;lt;dispatch classname="org.apache.hadoop.gateway.hive.HiveDispatch" ha-classname="org.apache.hadoop.gateway.hive.HiveHaDispatch"/&amp;gt;&lt;BR /&gt;&amp;lt;/service&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;rules&amp;gt;&lt;BR /&gt;&amp;lt;rule dir="IN" name="LLAP/llap/inbound" pattern="*://*:*/**/llap"&amp;gt;&lt;BR /&gt;&amp;lt;rewrite template="{$serviceUrl[LLAP]}"/&amp;gt;&lt;BR /&gt;&amp;lt;/rule&amp;gt;&lt;BR /&gt;&amp;lt;/rules&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Use the http path as 'gateway/default/llap' while connecting to LLAP via KNOX.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2017 10:17:47 GMT</pubDate>
    <dc:creator>ssubhas</dc:creator>
    <dc:date>2017-08-04T10:17:47Z</dc:date>
    <item>
      <title>How to setup knox for Hive LLAP</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211337#M173279</link>
      <description>&lt;P&gt;I have added below block in knox topology&lt;/P&gt;&lt;PRE&gt;&amp;lt;service&amp;gt;
&amp;lt;role&amp;gt;HIVE2&amp;lt;/role&amp;gt;
&amp;lt;url&amp;gt;http://FQDN_LLAP_SERVER:10501/cliservice&amp;lt;/url&amp;gt;
&amp;lt;/service&amp;gt;&lt;/PRE&gt;&lt;P&gt;Also, created the directory in "$KNOX_HOME/data/services/hive2" with service.xml and rewrite.xml files.&lt;/P&gt;&lt;P&gt;Also enabled below properties in Hiveserver2-Interactive-site.xml file,&lt;/P&gt;&lt;PRE&gt;hive.server2.thrift.http.path=cliservice
hive.server2.transport.mode=http&lt;/PRE&gt;&lt;P&gt;service.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;service role="HIVE2" name="hive2" version="0.13.0"&amp;gt;
    &amp;lt;routes&amp;gt;
        &amp;lt;route path="/hive2"/&amp;gt;
    &amp;lt;/routes&amp;gt;
    &amp;lt;dispatch classname="org.apache.hadoop.gateway.hive.HiveDispatch" ha-classname="org.apache.hadoop.gateway.hive.HiveHaDispatch"/&amp;gt;
&amp;lt;/service&amp;gt;
&lt;/PRE&gt;&lt;P&gt;rewrite.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;rules&amp;gt;
    &amp;lt;rule dir="IN" name="HIVE2/hive2/inbound" pattern="*://*:*/**/hive2"&amp;gt;
        &amp;lt;rewrite template="{$serviceUrl[HIVE2]}"/&amp;gt;
    &amp;lt;/rule&amp;gt;
&amp;lt;/rules&amp;gt;
&lt;/PRE&gt;&lt;P&gt;Getting below error in knox while accessing this path from ODBC driver,&lt;/P&gt;&lt;PRE&gt;hadoop.gateway Failed to match path /hive2&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 06:27:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211337#M173279</guid>
      <dc:creator>nshelke</dc:creator>
      <dc:date>2017-08-04T06:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup knox for Hive LLAP</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211338#M173280</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/17944/nshelke.html" nodeid="17944"&gt;@nshelke&lt;/A&gt;&lt;P&gt;1) Edit the Advanced topology of your KNOX service to add LLAP service&lt;/P&gt;&lt;P&gt;&amp;lt;service&amp;gt;&lt;BR /&gt;&amp;lt;role&amp;gt;LLAP&amp;lt;/role&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;http://&amp;lt;LLAP server host&amp;gt;:&amp;lt;HTTP PORT NUMBER&amp;gt;/{{hive_http_path}}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/service&amp;gt;&lt;BR /&gt;&lt;BR /&gt;2) Go to the below location in your KNOX server machine:-&lt;BR /&gt;/usr/hdp/&amp;lt;HDP VERSION&amp;gt;/knox/data/services&lt;BR /&gt;&lt;BR /&gt;3) Copy the hive directory present in the location and rename it as llap&lt;/P&gt;&lt;P&gt;4) Edit the services.xml and rewrite.xml as below:-&lt;/P&gt;&lt;P&gt;servcies.xml&lt;BR /&gt;------------&lt;BR /&gt;&amp;lt;service role="LLAP" name="llap" version="0.13.0"&amp;gt;&lt;BR /&gt;&amp;lt;routes&amp;gt;&lt;BR /&gt;&amp;lt;route path="/llap"/&amp;gt;&lt;BR /&gt;&amp;lt;/routes&amp;gt;&lt;BR /&gt;&amp;lt;dispatch classname="org.apache.hadoop.gateway.hive.HiveDispatch" ha-classname="org.apache.hadoop.gateway.hive.HiveHaDispatch"/&amp;gt;&lt;BR /&gt;&amp;lt;/service&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;rules&amp;gt;&lt;BR /&gt;&amp;lt;rule dir="IN" name="LLAP/llap/inbound" pattern="*://*:*/**/llap"&amp;gt;&lt;BR /&gt;&amp;lt;rewrite template="{$serviceUrl[LLAP]}"/&amp;gt;&lt;BR /&gt;&amp;lt;/rule&amp;gt;&lt;BR /&gt;&amp;lt;/rules&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Use the http path as 'gateway/default/llap' while connecting to LLAP via KNOX.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 10:17:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211338#M173280</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2017-08-04T10:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup knox for Hive LLAP</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211339#M173281</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We use your configuration, but don't work.&lt;/P&gt;&lt;P&gt;We don't use doAS (https://community.hortonworks.com/questions/107790/hive-interactive-and-hiveserver2enabledoas.html).&lt;/P&gt;&lt;P&gt;How would be create a connection string? We use this: &lt;/P&gt;&lt;P&gt;jdbc:hive2://&amp;lt;&amp;lt;host&amp;gt;&amp;gt;:8443/;ssl=true;transportMode=http;httpPath=gateway/default/llap;sslTrustStore=knox.jks;trustStorePassword=xxxxxx&lt;/P&gt;&lt;P&gt;Could you help us and any idea where is the problem?&lt;/P&gt;&lt;P&gt;Log from (/var/log/hive/hiveserver2Interactive.log): &amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;2017-08-04T12:52:18,793 INFO 
[HiveServer2-HttpHandler-Pool: Thread-68]: thrift.ThriftHttpServlet
(ThriftHttpServlet.java:doPost(145)) - Could not validate cookie sent, will try
to generate a new cookie&lt;/P&gt;&lt;P&gt;2017-08-04T12:52:18,825 INFO 
[HiveServer2-HttpHandler-Pool: Thread-68]: thrift.ThriftHttpServlet
(ThriftHttpServlet.java:doKerberosAuth(398)) - Failed to authenticate with
http/_HOST kerberos principal, trying with hive/_HOST kerberos principal&lt;/P&gt;&lt;P&gt;2017-08-04T12:52:18,828 ERROR [HiveServer2-HttpHandler-Pool:
Thread-68]: thrift.ThriftHttpServlet
(ThriftHttpServlet.java:doKerberosAuth(406)) - Failed to authenticate with
hive/_HOST kerberos principal&lt;/P&gt;&lt;P&gt;2017-08-04T12:52:18,829 ERROR [HiveServer2-HttpHandler-Pool:
Thread-68]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(209)) -
Error:&lt;/P&gt;&lt;P&gt;org.apache.hive.service.auth.HttpAuthenticationException:
java.lang.reflect.UndeclaredThrowableException&lt;/P&gt;&lt;P&gt;   at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:407)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:159)
[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
[javax.servlet-3.0.0.v201112011016.jar:?]&lt;/P&gt;&lt;P&gt;  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
[javax.servlet-3.0.0.v201112011016.jar:?]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.Server.handle(Server.java:349) [jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;   at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:925)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:952)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
[jetty-all-7.6.0.v20120127.jar:7.6.0.v20120127]&lt;/P&gt;&lt;P&gt;  at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:1.8.0_101]&lt;/P&gt;&lt;P&gt;  at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_101]&lt;/P&gt;&lt;P&gt;  at
java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]&lt;/P&gt;&lt;P&gt;Caused by: java.lang.reflect.UndeclaredThrowableException&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1884)
~[hadoop-common-2.7.3.2.6.1.0-129.jar:?]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:404)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  ... 23 more&lt;/P&gt;&lt;P&gt;Caused by:
org.apache.hive.service.auth.HttpAuthenticationException: Authorization header
received from the client is empty.&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.getAuthHeader(ThriftHttpServlet.java:548)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.access$100(ThriftHttpServlet.java:74)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction.run(ThriftHttpServlet.java:449)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction.run(ThriftHttpServlet.java:412)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  at
java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_101]&lt;/P&gt;&lt;P&gt;  at
javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_101]&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
~[hadoop-common-2.7.3.2.6.1.0-129.jar:?]&lt;/P&gt;&lt;P&gt;  at
org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:404)
~[hive-service-2.1.0.2.6.1.0-129.jar:2.1.0.2.6.1.0-129]&lt;/P&gt;&lt;P&gt;  ... 23 more&lt;/P&gt;&lt;P&gt;2017-08-04T12:52:18,907 INFO [HiveServer2-HttpHandler-Pool: Thread-68]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(145)) - Could not validate cookie sent, will try to generate a new cookie&lt;BR /&gt;2017-08-04T12:52:18,929 INFO [HiveServer2-HttpHandler-Pool: Thread-68]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(204)) - Cookie added for clientUserName knox&lt;BR /&gt;2017-08-04T12:52:18,950 INFO [HiveServer2-HttpHandler-Pool: Thread-68]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(310)) - Client protocol version: HIVE_CLI_SERVICE_PROTOCOL_V10 &amp;lt;/pre&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 18:27:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211339#M173281</guid>
      <dc:creator>radoslaw_klewin</dc:creator>
      <dc:date>2017-08-04T18:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup knox for Hive LLAP</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211340#M173282</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/6116/radoslawklewin2.html" nodeid="6116"&gt;@Radoslaw Klewin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hive LLAP does not currently support hive.server2.enable.doAs=true, hence the error I suspect.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2017 21:59:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-setup-knox-for-Hive-LLAP/m-p/211340#M173282</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2017-08-06T21:59:29Z</dc:date>
    </item>
  </channel>
</rss>

