If the connection fails or times out when you access an ApsaraMQ for Kafka instance by using the endpoint of the instance, check whether you use the telnet command. If the endpoint is a virtual private cloud (VPC) endpoint, make sure that the client and the ApsaraMQ for Kafka instance are deployed in the same VPC.
Problem description
The attempt to ping the endpoint of an ApsaraMQ for Kafka instance fails.
You cannot run the telnet command to connect a client to an ApsaraMQ for Kafka instance or the connection times out.
Cause
To ensure security, the ping command is blocked by the ApsaraMQ for Kafka instance.
You use the VPC endpoint to access the instance, but the client and the ApsaraMQ for Kafka instance are not deployed in the same VPC.
Solution
You can run the telnet
command to check the network connectivity. Take note of the following items:
The client on which the
telnet
command is run is in the whitelist.If the
telnet
command is used to check the network connectivity of a VPC endpoint, make sure that the client is deployed in the same VPC as the ApsaraMQ for Kafka instance.If the
telnet
command is used to check the network connectivity of a public endpoint, make sure that the client can access the Internet.
References
For information about frequently asked questions (FAQ) about the first client connection, see What do I do if an exception occurs when a client connects to ApsaraMQ for Kafka for the first time?
For information about how to upgrade a VPC-connected instance to an Internet- and VPC-connected instance, see Upgrade instance configurations.