Skip to content

Certificate error REDIS TLS/SSL (wiki making cert section) #18

@jeremus

Description

@jeremus

Hi, I am having trouble connecting the plugins to my redis networks in SSL / TLS
I have the following error:

java.lang.RuntimeException: Unable to connect to your Redis server! at com.imaginarycode.minecraft.redisbungee.RedisBungee.onEnable(RedisBungee.java:240) at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:250) at net.md_5.bungee.BungeeCord.start(BungeeCord.java:310) at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:43) at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) Caused by: com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at com.imaginarycode.minecraft.redisbungee.internal.jedis.util.Pool.getResource(Pool.java:59) at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisPool.getResource(JedisPool.java:330) at com.imaginarycode.minecraft.redisbungee.RedisBungee.loadConfig(RedisBungee.java:464) at com.imaginarycode.minecraft.redisbungee.RedisBungee.onEnable(RedisBungee.java:236) ... 4 more Caused by: com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisConnectionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.imaginarycode.minecraft.redisbungee.internal.jedis.Connection.flush(Connection.java:273) at com.imaginarycode.minecraft.redisbungee.internal.jedis.Connection.getStatusCodeReply(Connection.java:200) at com.imaginarycode.minecraft.redisbungee.internal.jedis.BinaryJedis.auth(BinaryJedis.java:2387) at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisFactory.makeObject(JedisFactory.java:153) at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.create(GenericObjectPool.java:889) at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:424) at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:349) at com.imaginarycode.minecraft.redisbungee.internal.jedis.util.Pool.getResource(Pool.java:50) ... 7 more Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:349) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:292) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:287) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1356) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1231) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1174) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:182) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:171) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1408) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1314) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440) at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:819) at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1189) at com.imaginarycode.minecraft.redisbungee.internal.jedis.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52) at com.imaginarycode.minecraft.redisbungee.internal.jedis.util.RedisOutputStream.flush(RedisOutputStream.java:133) at com.imaginarycode.minecraft.redisbungee.internal.jedis.Connection.flush(Connection.java:270) ... 14 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439) at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306) at java.base/sun.security.validator.Validator.validate(Validator.java:264) at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313) at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:222) at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1340) ... 29 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297) at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434) ... 35 more

I guess because I didn't put a certificate in the JRE root of my java?
If you have any idea how I should create or configure them? in which file or folder I should place them.

Other questions, I who am a java developer I followed this tutorial: [https://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target / ]

If you can help me that would be great.
Because even with my plugins I cannot manage the connection correctly. when I do the test with the InstallCert.java class, the first time it creates the file correctly. but the second to the verification I have this error:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at fr.strikoo.InstallCert.main(InstallCert.java:167)

Screenshot_5

Metadata

Metadata

Assignees

Labels

ON HOLDah this thing need to wait.documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededpriority: MediumquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions