getting Timeout expired while fetching topic metadata

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

getting Timeout expired while fetching topic metadata

avilevi
Hi all,
very new to flink so my apology if it seems trivial.
We deployed flink on gcloud 
I am trying to connect to kafka but keep getting this error: 
org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
this how my properties look like 
val consumerProperties: Properties = {
    val p = new Properties()
    p.setProperty("bootstrap.servers", kafkaBootStrapServers)
    p.setProperty("group.id", groupId)
    p.setProperty("client.id", s"queue-consumer-${randomUUID().toString}")
    p.setProperty("ssl.keystore.location","/usr/path_to/kafka_ssl_client.keystore.jks"))
    p.setProperty("ssl.keystore.password",  "some password")
    p.setProperty("ssl.truststore.location", "/usr/path_to/kafka_ssl_client.keystore.jks")
    p.setProperty("ssl.truststore.password", "some password")
    p
  }

please advise 

Thanks
Avi
Reply | Threaded
Open this post in threaded view
|

Re: getting Timeout expired while fetching topic metadata

miki haiat
Hi Avi,
Can you try to add this properties 

 props.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL");
Thanks,
Miki

On Mon, Dec 24, 2018 at 8:19 PM Avi Levi <[hidden email]> wrote:
Hi all,
very new to flink so my apology if it seems trivial.
We deployed flink on gcloud 
I am trying to connect to kafka but keep getting this error: 
org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
this how my properties look like 
val consumerProperties: Properties = {
    val p = new Properties()
    p.setProperty("bootstrap.servers", kafkaBootStrapServers)
    p.setProperty("group.id", groupId)
    p.setProperty("client.id", s"queue-consumer-${randomUUID().toString}")
    p.setProperty("ssl.keystore.location","/usr/path_to/kafka_ssl_client.keystore.jks"))
    p.setProperty("ssl.keystore.password",  "some password")
    p.setProperty("ssl.truststore.location", "/usr/path_to/kafka_ssl_client.keystore.jks")
    p.setProperty("ssl.truststore.password", "some password")
    p
  }

please advise 

Thanks
Avi
Reply | Threaded
Open this post in threaded view
|

Re: getting Timeout expired while fetching topic metadata

avilevi
Thanks Miki, 
we had a bug in the certs. however the property you suggested gave as better logs so it really cleared things. THANKS !!!

On Mon, Dec 24, 2018 at 8:45 PM miki haiat <[hidden email]> wrote:
Hi Avi,
Can you try to add this properties 

 props.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL");
Thanks,
Miki

On Mon, Dec 24, 2018 at 8:19 PM Avi Levi <[hidden email]> wrote:
Hi all,
very new to flink so my apology if it seems trivial.
We deployed flink on gcloud 
I am trying to connect to kafka but keep getting this error: 
org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
this how my properties look like 
val consumerProperties: Properties = {
    val p = new Properties()
    p.setProperty("bootstrap.servers", kafkaBootStrapServers)
    p.setProperty("group.id", groupId)
    p.setProperty("client.id", s"queue-consumer-${randomUUID().toString}")
    p.setProperty("ssl.keystore.location","/usr/path_to/kafka_ssl_client.keystore.jks"))
    p.setProperty("ssl.keystore.password",  "some password")
    p.setProperty("ssl.truststore.location", "/usr/path_to/kafka_ssl_client.keystore.jks")
    p.setProperty("ssl.truststore.password", "some password")
    p
  }

please advise 

Thanks
Avi