Solr enabled kerberos and create collection failed

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr enabled kerberos and create collection failed

Lvyankui
SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
The error is:
{
  "responseHeader":{
    "status":0,
    "QTime":31818},
  "failure":{
    "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
}}

But if I restart Solr several times,it will return to normal probability.
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Re: Solr enabled kerberos and create collection failed

Jörn Franke
You need to obtain / renew your Kerberos ticket using kinit

> Am 19.10.2019 um 12:31 schrieb Lvyankui <[hidden email]>:
>
> SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
> curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
> The error is:
> {
>  "responseHeader":{
>    "status":0,
>    "QTime":31818},
>  "failure":{
>    "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
> }}
>
> But if I restart Solr several times,it will return to normal probability.
> -------------------------------------------------------------------------------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Solr enabled kerberos and create collection failed

Lvyankui
In reply to this post by Lvyankui
SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
The error is:
{
  "responseHeader":{
    "status":0,
    "QTime":31818},
  "failure":{
    "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
}}

But if I restart Solr several times,it will return to normal probability.
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Solr enabled kerberos and create collection failed

Lvyankui
In reply to this post by Lvyankui

SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
The error is:
{
  "responseHeader":{
    "status":0,
    "QTime":31818},
  "failure":{
    "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
}}

But if I restart Solr several times,it will return to normal probability.
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Solr enabled kerberos and create collection failed

Lvyankui
In reply to this post by Lvyankui
SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
The error is:
{
  "responseHeader":{
    "status":0,
    "QTime":31818},
  "failure":{
    "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
}}

But if I restart Solr several times,it will return to normal probability.
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Re: Solr enabled kerberos and create collection failed

Jason Gerlowski
In reply to this post by Lvyankui
Hi,

You posted this same question in a different thread and Jorn Franke
replied to say that you likely need to run "kinit" before invoking
"bin/solr".  That seems like a likely possible explanation to me.
But, since you've given us very little information on how you've setup
Kerberos and what you've tried, it's impossible to say for sure.

How did you set up Kerberos?  What is the java command that Solr is
running with?  Have you tried running "kinit" before bin/solr?  Does
the problem _only_ occur when running "bin/solr", or does a similar
error message occur when making requests through curl or other
clients?

You might want to read this page for other ideas of what information
would help us help you:
https://cwiki.apache.org/confluence/display/solr/UsingMailingLists

Best,

Jason

On Sun, Oct 20, 2019 at 9:23 PM Lvyankui <[hidden email]> wrote:

>
> SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
> curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
> The error is:
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":31818},
>   "failure":{
>     "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
> }}
>
> But if I restart Solr several times,it will return to normal probability.
> -------------------------------------------------------------------------------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Re: Solr enabled kerberos and create collection failed

Jason Gerlowski
In reply to this post by Lvyankui
I _think_ this is the third time you've submitted this exact question
as a different email thread.  Both of your other threads have
responses on them, but maybe you're not seeing that for some reason.

Maybe you won't be able to see this response either, but in case you
can: I think you'll have better luck getting help and getting your
problem solved if you keep the discussion in a single thread, rather
than continually reposting.  Please look back at your other threads.

On Mon, Oct 21, 2019 at 7:51 AM Lvyankui <[hidden email]> wrote:

>
>
> SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
> curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
> The error is:
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":31818},
>   "failure":{
>     "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
> }}
>
> But if I restart Solr several times,it will return to normal probability.
> -------------------------------------------------------------------------------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

Re: Solr enabled kerberos and create collection failed

Jason Gerlowski
In reply to this post by Lvyankui
I _think_ this is the fourth time you've submitted this exact question
as a different email thread.  Most of your other threads have
responses on them, but maybe you're not seeing that for some reason.

Maybe you won't be able to see this response either, but in case you
can: I think you'll have better luck getting help and getting your
problem solved if you keep the discussion in a single thread, rather
than continually reposting.  Please look back at your other threads.

On Mon, Oct 21, 2019 at 9:40 PM Lvyankui <[hidden email]> wrote:

>
> SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection failed with following command
> curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
> The error is:
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":31818},
>   "failure":{
>     "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
> }}
>
> But if I restart Solr several times,it will return to normal probability.
> -------------------------------------------------------------------------------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
Reply | Threaded
Open this post in threaded view
|

答复: Solr enabled kerberos and create collection failed

Lvyankui
In reply to this post by Jason Gerlowski
My kerberos is set as below in solr.in.sh

             SOLR_AUTH_TYPE="kerberos"
             SOLR_AUTHENTICATION_OPTS="-Djava.security.auth.login.config=/etc/solr/conf/solr_server_jaas.conf \
            -DauthenticationPlugin=org.apache.solr.security.KerberosPlugin \
            -Dsolr.kerberos.cookie.domain=node1.h3c.hde.com \
            -Dsolr.kerberos.cookie.portaware=true \
            -Dhost=node1.h3c.hde.com \
            -Dsolr.kerberos.name.rules=DEFAULT \
            -Dsolr.kerberos.principal=HTTP/[hidden email] \
            -Dsolr.kerberos.keytab=/etc/security/keytabs/spnego.service.keytab "
And the jaas file is:

    Client {
      com.sun.security.auth.module.Krb5LoginModule required
      useKeyTab=true
      keyTab="/etc/security/keytabs/solr.service.keytab"
      storeKey=true
      useTicketCache=false
      debug=false
     principal="solr/[hidden email]";
    };
~
And I have run "kinit" before invoking "bin/solr" ,I run solr with 'bin/solr start -c -p 8983' in Ambari. I occur that error when I create a collection with curl and that error doesn't happen every time.


-----邮件原件-----
发件人: Jason Gerlowski [mailto:[hidden email]]
发送时间: 2019年10月22日 20:26
收件人: [hidden email]
主题: Re: Solr enabled kerberos and create collection failed

Hi,

You posted this same question in a different thread and Jorn Franke replied to say that you likely need to run "kinit" before invoking "bin/solr".  That seems like a likely possible explanation to me.
But, since you've given us very little information on how you've setup Kerberos and what you've tried, it's impossible to say for sure.

How did you set up Kerberos?  What is the java command that Solr is running with?  Have you tried running "kinit" before bin/solr?  Does the problem _only_ occur when running "bin/solr", or does a similar error message occur when making requests through curl or other clients?

You might want to read this page for other ideas of what information would help us help you:
https://cwiki.apache.org/confluence/display/solr/UsingMailingLists

Best,

Jason

On Sun, Oct 20, 2019 at 9:23 PM Lvyankui <[hidden email]> wrote:

>
> SolrCloud mode, Solr and Zookeeper enabled kerberos, create collection
> failed with following command curl --negotiate -u : 'http:// noder27:8983/solr/admin/collections?action=CREATE&name=test01&numShards=1&replicationFactor=1&collection.configName=_default&wt=json'
> The error is:
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":31818},
>   "failure":{
>     "noder27.hde.h3c.com:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://noder27.hde.h3c.com:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 401 Authentication required</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre>    Authentication required</pre></p>\n</body>\n</html>\n"
> }}
>
> But if I restart Solr several times,it will return to normal probability.
> ----------------------------------------------------------------------
> ---------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from
> New H3C, which is intended only for the person or entity whose address
> is listed above. Any use of the information contained herein in any
> way (including, but not limited to, total or partial disclosure,
> reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error,
> please notify the sender by phone or email immediately and delete it!