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 may occur 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 an ApsaraMQ for Kafka instance 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 may occur because you accessed the ApsaraMQ for Kafka instance 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 whitelists.
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 ApsaraMQ for Kafka instance. For information about client demos, see aliware-kafka-demos.
NoteThe version of a client must match the version of the ApsaraMQ for Kafka instance. For example, if the version of your ApsaraMQ for Kafka instance 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 instance shall prevail.
Configuration: Access may fail if the configuration of the default endpoint is invalid or the Resource Access Management (RAM) user is not granted the required permissions. To check the information about configurations, see Overview.