quarkus
quarkus copied to clipboard
Redis error: Pool initialized with SSL but connection requested plain socket
Describe the bug
Hello quarkus team!
We have an application configured for accessing a local Redis. The configuration is simple:
%quarkus.redis.hosts=redis://localhost:6379
%quarkus.redis.client-type=standalone
It works well when using Quarkus 3.11.3. However, it has started to fail after updating to the newer 3.12.0. Now we have this error:
Caused by: io.vertx.core.impl.NoStackTraceThrowable: Pool initialized with SSL but connection requested plain socket
Looking at the release notes, I see "Implementation of the internal TLS Registry". Could it be related? Indeed something has changed in this version.
Thanks in advance!
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
No response
Output of java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
/cc @Ladicek (redis), @cescoffier (redis), @machi1990 (redis)
Anything configured under quarkus.tls?
Thanks for the quick response. We haven't anything configured under quarkus.tls. I tried also with
quarkus.redis.tls.enabled=false
although I think it's the default value
Sorry, I just saw we have
quarkus.tls.trust-all=true
Could it be a problem?
In fact, after removing that configuration, it works again. Is this something expected?
Not expected, sounds like a bug, but @cescoffier can provide more details
It seems to me that before 6e1489c4deba694c743c88d8bff54de822dd530f quarkus.tls.trust-all only resulted in setting net.setTrustAll(); but now it also affects net.setSsl(), which seems wrong.
I can open a PR if you agree @cescoffier ?
Ok, it's a bug. We need to be a bit more specific.
First TLS for redis is not enabled by default. Only if the host is rediss://.
Trust-all should not enable tls, if the scheme is not rediss://.
Thanks for the quick response