cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Azure Event Hub throws Timeout Exceptio: Timed out waiting for a node assignment. Call: describeTopi

Ivan_Pyrog
New Contributor

Hello team, 

We are researching the streaming capabilities of our data platform and currently in need of reading data from EVH ( event hub) with our Databricks notebooks. Unfortunately there seems to be an error somewhere due to Timeout Exception: Timed out waiting for a node assignment. Call: describe Topics.

Can you please help us tackle it? 

 

 

KAFKA_OPTIONS = {
  "kafka.bootstrap.servers"  : f"{EH_NAMESPACE}.servicebus.windows.net:9093",
  "subscribe"                : EH_NAME,
  "kafka.sasl.mechanism"     : "PLAIN",
  "kafka.security.protocol"  : "SASL_SSL",
  "kafka.group.id"           : "databricks-streaming-eh-kelvin",
  "kafka.sasl.jaas.config"   : f"kafkashaded.org.apache.kafka.common.security.plain.PlainLoginModule required username=\"$ConnectionString\" password=\"{EH_CONN_STR}\";",
  "kafka.request.timeout.ms" : 60000, # https://learn.microsoft.com/en-us/azure/event-hubs/apache-kafka-configurations#consumer-configurations-only
  "kafka.session.timeout.ms" : 300000,
  "maxOffsetsPerTrigger"     : 4000,
  "failOnDataLoss"           : True,
  "startingOffsets"          : "latest"
}

 

 

 

 

 

df = (spark.readStream
    .format("kafka")
    .options(**KAFKA_OPTIONS)
    .load())

 

 

Generates the proper schema, so some sort of handshake happened between EVH and DBR

However if I try to display my def.:

 

 

display(df)
java.util.concurrent.ExecutionException: kafkashaded.org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics ​<p><strong>Caused by: kafkashaded.org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics</strong></p><p> </p>

 

 

1 REPLY 1

Sidhant07
Databricks Employee
Databricks Employee

Hi @Ivan_Pyrog ,

java.util.concurrent.ExecutionException: kafkashaded.org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics ​<p><strong>Caused by: kafkashaded.org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics</strong></p><p> </p>


Looking at the above error it is seems that the above errors are occuring due to no network connectivity between Databricks and Kafka cluster. Please make sure that telnet or nc commands should be successful before trying to execute any code to Kafka cluster.

for example

 %sh telnet b-2.scram.cxdevorderbrokerstr<>xyz 14002

Also, make sure to enable SSL connections if Kafka cluster requires SSL connection. Please refer below link for SSL connection code snippet:

[+] https://docs.databricks.com/en/structured-streaming/kafka.html

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group