Open ahsan-n opened 2 years ago
The files in /home/ec-user
should not be owned by the root user
chown -R ec2-user /home/ec2-user
then logout from root account and try again
facing the same issue on on macOS it was working then stopped suddenly with no changes
./kafka-topics.sh --bootstrap-server b-1.stage.kafka.eu-west-1.amazonaws.com:9096 --command-config ~/kafka/config/config.properties --list
Exception in thread "main" org.apache.kafka.common.config.ConfigException: Invalid value software.amazon.msk.auth.iam.IAMClientCallbackHandler for configuration sasl.client.callback.handler.class: Class software.amazon.msk.auth.iam.IAMClientCallbackHandler could not be found.
at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:744)
at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:490)
at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:483)
at org.apache.kafka.common.config.AbstractConfig.
Facing the same issue on a Amazon Linux EC2
Had a similar issue. The aws-msk-iam-auth-1.1.3-all.jar
should be in the Kafka directory. In my case: ./kafka_2.12-2.8.1
.
From your example, you placed it in the root:
rw-r--r-- 1 root root 669 Apr 24 08:15 aws-msk-iam-auth-1.1.3-all.jar drwxr-xr-x 6 root root 89 Apr 8 2020 kafka_2.13-2.5.0 -rw-r--r-- 1 root root 61459093 Jul 6 2020 kafka_2.13-2.5.0.tgz
In order to get the file and place it inside this folder, I simply ran the following command in kafka/libs
folder:
wget https://github.com/aws/aws-msk-iam-auth/releases/download/v1.1.1/aws-msk-iam-auth-1.1.1-all.jar
Make sure you're in kafka/libs
when executing this command.
You should now have aws-msk-iam-auth-1.1.3-all.jar
in your Kafka folder.
Find more here, step number 7: https://docs.aws.amazon.com/msk/latest/developerguide/create-topic.html
Anyone work out where to put this thing on a macos homebrew install?
@shayneoneill I got this working by adding the file to this homebrew path:
/opt/homebrew/Cellar/kafka/{$KAFKA_VERSION}/libexec/libs/
@jeffreygolden I'm trying to do the same on my MAC but dint have success yet. Here's what I have:
current working dir:
/opt/homebrew/Cellar/kafka/kafka_2.13-3.6.0
❯ java -version
openjdk version "21.0.1" 2023-10-17
OpenJDK Runtime Environment Homebrew (build 21.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.1, mixed mode, sharing)
I have the jar file in this dir:
/opt/homebrew/Cellar/kafka/kafka_2.13-3.6.0
❯ ls libs/ | grep aws
aws-msk-iam-auth-1.1.1-all.jar
my client.properties
security.protocol=SASL_SSL
sasl.mechanism=AWS_MSK_IAM
sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;
sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
Trying to connect but still same issue:
./bin/kafka-topics.sh --command-config ./config/client.properties --bootstrap-server $server --list
What could I be missing here?
We are facing the same issue when we are trying to use the IAM authentication from kafka connect.
We are getting Invalid value software.amazon.msk.auth.iam.IAMClientCallbackHandler for configuration sasl.client.callback.handler.class: Class software.amazon.msk.auth.iam.IAMClientCallbackHandler could not be found.
We are using the confluentinc/cp-kafka-connect-base
image with version 7.5.0.
So, while creating our image, which will use the IAM auth, we are using the latest jar of version 2.0.3.
In this image, we are copying this jar into the following path
/usr/share/java/
/etc-kafka-connect/jars
/usr/share/java/cp-base-new
We are running our kafka-connect
in the distributed mode.
We have also set the CLASSPATH in the docker file as an environment variable to this path /usr/share/java/
.
Also, we have set the plugin path for our kafka-connect
to /usr/share/java,/usr/share/confluent-hub-components
But after all this, we still get the same error mentioned above.
Do you guys have any idea on how to resolve this issue?
@Devarsh23 we are facing the same issue, have you found a solution for this?
error getting :
how i loaded classpath:
logged in as user root. Using instance profile with kafka full access.
client.properties:
executing from dir:
home/ec-user:
java version:
command:
not sure what I am mistaking here.