Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CLUSTER' #79

Open
idas0382 opened this issue Jan 31, 2017 · 5 comments

Comments

@idas0382
Copy link

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.(JedisClusterConnectionHandler.java:17)
at redis.clients.jedis.JedisSlotBasedConnectionHandler.(JedisSlotBasedConnectionHandler.java:20)
at redis.clients.jedis.BinaryJedisCluster.(BinaryJedisCluster.java:48)
at redis.clients.jedis.JedisCluster.(JedisCluster.java:53)

So cluster command is not supported in embedded-redis ? Please let me know how to go abt testing JedisCluster with embedded redis.

@aserrallerios
Copy link

It's not supported. You can find a proper explanation and workaround here: #55

@adpjay
Copy link

adpjay commented May 9, 2017

How does Issue #55 fix this issue? I see a lot of command line statements, which seems like it is no longer embedded redis.

@thallium205
Copy link

I also would like to learn more about how #55 resolves this issue.

@Mxas
Copy link

Mxas commented May 2, 2018

any progress on it?

@rchargel
Copy link

Still hoping for progress on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants