Azure ML and Kafka Server Connection Issue

Ghada 31 Reputation points
2023-04-07T04:42:56.7133333+00:00

I am using Azure ML for real-time machine learning. I have installed the Kafka server, but I am having a connection issue when trying to create a topic using the below line of code. I received the following warning: WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient). I appreciate your help.

!./kafka_2.13-3.3.2/bin/kafka-topics.sh --create --topic amids-train --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,963 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zeeshan Nasir Bajwa 646 Reputation points Student Ambassador
    2023-04-07T05:07:41.48+00:00

    Hi Ghada, The warning message you received suggests that the Kafka broker may not be available or is not running on the specified address and port. Here are some steps you can follow to troubleshoot the issue:

    1. Verify that the Kafka broker is running: You can check if the Kafka broker is running by using the following command in a new terminal window: ./kafka_2.13-3.3.2/bin/kafka-server-start.sh ./kafka_2.13-3.3.2/config/server.properties
    2. Verify that the address and port are correct: Make sure that the address and port specified in the bootstrap-server parameter are correct and that there are no firewall or network configuration issues preventing you from connecting to the broker.
    3. Check the Kafka logs for errors: Check the Kafka logs to see if there are any error messages that could help identify the issue. You can find the Kafka logs in the logs directory of your Kafka installation.
    4. Try using a different topic name: It's possible that the topic name you're using is already in use or is invalid. Try using a different topic name to see if that resolves the issue.

    I hope these steps help you resolve the issue. Let me know if you have any further questions!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.