skip to Main Content

I have an AWS Redis cluster with Cluster mode Enabled and Encryption at rest/transit Enabled with Transit encryption mode Preferred.

I’m using Java spring with redisson version 3.12.0 .

Below is my connection using redisson:

redissonConfig.useClusterServers()
.setKeepAlive(true)
.setConnectTimeout(10000)
.setRetryAttempts(2)
.setDnsMonitoringInterval(10000)
.addNodeAddress("Redis configuration endpoint");
client = Redisson.create(redissonConfig);

I using this redis end point : rediss://ConfigurationEndpoint

When try to connect to cluster from application using AWS EC2 and Jposs I’m getting this Exception java.nio.channels.ClosedChannelException , also I see below exception

[2023-04-15 14:46:22,296] [redisson-netty-2-3] [WARN] ChannelInitializer- Failed to initialize a channel. Closing: [id: 0x77267167]
io.netty.channel.ChannelPipelineException: io.netty.handler.ssl.SslHandler.handlerAdded() has thrown an exception; removed.
    at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:624) ~[netty-transport-4.1.46.Final.jar:4.1.46.Final]
    at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:223) ~[netty-transport-4.1.46.Final.jar:4.1.46.Final]
    at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:381) ~[netty-transport-4.1.46.Final.jar:4.1.46.Final]
    at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:370) ~[netty-transport-4.1.46.Final.jar:4.1.46.Final]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_362]
Caused by: java.lang.NoSuchFieldError: TCP_FASTOPEN_CONNECT
    at io.netty.handler.ssl.SslHandler.handlerAdded(SslHandler.java:1979) ~[netty-handler-4.1.72.Final.jar:4.1.72  


[redisson-netty-2-3] [WARN] ChannelInitializer- Failed to initialize a channel. Closing: [id: 0xe1c3fece]
io.netty.channel.ChannelPipelineException: io.netty.handler.ssl.SslHandler.handlerAdded() has thrown an exception; removed.

I spent more that 15 hours trying to resolve the issue with no luck, also I searched over the internet for such error with no result , appreciate your support incase you have any idea.

Thanks

2

Answers


  1. Chosen as BEST ANSWER

    I will answer my question, I was able to solve this issue by upgrading the io.netty. version to 4.1.72.Final , as below

    <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.72.Final</version>
    </dependency>
    

    The main issue was with io.netty version conflict that I have within my application where multiple versions were used.


  2. Caused by: java.lang.NoSuchFieldError: TCP_FASTOPEN_CONNECT

    It tells that you might have different netty versions in classpath

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search