kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

NoBrokersAvailable

Open aa1633350 opened this issue 4 years ago • 2 comments

While trying to run the producer I keep on getting this issue, I have tried adding api_version to the code but its not working. Can anybody help

Traceback (most recent call last): File "C:/Users/Aditya Anand/Nudity_detection-on-Live-Video-Stream/consumer.py", line 12, in consumer = KafkaConsumer( File "C:\Users\Aditya Anand\AppData\Local\Programs\Python\Python38\lib\site-packages\kafka\consumer\group.py", line 356, in init self._client = KafkaClient(metrics=self._metrics, **self.config) File "C:\Users\Aditya Anand\AppData\Local\Programs\Python\Python38\lib\site-packages\kafka\client_async.py", line 244, in init self.config['api_version'] = self.check_version(timeout=check_timeout) File "C:\Users\Aditya Anand\AppData\Local\Programs\Python\Python38\lib\site-packages\kafka\client_async.py", line 927, in check_version raise Errors.NoBrokersAvailable() kafka.errors.NoBrokersAvailable: NoBrokersAvailable

Process finished with exit code 1

aa1633350 avatar Mar 05 '21 08:03 aa1633350

Is your Kafka server up and healthy? Are you providing the correct Kafka server URL to the Kafka client?

mmenbawy avatar Apr 24 '21 00:04 mmenbawy

It may be necessary to edit C:\Windows\System32\drivers\etc\HOSTS to add your ip and hostname for windows 192.168.101.100 centos01

HWTsang avatar Jun 11 '21 03:06 HWTsang