question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lettuce Throwing java.lang.IndexOutOfBoundsException.

See original GitHub issue

Hello,

We are finding that some of our lettuce client hosts start spontaneously throwing the following exception:

Caused by: com.lambdaworks.redis.RedisException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at com.lambdaworks.redis.cluster.MultiNodeExecution.execute(MultiNodeExecution.java:31)
    at com.lambdaworks.redis.cluster.RedisAdvancedClusterAsyncCommandsImpl.lambda$mget$1(RedisAdvancedClusterAsyncCommandsImpl.java:118)
    at com.lambdaworks.redis.cluster.PipelinedRedisFuture.lambda$new$0(PipelinedRedisFuture.java:24)
    at com.lambdaworks.redis.protocol.AsyncCommand.completeResult(AsyncCommand.java:88)
    at com.lambdaworks.redis.protocol.AsyncCommand.complete(AsyncCommand.java:76)
    at com.lambdaworks.redis.protocol.CommandWrapper.complete(CommandWrapper.java:30)
    at com.lambdaworks.redis.cluster.ClusterCommand.complete(ClusterCommand.java:44)
    at com.lambdaworks.redis.protocol.CommandHandler.decode(CommandHandler.java:170)
    at com.lambdaworks.redis.protocol.CommandHandler.channelRead(CommandHandler.java:141)
    at com.lambdaworks.redis.cluster.RedisAdvancedClusterAsyncCommandsImpl.lambda$null$0(RedisAdvancedClusterAsyncCommandsImpl.java:118)
    at com.lambdaworks.redis.cluster.MultiNodeExecution.execute(MultiNodeExecution.java:29)

Some of the host continue to throw this exception until they are restarted, while others will heal on their own.

We do not see anything interesting in the DEBUG logs leading up to these exceptions; no disconnects or errors, just the expected output leading to the exception such as:

15 Mar 2018 11:30:30,413 [DEBUG] {} (lettuce-nioEventLoop-3-7) com.lambdaworks.redis.protocol.RedisStateMachine: Decoded ClusterCommand [command=AsyncCommand [type=MGET, output=ValueListOutput [output=[null], error='null'], commandType=com.lambdaworks.redis.protocol.Command], executions=0], empty stack: true
15 Mar 2018 11:30:30,413 [DEBUG] {} (lettuce-nioEventLoop-3-3) com.lambdaworks.redis.protocol.RedisStateMachine: Decode ClusterCommand [command=AsyncCommand [type=MGET, output=ValueListOutput [output=[], error='null'], commandType=com.lambdaworks.redis.protocol.Command], executions=0]
15 Mar 2018 11:30:30,413 [DEBUG] {} (lettuce-nioEventLoop-3-3) com.lambdaworks.redis.protocol.RedisStateMachine: Decoded ClusterCommand [command=AsyncCommand [type=MGET, output=ValueListOutput [output=[null], error='null'], commandType=com.lambdaworks.redis.protocol.Command], executions=0], empty stack: true

Our environment: Lettuce 4.1.1.Final Redis 3.2

Link to code where exception is thrown.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
HarryTheHawkcommented, Mar 19, 2018

We are in the process of migrating to 4.4.3 - just conducting some final testing.

0reactions
mp911decommented, Apr 17, 2018

Closing this one as it seems we cannot do anything further here. Feel free to reopen the ticket once there is something we can do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IndexOutOfBoundsException in DataProvider query using ...
IndexOutOfBoundsException in DataProvider query using Java 8 Stream ... I want to lazy load filtered data from the backend. If I apply a...
Read more >
lettuce-io/Lobby - Gitter
I am using spring-data-redis 1.8.10 and lettuce 4.4.3. When I try the above setup I get an error. What am I doing wrong?...
Read more >
[Solved] java.lang.IndexOutOfBoundsException
This exception is thrown by String methods to indicate that an index is either negative or greater than the size of the String....
Read more >
Java Exceptions Are You Handling Them Right - aslanpelet.com
Here is a typical stack trace, obtained from the exception object when it was caught. Exception in thread java.lang.IndexOutOfBoundsException: ...
Read more >
RedisException (Lettuce 6.2.2.RELEASE API)
io.lettuce.core. ... Exception thrown when Redis returns an error message, or when the client fails for any ... Methods inherited from class java.lang....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found