<?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: 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/226070#M187931</link>
    <description>&lt;P&gt;HI &lt;A rel="user" href="https://community.cloudera.com/users/19219/saulius1122.html" nodeid="19219"&gt;@Javert Kirilov&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I was facing this issue when trying accessing livy with Python scripts. Please try something like this , if curl is blocking you.&lt;/P&gt;&lt;P&gt;You may need to install python's requests package.&lt;/P&gt;&lt;PRE&gt;import json, pprint, requests, textwrap
from requests_kerberos import HTTPKerberosAuth
host='http://LIVY_HOST:LIVY_PORT'
data = {'kind': 'spark'}
headers = {'Requested-By': 'MY_USER_ID','Content-Type': 'application/json'}
auth=HTTPKerberosAuth()
r0 = requests.post(host + '/sessions', data=json.dumps(data), headers=headers,auth=auth)
r0.json()
&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2017 17:25:47 GMT</pubDate>
    <dc:creator>smartninja723</dc:creator>
    <dc:date>2017-06-27T17:25:47Z</dc:date>
  </channel>
</rss>

