Reputation: 201
I installed latest confluent platform Kafka on Ubuntu server. Now when I try to get consume from topic I get an error for all the topics that were working last friday and any new ones I create.
kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic distance2
topic created distance2
kafka-console-consumer --bootstrap-server localhost:9092 --topic distance2 --from-beginning
[2020-06-01 08:00:27,746] WARN [Consumer clientId=consumer-console-consumer-56224-1, groupId=console-consumer-56224] Error while fetching metadata with correlation id 2 : {distance2 =INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient) [2020-06-01 08:00:27,747] ERROR [Consumer clientId=consumer-console-consumer-56224-1, groupId=console-consumer-56224] Metadata response reported invalid topics [distance2 ] (org.apache.kafka.clients.Metadata) [2020-06-01 08:00:27,748] ERROR Error processing message, terminating consumer process: (kafka.tools.ConsoleConsumer$)
org.apache.kafka.common.errors.InvalidTopicException: Invalid topics: [distance2 ]
Processed a total of 0 messages
As a matter of principal it seems that the reason why something is invalid should be available. How do i find the reason?
Upvotes: 0
Views: 22932
Reputation: 51
I got the same error
[WARN ] 2021-01-13 19:24:44.516 [tx.id=] [kafka-producer-network-thread | producer-1] NetworkClient -
[Producer clientId=producer-1] Error while fetching metadata with correlation id 574 : {publish.data.dev =INVALID_TOPIC_EXCEPTION}
The error occurred due to space after the topic name in the property file i.e "publish.data.dev " Fixed after removing the space
Upvotes: 4
Reputation: 53
To provide additional information besides that in the comment section (from documentation):
The client has attempted to perform an operation on an invalid topic. For example the topic name is too long, contains invalid characters etc. This exception is not retriable because the operation won't suddenly become valid.
Valid characters are '-', '.', '_'.
Upvotes: 3