Overview
This topic describes how to troubleshoot an exception that occurs when a client connects to ApsaraMQ for Kafka for the first time.
Solution
If an exception occurs when a client connects to ApsaraMQ for Kafka for the first time, you can check the following items to troubleshoot the exception:
Network connectivity: In most cases, network connectivity issues are caused by one of the following reasons:
If the client is deployed in an Elastic Compute Service (ECS) instance, the exception occurs because the ECS instance does not reside in the same virtual private cloud (VPC) as the ApsaraMQ for Kafka instance. For information about how to access a ApsaraMQ for Kafka broker in a VPC, see Purchase and deploy a VPC-connected instance.
If the client connects to a VPC-connected ApsaraMQ for Kafka instance, the exception occurs because you did not access the ApsaraMQ for Kafka broker over the Internet.
The IP address of the client is not added to the whitelist. For information about how to configure a whitelist, see Configure a whitelist.
Client version: Exceptions may occur if the client version is outdated. We recommend that you upgrade the client to a version that matches the version of the broker. For information about client demos, see aliware-kafka-demos.
NoteThe version of a client must match the version of the ApsaraMQ for Kafka broker. For example, if the version of your ApsaraMQ for Kafka broker is 0.10.2.2, we recommend that you use a client of version 0.10.2.2. The version of the ApsaraMQ for Kafka broker shall prevail.
Configuration: Access may fail if the configuration of the default endpoint is invalid or the RAM user is not granted the required permissions. To check the information about configurations, see Overview.