Telnet to MSK brokers REALLY slow....

0

I have created a 3-broker MSK instance (not serverless) and a Windows EC2 instance in the same VPC. The MSK producer client running on the Windows EC2 machine can connect to the MSK cluster without any delays or timeouts. However, if I try to confirm network connectivity from the same machine to each of the MSK cluster brokers using Windows Telnet, it can take up to 10 - 15 minutes to establish a connection to each broker. Does any know why this might be the case? Thanks.

1 Answer
0

Hello,

From reading over your Question, I understand that you have a 3 broker MSK instance and a Windows EC2 instance all in the same VPC. You're not facing any connection issues with the MSK producer client running on the Windows EC2 machine connecting to the MSK cluster; however, you are seeing delays (10-15mins), when trying to confirm network connectivity using Telnet. You are wondering why this is occurring.

Please correct me if I have misunderstood your concerns in any way whatsoever.


GUIDANCE:

  1. I recommend since you are unable to communicate successfully with your MSK cluster, start by performing the following connectivity test. This test will verify to see if there are any specific networking issues within your AWS MSK Cluster that can be causing this slowness.

a. Use any of the methods described in "Getting the bootstrap brokers for an Amazon MSK cluster" to get the addresses of the bootstrap brokers 1.

b. In the following command replace "bootstrap-broker" with one of the broker addresses that you obtained in the previous step. Replace "port-number" with 9094 if the cluster is set up to use TLS authentication. If the cluster doesn't use TLS authentication, replace "port-number" with 9092. Run the command from the client machine.

Command: telnet bootstrap-broker port-number

  1. Repeat the previous command for all the bootstrap brokers.

  2. Use any of the methods described in "Getting the Apache ZooKeeper connection string for an Amazon MSK cluster" to get the addresses of the cluster's Apache ZooKeeper nodes 2.

  3. On the client machine run the following command, replacing "Apache-ZooKeeper-node" with the address of one of the Apache ZooKeeper nodes that you obtained in the previous step. The number 2181 is the port number. Repeat for all the Apache ZooKeeper nodes.

Command: telnet Apache-ZooKeeper-node 2181

Note: If the client machine is able to access the brokers and the Apache ZooKeeper nodes, this means there are no connectivity issues. In this case, run the following command to check whether your Apache Kafka client is set up correctly. To get "bootstrap-brokers", use any of the methods described in Getting the bootstrap brokers for an Amazon MSK cluster. Replace "topic" with the name of your topic.

Command: <path-to-your-kafka-installation>/bin/kafka-console-producer.sh --broker-list bootstrap-brokers --producer.config client.properties —topic topic

If the previous command succeeds, this means that your client is set up correctly. If you're still unable to produce and consume from an application, debug the problem at the application level.

If the client machine is unable to access the brokers and the Apache ZooKeeper nodes, see the following subsections for guidance that is based on your client-machine setup.

References:

I hope the above is able to assist you with the Telnet to Broker slowness you are encountering. If you have any further questions, comments, or concerns, I'd be glad to address them.

Thanks and have a great day.

AWS
iChibby
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions