<?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 Unable to connect to Confluent from Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/28998#M20755</link>
    <description>&lt;P&gt;I'm facing the same issue as this post: &lt;A href="https://community.databricks.com/s/question/0D58Y00009DE82zSAD/databricks-kafka-read-not-connecting" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y00009DE82zSAD/databricks-kafka-read-not-connecting&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my case I'm connecting to Confluent Cloud. I'm able to ping the bootstrap server, I'm able to netstat succesfully on the port 9092. But when I try to consume the data using a batch consumer (or stream, that doesn't matter), the log4j server logs get flooded with the message:&lt;/P&gt;
&lt;P&gt;22/10/04 07:39:18 WARN NetworkClient: [Consumer clientId=Databricks, groupId=new_group2] Bootstrap broker pkc-75m1o.europe-west3.gcp.confluent.cloud:9092 (id: -1 rack: null) disconnected&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;userid = "&amp;lt;API Key&amp;gt;"&lt;/P&gt;
&lt;P&gt;password = "&amp;lt;API Secret&amp;gt;"&lt;/P&gt;
&lt;P&gt;host = "pkc-75m1o.europe-west3.gcp.confluent.cloud:9092"&lt;/P&gt;
&lt;P&gt;topic = "topic_0"&lt;/P&gt;
&lt;P&gt;sasl_mech = "PLAIN"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;inputDF = spark \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.read \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.format("kafka") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.bootstrap.servers", host) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("ssl.endpoint.identification.algorithm", "https") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("sasl.mechanism", sasl_mech) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("security.protocol", "SASL_SSL") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username='{}' password='{}';".format(userid, password)) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("subscribe", topic) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.client.id", "Databricks") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.group.id", "new_group2") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("spark.streaming.kafka.maxRatePerPartition", "5")&amp;nbsp;\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("startingOffsets", "earliest") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.session.timeout.ms", "10000") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("retry.backoff.ms", "1000") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("value.deserializer", "ByteArrayDeserializer") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.load()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;display(inputDF)&lt;/P&gt;</description>
    <pubDate>Fri, 21 Mar 2025 14:31:50 GMT</pubDate>
    <dc:creator>Sascha</dc:creator>
    <dc:date>2025-03-21T14:31:50Z</dc:date>
    <item>
      <title>Unable to connect to Confluent from Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/28998#M20755</link>
      <description>&lt;P&gt;I'm facing the same issue as this post: &lt;A href="https://community.databricks.com/s/question/0D58Y00009DE82zSAD/databricks-kafka-read-not-connecting" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y00009DE82zSAD/databricks-kafka-read-not-connecting&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my case I'm connecting to Confluent Cloud. I'm able to ping the bootstrap server, I'm able to netstat succesfully on the port 9092. But when I try to consume the data using a batch consumer (or stream, that doesn't matter), the log4j server logs get flooded with the message:&lt;/P&gt;
&lt;P&gt;22/10/04 07:39:18 WARN NetworkClient: [Consumer clientId=Databricks, groupId=new_group2] Bootstrap broker pkc-75m1o.europe-west3.gcp.confluent.cloud:9092 (id: -1 rack: null) disconnected&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;userid = "&amp;lt;API Key&amp;gt;"&lt;/P&gt;
&lt;P&gt;password = "&amp;lt;API Secret&amp;gt;"&lt;/P&gt;
&lt;P&gt;host = "pkc-75m1o.europe-west3.gcp.confluent.cloud:9092"&lt;/P&gt;
&lt;P&gt;topic = "topic_0"&lt;/P&gt;
&lt;P&gt;sasl_mech = "PLAIN"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;inputDF = spark \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.read \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.format("kafka") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.bootstrap.servers", host) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("ssl.endpoint.identification.algorithm", "https") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("sasl.mechanism", sasl_mech) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("security.protocol", "SASL_SSL") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username='{}' password='{}';".format(userid, password)) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("subscribe", topic) \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.client.id", "Databricks") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.group.id", "new_group2") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("spark.streaming.kafka.maxRatePerPartition", "5")&amp;nbsp;\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("startingOffsets", "earliest") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("kafka.session.timeout.ms", "10000") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("retry.backoff.ms", "1000") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.option("value.deserializer", "ByteArrayDeserializer") \&lt;/P&gt;
&lt;P&gt;&amp;nbsp;.load()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;display(inputDF)&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 14:31:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/28998#M20755</guid>
      <dc:creator>Sascha</dc:creator>
      <dc:date>2025-03-21T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Confluent from Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29000#M20757</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, no I haven't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with the help of Confluent I changed the statement to the below, and somehow this solved it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;inputDF = (spark
  .readStream
  .format("kafka")
  .option("kafka.bootstrap.servers", host)
  .option("kafka.ssl.endpoint.identification.algorithm", "https")
  .option("kafka.sasl.mechanism", "PLAIN")
  .option("kafka.security.protocol", "SASL_SSL")
  .option("kafka.sasl.jaas.config", "kafkashaded.org.apache.kafka.common.security.plain.PlainLoginModule required username='{}' password='{}';".format(userid, password))
  .option("subscribe", topic)
  .option("kafka.client.id", "Databricks")
  .option("kafka.group.id", "new_group2")
  .option("spark.streaming.kafka.maxRatePerPartition", "5")
  .option("startingOffsets", "earliest")
  .option("kafka.session.timeout.ms", "10000")
  .load() )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 08:21:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29000#M20757</guid>
      <dc:creator>Sascha</dc:creator>
      <dc:date>2022-10-07T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Confluent from Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29003#M20760</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​&amp;nbsp;, that was the thread I started my trouble-shooting with, and it's surely helpful!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 10:01:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29003#M20760</guid>
      <dc:creator>Sascha</dc:creator>
      <dc:date>2022-10-15T10:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Confluent from Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29004#M20761</link>
      <description>&lt;P&gt;Yeah ok!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 10:02:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/29004#M20761</guid>
      <dc:creator>Sascha</dc:creator>
      <dc:date>2022-10-15T10:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Confluent from Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/28999#M20756</link>
      <description>&lt;P&gt;Hi @Sascha Zevenhuizen​&amp;nbsp;, have you enabled kerberos security on the settings by any chance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 06:40:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-connect-to-confluent-from-databricks/m-p/28999#M20756</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-10-07T06:40:59Z</dc:date>
    </item>
  </channel>
</rss>

