Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9257

Basic Authentication - Internode Requests Fail With 401

    XMLWordPrintableJSON

    Details

      Description

      I enabled SSL successfully and subsequently also turned on the BasicAuthentication Plugin along with Rule-Based Authentication in SolrCloud mode. This works well when there is no inter-node communication. As soon as I create a collection with 2 shards, I get the following exception for every access of the "/select" request handler.

      {
      "responseHeader":{
      "zkConnected":true,
      "status":401,
      "QTime":181,
      "params":{
      "q":":",
      "indent":"on",
      "wt":"json",
      "_":"1467062257216"}},
      "error":{
      "metadata":[
      "error-class","org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException",
      "root-error-class","org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException"],
      "msg":"Error from server at https://myserver.xxx.corp:8983/solr/mycollection_shard2_replica1: 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 Unauthorized request, Response code: 401</title>\n</head>\n<body><h2>HTTP ERROR 401</h2>\n<p>Problem accessing /solr/mycollection_shard2_replica1/select. Reason:\n<pre> Unauthorized request, Response code: 401</pre></p>\n</body>\n</html>\n",
      "code":401}}

      There are also PKIAuthenticationPlugin exceptions before the exception above:
      Exception trying to get public key from : https://myserver.xxx.corp:8983/solr

      org.noggit.JSONParser$ParseException: JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='html> <head> <meta http-equiv="Content-'
      at org.noggit.JSONParser.err(JSONParser.java:356) [...]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                MartinLoeper Martin Löper
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: