Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Solr with Kerberos authentication -create collection Error 401

New Contributor

I have secured solr7.4 cloud via kerberos authentication,and zookeeper also open Kerberos.

After  authenticating user info through keytab file " kinit  -kt  /etc/security/keytabs/solr.service.keytab solr/myhost@realm", through curl command to create solr collection and I got the following error:
Curl command: curl –negotiate –u :  ‘http://myhost:8983/solr/admin/collections?action=CREATE&name=col&numShards=1&replicationFactor=1&collection.configName=_default&wt=json’

The error info :






    “myhost:8983_solr”:”org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://myhost:8983/solr:Excepted mime type application/octet-stream but got text/html.



<meta http-equiv=\”Content-Type\” content=\”text/html;charset=utf-8\”/>”

<title> Error 401 Authentication required </title>



<h2>HTTP ERROR 401</h2>

<p> Problem accessing /solr/admin/cores.Reason:

  <pre> Authentication required</pre>






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.

How to solve the problem with Kerberos ZK?


New Contributor

supplement: this is a occasional problem,sometimes create collection successfully,sometimes failed

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.