<?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 Re: Kerberized Solr Loadbalancer in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65340#M75214</link>
    <description>&lt;P&gt;Solved,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DNS entry was wrong ... solrs.mydomain was a CNAME and not a A Record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 11:30:45 GMT</pubDate>
    <dc:creator>Vinn</dc:creator>
    <dc:date>2018-03-13T11:30:45Z</dc:date>
    <item>
      <title>Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65061#M75208</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to configure a loadbalancer for 3 solr Instances Cloudera CDH 5.10.2 .&lt;/P&gt;&lt;P&gt;my deployment is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;node1.mydomain&lt;/P&gt;&lt;P&gt;node2.mydomain&lt;/P&gt;&lt;P&gt;node3.mydomain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'would like to configure a loadbalancer on an external machine with a FQDN like solr.mydomain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've configured the loadbalancer on clouderamanager and i've generated the missing principal for the load balancer and configured these environment variabiles:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SOLR_AUTHENTICATION_TYPE=kerberos&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SOLR_AUTHENTICATION_KERBEROS_PRINCIPAL=*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i have this principals:&lt;/P&gt;&lt;P&gt;solr/node1.mydomain@MYREALM&lt;/P&gt;&lt;P&gt;solr/node2.mydomain@MYREALM&lt;/P&gt;&lt;P&gt;solr/node3.mydomain@MYREALM&lt;/P&gt;&lt;P&gt;HTTP/&lt;SPAN&gt;node1.mydomain@MYREALM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HTTP/node2.mydomain@MYREALM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HTTP/node3.mydomain@MYREALM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HTTP/solr&lt;/SPAN&gt;&lt;SPAN&gt;.mydomain@MYREALM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything seems to be configured to work but if i try to connect i got authentication error.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've tryed with curl and i got this response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;# curl -i --negotiate -u : &lt;A href="https://solrs.mydomain:8985/solr" target="_blank"&gt;https://solrs.mydomain:8985/solr&lt;/A&gt; --location -k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;403 Frobidden&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If i connect directly to a single instance it works:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;curl -i --negotiate -u : &lt;A href="https://node1.mydomain:8985/solr" target="_blank"&gt;https://node1.mydomain:8985/solr&lt;/A&gt; --location -k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've also verified the principals in the solr.keytab of every node with ktutils:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;slot KVNO Principal&lt;BR /&gt;---- ---- ---------------------------------------------------------------------&lt;BR /&gt;1 1 HTTP/node1.mydomain@MYREALM&lt;BR /&gt;2 1 HTTP/solr.mydomain@MYREALM&lt;BR /&gt;3 1 solr/node1.mydomain@MYREALM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did someone have the same issue, i'm missing something ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you so much in advance for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ivan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:55:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65061#M75208</guid>
      <dc:creator>Vinn</dc:creator>
      <dc:date>2022-09-16T12:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65065#M75209</link>
      <description>&lt;P&gt;I have the same configuration with HAProxy and it works fine.&lt;/P&gt;&lt;P&gt;To be honest, I do not specify any environment variable, just running kinit and the issuing the curl command.&lt;/P&gt;&lt;P&gt;It is probably something with your loadbalancer configuration.&lt;/P&gt;&lt;P&gt;How it is configured.&lt;/P&gt;&lt;P&gt;In the mean time, can you check keytab with "klist -ket solr.keytab" to verify that you have the same encryption type?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:17:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65065#M75209</guid>
      <dc:creator>GeKas</dc:creator>
      <dc:date>2018-03-02T13:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65068#M75210</link>
      <description>&lt;P&gt;Hi GeKas&lt;BR /&gt;Same Encryption type arcfour-hmac (ActiveDirectory):&lt;/P&gt;&lt;P&gt;klist -ket solr.keytab&lt;BR /&gt;Keytab name: FILE:solr.keytab&lt;BR /&gt;KVNO Timestamp Principal&lt;BR /&gt;---- ------------------- ------------------------------------------------------&lt;BR /&gt;1 03/01/2018 16:27:50 HTTP/node1.mydomain@MYREALM&amp;nbsp;(arcfour-hmac)&lt;BR /&gt;1 03/01/2018 16:27:50 HTTP/solrs.&lt;SPAN&gt;mydomain&lt;/SPAN&gt;&lt;SPAN&gt;@MYREALM&lt;/SPAN&gt; (arcfour-hmac)&lt;BR /&gt;1 03/01/2018 16:27:50 solr/node1&lt;SPAN&gt;.mydomain&lt;/SPAN&gt;&lt;SPAN&gt;@MYREALM&lt;/SPAN&gt; (arcfour-hmac)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(to be clear the node names and the realm are fake, they are just a placeholder to mask my real hosts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;BR /&gt;(The environment variable is for solr services)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm using haproxy too.&lt;/P&gt;&lt;P&gt;Do you have a "template" for haproxy configuration maybe i'm missing something?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:53:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65068#M75210</guid>
      <dc:creator>Vinn</dc:creator>
      <dc:date>2018-03-02T13:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65072#M75211</link>
      <description>&lt;P&gt;I believe it is obvious that names are fake &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure this question is appropriate for this forum, but anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following configuration works. SSL from client terminates on HAProxy, while HAProxy to solr server opens a new SSL connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;bind :8985 ssl crt {your certificate, key and any CA here}
mode http
option httpclose
option http-server-close
option forwardfor
server solrserver node1.mydomain:8985 check ssl verify required ca-file {Your CA certificates here}&lt;/PRE&gt;&lt;P&gt;If you still have issues, then the problem is not on HAProxy and you should check your keytabs (typo error, etc).&lt;/P&gt;&lt;P&gt;You can also verigy that keytab contents are ok, by using the commands below:&lt;/P&gt;&lt;PRE&gt;kinit -kt solr.keytab HTTP/node1.mydomain@MYREALM
kinit -kt solr.keytab HTTP/solrs.mydomain@MYREALM
kinit -kt solr.keytab solr/node1.mydomain@MYREALM&lt;/PRE&gt;&lt;P&gt;If any one fails, then you should recreate the keytab.&lt;/P&gt;&lt;P&gt;When creating the keytab with ktutil, this command does not guarantee that the contents of the keytab (encrypted password) are correct. It does not connect to KDC to verify it. It is just encrypting the password you provide (or read from another keytab file). In order to verify it, you should test it with kinit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 16:13:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65072#M75211</guid>
      <dc:creator>GeKas</dc:creator>
      <dc:date>2018-03-02T16:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65080#M75212</link>
      <description>&lt;P&gt;Ty again GeKas,&lt;/P&gt;&lt;P&gt;i've verified haproxy configuration and its like youre example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kinit with all principals in the keytab works without errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again doing a curl on the balancer i've:&lt;/P&gt;&lt;P&gt;GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on server side i've this exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2018-03-02 19:16:05,261 DEBUG org.apache.hadoop.security.authentication.server.AuthenticationFilter: Request [https://solr.mydomain:8985/solr/] triggering authentication
2018-03-02 19:16:05,261 DEBUG org.apache.hadoop.security.authentication.server.AuthenticationFilter: Authentication exception: GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
org.apache.hadoop.security.authentication.client.AuthenticationException: GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.authenticate(KerberosAuthenticationHandler.java:398)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.authenticate(DelegationTokenAuthenticationHandler.java:348)
at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:538)
at org.apache.solr.servlet.SolrHadoopAuthenticationFilter.doFilter(SolrHadoopAuthenticationFilter.java:413)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:612)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
at java.lang.Thread.run(Thread.java:745)
Caused by: GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:856)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:342)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:285)
at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler$2.run(KerberosAuthenticationHandler.java:365)
at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler$2.run(KerberosAuthenticationHandler.java:347)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.authenticate(KerberosAuthenticationHandler.java:347)
... 15 more
Caused by: KrbException: Checksum failed
at sun.security.krb5.internal.crypto.ArcFourHmacEType.decrypt(ArcFourHmacEType.java:102)
at sun.security.krb5.internal.crypto.ArcFourHmacEType.decrypt(ArcFourHmacEType.java:94)
at sun.security.krb5.EncryptedData.decrypt(EncryptedData.java:175)
at sun.security.krb5.KrbApReq.authenticate(KrbApReq.java:281)
at sun.security.krb5.KrbApReq.&amp;lt;init&amp;gt;(KrbApReq.java:149)
at sun.security.jgss.krb5.InitSecContextToken.&amp;lt;init&amp;gt;(InitSecContextToken.java:108)
at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:829)
... 22 more
Caused by: java.security.GeneralSecurityException: Checksum failed
at sun.security.krb5.internal.crypto.dk.ArcFourCrypto.decrypt(ArcFourCrypto.java:408)
at sun.security.krb5.internal.crypto.ArcFourHmac.decrypt(ArcFourHmac.java:91)
at sun.security.krb5.internal.crypto.ArcFourHmacEType.decrypt(ArcFourHmacEType.java:100)
... 28 more&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 18:22:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65080#M75212</guid>
      <dc:creator>Vinn</dc:creator>
      <dc:date>2018-03-02T18:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65081#M75213</link>
      <description>&lt;P&gt;With the error you provided, I woud definitely look again the keytab entries, one by one.&lt;/P&gt;&lt;P&gt;This keytab should reside in SOLR's execution directory. Assuming you are using Cloudera, under "/var/run/cloudera-scm-agent/process/{id}-SOLR...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error, 90% of the times mean that keytab is not correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 20:35:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65081#M75213</guid>
      <dc:creator>GeKas</dc:creator>
      <dc:date>2018-03-02T20:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberized Solr Loadbalancer</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65340#M75214</link>
      <description>&lt;P&gt;Solved,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DNS entry was wrong ... solrs.mydomain was a CNAME and not a A Record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 11:30:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberized-Solr-Loadbalancer/m-p/65340#M75214</guid>
      <dc:creator>Vinn</dc:creator>
      <dc:date>2018-03-13T11:30:45Z</dc:date>
    </item>
  </channel>
</rss>

