-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAMClientCallbackHandler could not be found #96
Comments
Depending on how you are running your consumer, you need to add the aws-msk-iam-auth library to the classpath differently. Some options are: (1) add it to the project dependencies using for example the maven repo in the ReadMe then build the project. About (3), running an already existing jar file will probably override the env classpath with the internals META-INF/MANIFEST.mf file class-path, so you need to edit it to let it know where to find this external jar library. From https://javarevisited.blogspot.com/2011/01/how-classpath-work-in-java.html#axzz7qlxl0T5c How to edit an existing jar file's MANIFEST:
For 3. I actually use (add the M option) |
I was able to solve this issue by copying |
thanks, worked for me too |
It doesn't seem to be working using |
Thanks, it worked for me too |
We are facing the same issue when we are trying to use the IAM authentication from kafka connect. We are using the
We are running our |
@Devarsh23
|
we are using the following work for me:
|
we have tried this path (/usr/share/java/cp-base-new/) in distroless and scratch image but getting the same error. Any lead on classpath, where can we put this explicitly? |
Hi, I'm trying to use kafka cli with AWS_MSK_IAM mechanism and I get the same error. I put the jar Any ideas? command: Also doesn't work If install kafka directly :
|
We faced the same error when converting our kafka-connect cluster from TLS authentication to AWS IAM authentication.
AFAIK, the first location is where by default the classpath gets loaded for creating the admin client, serving the connector list, status, tasks, etc. through the REST endpoint. This admin client starts by reading the deployed connectors from a kafka topic and needs read access to the topic storing these connectors, so it fails when it can't authenticate. |
We faced the same issue when we were trying to create kafka consumer from spring boot application with plain java. We needed it to be a async task. So we used a following code snippet.
With this asynchronus task, it will try to instantiate software.amazon.msk.auth.iam.IAMLoginModule with the class loader. Class loader which will be used for CompletableFuture.runAsync() is ForkJoinPool which is created when JVM is initialized. So it will not able to access the spring class loader which leads to have class not found exception. Solution we found is to provide a separate executor pool which suggested in https://stackoverflow.com/questions/49113207/completablefuture-forkjoinpool-set-class-loader answer
This executor pool solved my class loader issue. |
keep getting this error:
I saw it was noted in the troubleshooting
and it says to:
I tried to do it with this command below:
my command
but I still get the same error.
anything Im missing?
The text was updated successfully, but these errors were encountered: