- Newest
- Most votes
- Most comments
-
The error message suggests that the IAMClientCallbackHandler class could not be found. This is likely because the JAR file containing this class is not in the classpath. Even though you've placed the aws-msk-auth-iam-2.2.0-all.jar file in the ./libs directory, it may not be automatically included in the classpath.
-
To resolve this, you need to explicitly add the JAR file to the classpath when running the kafka-topics command. You can do this by setting the CLASSPATH environment variable before running the command. Try the following:
set CLASSPATH=.\libs\aws-msk-auth-iam-2.2.0-all.jar .\bin\windows\kafka-topics.bat --create --topic my-topic --bootstrap-server b-1.democluster1.abc123.ac4.kafka.ap-south-1.amazonaws.com:9198 --partitions 2 --replication-factor 1 --command-config .\config\clients.properties
-
Make sure that the path to the JAR file is correct. If the libs folder is in a different location, adjust the path accordingly.
-
Your clients.properties file looks correct, but ensure there are no extra spaces or line breaks, especially at the end of each line.
-
Verify that you're using the correct version of the aws-msk-auth-iam JAR file that's compatible with your Kafka client version.
-
Double-check that your AWS CLI SSO login is still active and that your credentials are properly set up.
-
Ensure that the security group for your MSK cluster allows inbound traffic on port 9198 from your IP address, not just "all TCP ports" as this could be a security risk.
If these steps don't resolve the issue, you may need to check your Kafka client version compatibility with the MSK cluster version and ensure all necessary dependencies are correctly installed and configured.
Sources
Troubleshoot an IoT rule not sending messages in Amazon MSK | AWS re:Post
Troubleshoot your Amazon MSK cluster - Amazon Managed Streaming for Apache Kafka
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 21 days ago