Caused by: org.apache.kafka.common.errors.TimeoutE...
# troubleshooting
a
Caused by: org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata can you please help me to fix this error, i tried all possible combinations I am able to able to read topic metadata, produce message and consume message from c# code. Pinot docker image: [apachepinot/pinot:latest] Kafka image: confluentinc/cp-kafka:5.5.0 C# Code that worked :
Copy code
var config1 = new ConsumerConfig
              {
                  BootstrapServers = "localhost:29092",
                  GroupId = "metadata-fetcher-group",
                  AutoOffsetReset = AutoOffsetReset.Earliest,
                  EnableAutoCommit = false
              };
              
              using (var adminClient = new AdminClientBuilder(config).Build())
              {
                  try
                  {
                      // Fetch metadata for all topics
                      var metadata = adminClient.GetMetadata(TimeSpan.FromSeconds(30));
              
              
                      foreach (var topic in metadata.Topics)
                      {
                          Console.WriteLine($"Topic: {topic.Topic}");
                          Console.WriteLine($"Partition Count: {topic.Partitions.Count}");
                          foreach (var partition in topic.Partitions)
                          {
                              Console.WriteLine($"Partition: {partition.PartitionId}, Leader: {partition.Leader}, Replicas: {string.Join(",", partition.Replicas)}, ISR: {string.Join(",", partition.InSyncReplicas)}");
                          }
                      }
                  }
                  catch (KafkaException e)
                  {
                      Console.WriteLine($"An error occurred: {e.Error.Reason}");
                  }
              }
Table Json file { "tableName": "SamirTest_REALTIME", "tableType": "REALTIME", "segmentsConfig": { "timeColumnName": "SamirTestTime", "schemaName": "SamirTest", "replication": "1" }, "tenants": { "broker": "DefaultTenant", "server": "DefaultTenant" }, "metadata": {}, "tableIndexConfig": { "loadMode": "MMAP", "streamConfigs": { "streamType": "kafka", "stream.kafka.consumer.type": "simple", "stream.kafka.topic.name": "samirtestNew", "stream.kafka.broker.list": "localhost:29092", "stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder", "stream.kafka.consumer.prop.auto.offset.reset": "smallest", "stream.kafka.consumer.prop.fetch.metadata.timeout.ms": "120000", "stream.kafka.consumer.prop.session.timeout.ms": "60000", "stream.kafka.consumer.prop.request.timeout.ms": "120000", "realtime.segment.flush.threshold.rows": "50000", "realtime.segment.flush.threshold.time": "24h" } } }
x
is pinot and kafka running in the same container ?
I think the Pinot docker container has no access to kafka container like your localhost. Docker is not like your local process, from the VM concept, your local should be able to access it but it won’t be able to access your local env. Please check how docker network works and try out docker compose.
a
Thanks for the pointing out to correct direction, now i am able to create a Realtime table, Thanks for help :)
n
i had added a docker compose which optionally also starts kafka, unfortunately not merged yet, still you can checkout https://github.com/pinot-contrib/pinot-docs/pull/383
m
I think you need to change this to `lowlevel`:
Copy code
"stream.kafka.consumer.type": "simple",