-
Notifications
You must be signed in to change notification settings - Fork 914
Timed out waiting for controller while creating topic #682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Logs: %7|1570131362.961|BROKER|rdkafka#producer-1| [thrd:app]: localhost:9092/bootstrap: Added new broker with NodeId -1 Process finished with exit code 0 |
It fails to connect to your cluster, see https://rmoff.net/2018/08/02/kafka-listeners-explained/ |
Description
I am able to list existing topics but I am not able to create a new topic or change partitions to an existing topic
Failed to create topic EDW_TEST_DATA: KafkaError{code=_TIMED_OUT,val=-185,str="Timed out waiting for controller"}
How to reproduce
import confluent_kafka.admin, pprint
conf = {'bootstrap.servers': 'localhost:9092'}
kafka_admin = confluent_kafka.admin.AdminClient(conf)
topics = ['EDW_TEST_DATA']
new_topics = [confluent_kafka.admin.NewTopic(topic, num_partitions=3, replication_factor=1) for topic in topics]
fs = kafka_admin.create_topics(new_topics)
for topic, f in fs.items():
try:
f.result() # The result itself is None
print("Topic {} created".format(topic))
except Exception as e:
print("Failed to create topic {}: {}".format(topic, e))
pprint.pprint(kafka_admin.list_topics().topics)
topic_list = []
topic_list.append(confluent_kafka.admin.NewPartitions('EDW_EMP_DATA1', 3))
kafka_admin.create_partitions(topic_list)
pprint.pprint(kafka_admin.list_topics().topics)
Checklist
Please provide the following information:
confluent_kafka.version()
andconfluent_kafka.libversion()
): ('1.1.0', 16842752) and ('1.1.0', 16843007){...}
'debug': '..'
as necessary)The text was updated successfully, but these errors were encountered: