Hi I have installed Redis on AWS-EC2 instance. I am able to ping the instance from my local machine.
I have opened all ports on my EC2 instance so i should be able to connect and ping the Redis Server.
I am able to ping the EC2 server using the IP(public)
I want to hit the Redis server from my Windows local machine running Spring boot application(with Redission)
In my spring boot I have configured the file(Json) with Single Server Configurations. This is as described in the link below - https://github.com/redisson/redisson/wiki/2.-Configuration
{
"singleServerConfig":{
"idleConnectionTimeout":10000,
"connectTimeout":10000,
"timeout":3000,
"retryAttempts":3,
"retryInterval":1500,
"password":null,
"subscriptionsPerConnection":5,
"clientName":null,
"address": "redis://<EC2-IP>:6379",
"subscriptionConnectionMinimumIdleSize":1,
"subscriptionConnectionPoolSize":50,
"connectionMinimumIdleSize":24,
"connectionPoolSize":64,
"database":0,
"dnsMonitoringInterval":5000
},
"threads":16,
"nettyThreads":32,
"codec":{
"class":"org.redisson.codec.FstCodec"
},
"transportMode":"NIO"
}
Then i am instantiating bean in my spring boot app-
@Bean(name="redissonClient",destroyMethod="shutdown") public
RedissonClient redissonClient() { return Redisson.create(config); }
However, i am getting an exception below -
2019-11-18 14:54:54.432 WARN 81628 --- [isson-netty-1-6] io.netty.channel.DefaultChannelPipeline : An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: CommandDecoder.decode() must consume the inbound data or change its state if it did not decode anything.
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:379) ~[netty-codec-4.1.27.Final.jar:4.1.27.Final]
at io.netty.handler.codec.ReplayingDecoder.channelInputClosed(ReplayingDecoder.java:329) ~[netty-codec-4.1.27.Final.jar:4.1.27.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:359) ~[netty-codec-4.1.27.Final.jar:4.1.27.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:342) ~[netty-codec-4.1.27.Final.jar:4.1.27.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245) [netty-transport-4.1.27.Final.jar:4.1.27.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231) [netty-transport-4.1.27.Final.jar:4.1.27.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224) [netty-transport-4.1.27.Final.jar:4.1.27.Final
The link below points that this is fixed - https://github.com/redisson/redisson/issues/1566 and occurs when we can not communicate to the redis server.
As I have all ports opened on EC2 i don't think communication should be a problem for redis on port 6379. Still i am facing the issue. please help if any one has any idea or if i am missing something.
Thanks