TimeoutException |
Java |
- Network issue.
- The client authentication that uses
sasl.mechanisms failed.
Note This error occurs only on Internet-connected
Message Queue for Apache Kafka instances.
|
- Make sure that the server is correctly configured.
- Run the Telnet command to check the network connection.
- If the network connection is normal, check whether the authentication is successful by referring to the following topics.
Note This solution is applicable only to Internet-connected
Message Queue for Apache Kafka instances.
|
run out of brokers |
Go |
Authentication failed for user |
Python |
Leader is not available |
All languages |
This error is reported for a while when a topic is initialized. If the error persists, the cause may be no topic is available. |
- Log on to the Message Queue for Apache Kafka console.
- Check whether topics are created.
- If no topic is created, create a topic first. For more information, see Step 1: Create a topic.
|
leader is in election |
array index out of bound exception |
Java |
Spring Cloud Stream uses a built-in format to parse messages. |
Two solutions are available:
- We recommend that you use Spring Cloud Stream to send and consume messages.
- If you use another method, such as calling the native Java client, to send messages but use Spring Cloud Stream to consume messages, you must set
headerMode to raw to disable message parsing. For more information, see Spring Cloud Stream Reference Guide.
|
No such configuration property: "sasl.mechanisms" |
- C++
- Clients that run C++ as the core language, such as PHP and Node.js.
|
The Simple Authentication and Security Layer (SASL) and Secure Sockets Layer (SSL) modules are not installed or are exceptional. |
Run the following commands to install the SASL and SSL modules:
Note The CentOS system is used as an example. For other OSs, see the official website of the OS or use a third-party search engine to search for related information.
- SSL:
sudo yum install openssl openssl-devel
- SASL:
sudo yum install cyrus-sasl{,-plain}
|
No worthy mechs found |
No KafkaClient Entry |
Java |
The kafka_client_jaas.conf file does not exist. |
Prepare kafka_client_jaas.conf and save it in any directory, for example, /home/admin. The secure logon to the Java client is set in the system configuration and can be set in two ways.
- Set system variables.
- Set system variables by setting the Java Virtual Machine (JVM) parameter:
-Djava.security.auth.login.config=/home/admin/kafka_client_jaas.conf .
- Set system variables in code:
System.setProperty("java.security.auth.login.config","/home/admin/kafka_client_jaas.conf") .
Note If you set system variables in code, make sure that the code is executable before starting the client.
- Configure system files: Add
login.config.url.1=file:/home/admin/kafka_client_jaas.conf to the ${JAVA_HOME}/jre/lib/java.security file.
For more information, see Oracle JAAS Login Configuration File. |
Error sending fetch request |
Java |
This error indicates that messages fail to be pulled by the consumer. The possible causes are:
- Network issue.
- The message pulling timed out.
|
- Make sure that the server is correctly configured.
- Run Telnet to check the network connection.
- If the network connection is normal, the possible cause is that the message pulling timed out. You can adjust the following parameters to limit the number of messages that can be pulled at a time.
- fetch.max.bytes: the maximum number of bytes returned by the broker for a single pull.
- max.partition.fetch.bytes: the maximum number of bytes returned by one partition on the broker for a single pull.
- Log on to the Message Queue for Apache Kafka console and view the traffic limit of the instance on the Instance Details page.
- For virtual private cloud (VPC)-connected instances, view the Traffic Specification value.
- For Internet-connected instances, view the Public Traffic value.
|
DisconnectException |
CORRUPT_MESSAGE |
All languages |
- The idempotence feature is automatically enabled when the client version is 3.0 or later. However, if Cloud Storage is used as the storage engine, the idempotence feature is not supported. In this case, this error is returned.
- If Local Storage is used as the storage engine, this error is returned when the log compaction command is executed without a delivered message key.
|
- Cloud Storage: Set
enable.idempotence=false in the code.
- Local Storage: Deliver the key of the message.
|