<?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 Solr with Kerberos authentication -create collection Error 401 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Solr-with-Kerberos-authentication-create-collection-Error/m-p/280873#M209019</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have secured solr7.4 cloud via kerberos authentication,and zookeeper also open Kerberos.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;After&amp;nbsp; authenticating user info through keytab file " kinit&amp;nbsp; -kt&amp;nbsp; /etc/security/keytabs/solr.service.keytab solr/myhost@realm", through curl command to create solr collection and I got the following error:&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;Curl command: curl –negotiate –u : &amp;nbsp;‘http://myhost:8983/solr/admin/collections?action=CREATE&amp;amp;name=col&amp;amp;numShards=1&amp;amp;replicationFactor=1&amp;amp;collection.configName=_default&amp;amp;wt=json’&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The error info :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; “responseHeader”:{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;“status”:0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;“QTime”:31818},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; “failure”:{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; “myhost:8983_solr”:”org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at &lt;A href="http://myhost:8983/solr:Excepted" target="_blank" rel="noopener"&gt;http://myhost:8983/solr:Excepted&lt;/A&gt; mime type application/octet-stream but got text/html.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;html&amp;gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;head&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;meta http-equiv=\”Content-Type\” content=\”text/html;charset=utf-8\”/&amp;gt;”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;title&amp;gt; Error 401 Authentication required &amp;lt;/title&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;h2&amp;gt;HTTP ERROR 401&amp;lt;/h2&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;p&amp;gt; Problem accessing /solr/admin/cores.Reason:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;pre&amp;gt; Authentication required&amp;lt;/pre&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/p&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/html&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I debug the solr source code, found this exception is returned by “coreContainer.getZKController().getOverseerCollectionQueue().offer(Utils.toJson(m), timeout)”,so I doubt maybe the solr don’t authenticate zookeeper info and I use a no-kerberos zookeeper to replace the Kerberos zookeeper, solr collection can be created successfully. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How to solve the problem with Kerberos ZK?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 08:20:33 GMT</pubDate>
    <dc:creator>mr_lee</dc:creator>
    <dc:date>2019-10-21T08:20:33Z</dc:date>
  </channel>
</rss>

