<?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>topic Re: Kafka unable to read client.keystore.jks. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23304#M16058</link>
    <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, Please see the results after using PEM as the keystore type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: kafkashaded.org.apache.kafka.common.errors.InvalidConfigurationException: SSL key store password cannot be specified with PEM format, only key password may be specified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have use the document posted in the chat to get this working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if I use SASL_SSL as protocol I get the below error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: java.lang.IllegalArgumentException: Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The files are present in the dbfs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1231i4FFC6B18A8AF6482/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2022 19:21:21 GMT</pubDate>
    <dc:creator>Jayanth746</dc:creator>
    <dc:date>2022-11-09T19:21:21Z</dc:date>
    <item>
      <title>Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23301#M16055</link>
      <description>&lt;P&gt;Below is the error we have received when trying to read the stream &lt;/P&gt;&lt;P&gt;Caused by: kafkashaded.org.apache.kafka.common.KafkaException: Failed to load SSL keystore /dbfs/FileStore/Certs/client.keystore.jks&lt;/P&gt;&lt;P&gt;Caused by: java.nio.file.NoSuchFileException: /dbfs/FileStore/Certs/client.keyst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When trying to read a stream from Kafka, databricks is unable to find keystore files. &lt;/P&gt;&lt;P&gt;df = spark.readStream \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.format("kafka") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.bootstrap.servers","kafka server with port") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.security.protocol", "SSL") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.truststore.location",'/dbfs/FileStore/Certs/client.truststore.jks' ) \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.keystore.location", '/dbfs/FileStore/Certs/client.keystore.jks') \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.keystore.password", keystore_pass) \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.truststore.password", truststore_pass) \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.keystore.type", "JKS") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("kafka.ssl.truststore.type", "JKS") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("subscribe","sports")&amp;nbsp;&amp;nbsp;&amp;nbsp;\&lt;/P&gt;&lt;P&gt;&amp;nbsp;.option("startingOffsets", "earliest") \&lt;/P&gt;&lt;P&gt;&amp;nbsp;.load()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file exists in the dbfs and also able to read the file. &lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 03:04:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23301#M16055</guid>
      <dc:creator>Jayanth746</dc:creator>
      <dc:date>2022-11-08T03:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23304#M16058</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, Please see the results after using PEM as the keystore type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: kafkashaded.org.apache.kafka.common.errors.InvalidConfigurationException: SSL key store password cannot be specified with PEM format, only key password may be specified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have use the document posted in the chat to get this working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if I use SASL_SSL as protocol I get the below error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: java.lang.IllegalArgumentException: Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The files are present in the dbfs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1231i4FFC6B18A8AF6482/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 19:21:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23304#M16058</guid>
      <dc:creator>Jayanth746</dc:creator>
      <dc:date>2022-11-09T19:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23306#M16060</link>
      <description>&lt;P&gt;Do I need to use JAAS even if I already have certificates for SSL connection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only looking to establish SSL connection and not SASL.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 14:09:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23306#M16060</guid>
      <dc:creator>Jayanth746</dc:creator>
      <dc:date>2022-11-15T14:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23307#M16061</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, This worked after using the absolute path &lt;/P&gt;&lt;P&gt;/dbfs/dbfs/FileStore/Certs/client.truststore.jks instead of just dbfs/FileStore/Certs/client.truststore.jks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I need this to be working for a ADLS gen2 path.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 09:46:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23307#M16061</guid>
      <dc:creator>Jayanth746</dc:creator>
      <dc:date>2022-11-16T09:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23302#M16056</link>
      <description>&lt;P&gt;Hi @Jayanth Goulla​&amp;nbsp;, Does this works: kafka.ssl.keystore.type = PEM ?&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://docs.databricks.com/structured-streaming/kafka.html#use-ssl" alt="https://docs.databricks.com/structured-streaming/kafka.html#use-ssl" target="_blank"&gt;https://docs.databricks.com/structured-streaming/kafka.html#use-ssl&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 07:11:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23302#M16056</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-11-09T07:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23305#M16059</link>
      <description>&lt;P&gt;You’ll have to construct JAAS file and pass with JVM option. Or, you can pass the content of JAAS as Kafka source option, say, dynamic JAAS config.&lt;A href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-85%3A+Dynamic+JAAS+configuration+for+Kafka+clients" alt="https://cwiki.apache.org/confluence/display/KAFKA/KIP-85%3A+Dynamic+JAAS+configuration+for+Kafka+clients" target="_blank"&gt;https://cwiki.apache.org/confluence/display/KAFKA/KIP-85%3A+Dynamic+JAAS+configuration+for+Kafka+clients&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 18:01:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/23305#M16059</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-11-11T18:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45255#M27832</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55295"&gt;@Jayanth746&lt;/a&gt;did you have any luck with this eventually? Hitting the same issue - appears that spark isn't able to read from adls directly, but the docs are vague as to whether it should be possible. Looks like will probably have to copy them to a local path first.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 16:15:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45255#M27832</guid>
      <dc:creator>mwoods</dc:creator>
      <dc:date>2023-09-18T16:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45257#M27834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/89294"&gt;@mwoods&lt;/a&gt;&amp;nbsp;, I was unable to refer to ADLS path directly.&lt;/P&gt;&lt;P&gt;This is what I have done to get this working&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val&lt;/SPAN&gt; &lt;SPAN&gt;keystore_location&lt;/SPAN&gt;&lt;SPAN&gt; = adls_path + &lt;/SPAN&gt;&lt;SPAN&gt;"/"&lt;/SPAN&gt;&lt;SPAN&gt; + operator + &lt;/SPAN&gt;&lt;SPAN&gt;"/certs/client.keystore.jks"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val&lt;/SPAN&gt; &lt;SPAN&gt;dbfs_ks_location&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"dbfs:/FileStore/"&lt;/SPAN&gt;&lt;SPAN&gt;+ operator +&lt;/SPAN&gt;&lt;SPAN&gt;"/Certs/client.keystore.jks"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dbutils.fs.cp(keystore_location,dbfs_ks_location)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.option(&lt;/SPAN&gt;&lt;SPAN&gt;"kafka.ssl.keystore.location"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"/"&lt;/SPAN&gt;&lt;SPAN&gt;+dbfs_ks_location.replace(&lt;/SPAN&gt;&lt;SPAN&gt;":"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 16:32:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45257#M27834</guid>
      <dc:creator>Jayanth746</dc:creator>
      <dc:date>2023-09-18T16:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45682#M27967</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55295"&gt;@Jayanth746&lt;/a&gt;- FYI, as of today, reading the keystore/truststore from abfss paths directly is now working for me, so may be worth a retry on your end.&lt;BR /&gt;&lt;BR /&gt;Not sure whether it was fixed on the DataBricks side, or if it was down to a change of setup on my side. If you find it still doesn't work for you, assuming you have used an external location to access, double-check that the principal/grant mapping in there is correct.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 14:24:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45682#M27967</guid>
      <dc:creator>mwoods</dc:creator>
      <dc:date>2023-09-22T14:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka unable to read client.keystore.jks.</title>
      <link>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45753#M27977</link>
      <description>&lt;P&gt;Ok, scrub that - the problem in my case was that I was using the 14.0 databricks runtime, which appears to have a bug relating to abfss paths here. Switching back to the 13.3 LTS release resolved it for me. So if you're in the same boat finding abfss paths in kafka.ssl.keystore.location and kafka.ssl.truststore.location are failing, try switching back to 13.3 LTS.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 19:13:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/kafka-unable-to-read-client-keystore-jks/m-p/45753#M27977</guid>
      <dc:creator>mwoods</dc:creator>
      <dc:date>2023-09-22T19:13:13Z</dc:date>
    </item>
  </channel>
</rss>

