Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-748

Authentication failure occurred when adding documents to Solr

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: CDH 5.4.2
    • Fix Version/s: None
    • Component/s: Search
    • Labels:
      None
    • Environment:
      CentOs 6.6

      Description

      We have a YARN job running on the CDH cluster. The job adds documents to the index with the following code:

      solrServer = new HttpSolrServer("http://the-selr-host:8983/solr/col-name");
      ...
      solrServer.add(doc, 1000);

      We got "HTTP Status 401 - Authentication required" when this piece of code runs on a data node (detailed error message given below). Our cluster is set up with Kerberos authentication and the user running the job has been authenticated. The job should just run with the user's credentials.

      Detailed error message:
      org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <html><head><title>Apache Tomcat/6.0.43 - Error report</title><style><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      --></style> </head><body><h1>HTTP Status 401 - Authentication required</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Authentication required</u></p><p><b>description</b> <u>This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.43</h3></body></html>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              quan.feng Quan Feng
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: