You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting java.nio.channels.ClosedChannelException when calling the backend service in ssl way. When i connect through http of 8443, its working. Can you explain whats the issue and how to fix this?
Getting java.nio.channels.ClosedChannelException when calling the backend service in ssl way. When i connect through http of 8443, its working. Can you explain whats the issue and how to fix this?
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setKeyStorePath(keyStore);
sslContextFactory.setKeyStorePassword("changeit");
SSLEngineFactory myFactory = new DefaultFactories.SSLContextBasedFactory(sslContextFactory.getSslContext()) {
@OverRide
public SSLEngine createSSLEngine(ByteBufAllocator allocator) {
SSLEngine myEngine = super.createSSLEngine(allocator);
myEngine.setUseClientMode(true);
return myEngine;
}
};
return RxNetty.<ByteBuf, ByteBuf> newHttpClientBuilder(host, 443)
.withSslEngineFactory(myFactory).build();
.build();
Then invoking the request provides
return httpClient1.submit(request).doOnError(error -> {
System.out.println("Errrorrrrrrrrrrrrrrr : " + error.getMessage());
error.printStackTrace();
})
JDK version: 1.8
io.reactivex - 0.4.9
netty-all - 4.0.32.Final
The text was updated successfully, but these errors were encountered: