-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Kafka message sending fails with 'class SslBundleSslEngineFactory could not be found' #44414
Comments
This could be a classloader issue. It does work locally with SSL enabled, too? Or is SSL only enabled in EKS? Please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem. |
Yes, it works locally with the same configuration and SSL enabled, but I read that it might be functioning correctly locally due to the JVM. I have added the following dependency, which provides org.springframework.boot.autoconfigure.kafka.SslBundleSslEngineFactory, and verified its presence in the image after packaging:
Since the Spring Kafka producer is lazy-initialized, it throws a ClassNotFoundException after the application startup. |
Please provide a sample to reproduce. |
kafka-producer.zip - sample |
Hey, do you have any instructions how to reproduce the issue? I've added a compose file and some SSL config (the certs in your sample are all empty), and it works, both in tests and locally when running with
Also I don't see any |
|
I do not want to pollute this thread, apologies. I am facing the same issue with all the above springboot versions mentioned. For me, I have a case where it is working in "normal" mode and local, but I always encounter this same issue when running with GraalVM native image Just wondering if I should create a new issue, targeting specifically native images, or if this is related. |
I still think this is a classloader issue. The classloader associated with the thread when using the Is there something different in the dependencies or are any agents attached when running in EKS? |
Please open a new issue, and please attach a reproducer. Thanks! // Edit: Nevermind, there's a class hint missing. While it's the same error message as this issue, it's not related. I've opened #44435 for that. |
Instead of putting |
Using the Datadog Java Agent https://dtdg.co/latest-java-tracer, when can I test this fix and with which version? |
Maybe that's the problem. The fix (hopefully) will be released as 3.3.10 next month (https://calendar.spring.io/), or available on Spring Snapshots repo as 3.3.10-SNAPSHOT. |
Spring Boot Kafka SSL Issue on EKS Deployment using Spring boot 3.4.3(tried 3.3.5 and 3.4.2)
We are facing an issue where the Kafka producer works fine in local environments (IntelliJ, mvn spring-boot:run, and java -jar). However, after deploying to EKS, we encounter the following exception:
Issue Details:
Kafka producer initialization delayed: Instead of initializing at application startup, it only starts when sending a message, leading to the SslBundleSslEngineFactory class not being found.
Temporary workaround: We manually create the producer in a @PostConstruct method inside a KafkaConfig class.
Spring Boot Configuration (application.yml)
Request for a Proper Solution
Do we have a proper fix for this issue instead of the workaround?
Is there a missing dependency or classpath issue specific to the environment?
Are there configurations that need adjustment to ensure Kafka SSL settings load correctly?
Any best practices for ensuring SslBundleSslEngineFactory is properly available at runtime?
The text was updated successfully, but these errors were encountered: