embedded-redis
embedded-redis copied to clipboard
redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CLUSTER'
In application code we set up cluster using JedisCluster and providing ip and port of one of the masters.
But in unit test when we set up RedisCluster as cluster = RedisCluster.builder().sentinelCount(0)
.serverPorts(group1.asJava).replicationGroup("master1", 1)
.build();
the tests are failing with
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CLUSTER'
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:291)
at redis.clients.jedis.Jedis.clusterSlots(Jedis.java:3376)
at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:54)
at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:39)
at redis.clients.jedis.JedisClusterConnectionHandler.
So cluster command is not supported in embedded-redis ? Please let me know how to go abt testing JedisCluster with embedded redis.
It's not supported. You can find a proper explanation and workaround here: https://github.com/kstyrc/embedded-redis/issues/55
How does Issue #55 fix this issue? I see a lot of command line statements, which seems like it is no longer embedded redis.
I also would like to learn more about how #55 resolves this issue.
any progress on it?
Still hoping for progress on this issue