<?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 Can't connect to Livy through Kerberos in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Can-t-connect-to-Livy-through-Kerberos/m-p/226069#M187930</link>
    <description>&lt;P&gt;I'm working with Kerberized HDP 2.6 cluster with Livy2 service, talking to Spark LLAP. &lt;/P&gt;&lt;P&gt;Under any of the host server I'm able to successfully connect to Livy i.e. through curl:&lt;/P&gt;&lt;PRE&gt;curl --negotiate -u : host-with-livy.com:8998/sessions&lt;/PRE&gt;&lt;P&gt;Question: how to connect to livy service from other instances, which are not in the cluster? &lt;/P&gt;&lt;P&gt;For example, I'm trying to connect from a dockerized ubuntu instance, sitting in one of the host machines (so it's able to connect to any of the machines, but can have a different hostname set, i.e. dockerized-instance.host-with-livy.com). What I've tried:&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;installed the kerberos client, copied the krb5.conf file from the server. &lt;/LI&gt;&lt;LI&gt;created krbtgt/...@REALM.COM, HTTP/...@REALM.COM principles in the Kerberos server, created their keytabs &lt;/LI&gt;&lt;LI&gt;kinit is successful, trying to connect to livy through curl does create a second ticket for HTTP/...@REALM when checking through klist.&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;(is this enough, or am I missing some crucial steps?)&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However, connecting to livy draws an error:&lt;/P&gt;&lt;PRE&gt;error 403: org.apache.hadoop.security.authentication.client.AuthenticationException&lt;/PRE&gt;&lt;P&gt;I've noticed in the livy2-conf file that &lt;EM&gt;livy.server.auth.kerberos.&lt;/EM&gt;&lt;EM&gt;principal=HTTP/&lt;STRONG&gt;_HOST&lt;/STRONG&gt;@REALM.COM&lt;/EM&gt; -- if I understand correctly, my guess is that only the _&lt;STRONG&gt;hosts&lt;/STRONG&gt; from the cluster will be able to authenticate? If so, is it possible to specify additional connection settings, allowing connections from external instances, such as the mentioned dockerized instance?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second question:&lt;/STRONG&gt; Am I missing some steps while configuring the kerberos client? Since setting &lt;EM&gt;livy.&lt;/EM&gt;&lt;EM&gt;server.&lt;/EM&gt;&lt;EM&gt;auth.&lt;/EM&gt;&lt;EM&gt;kerberos.&lt;/EM&gt;&lt;EM&gt;principal=HTTP/...@REALM &lt;/EM&gt;to match the hostname of the dockerized instance and replacing the appropriate keytabs in livy.server.auth.kerberos.&lt;EM&gt;keytab &lt;/EM&gt;setting&lt;EM&gt;, &lt;/EM&gt;theconnection still fails, suggesting that I'm doing something wrong.&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 21:01:48 GMT</pubDate>
    <dc:creator>mRabramS</dc:creator>
    <dc:date>2017-06-26T21:01:48Z</dc:date>
  </channel>
</rss>

