Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERR This instance has cluster support disabled

I am trying to connect to cluster Redis with a valid URL and port I got this error:

Caused by: io.lettuce.core.RedisCommandExecutionException: ERR This instance has cluster support disabled
    at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:135)
    at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:108)
    at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:118)
    at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:109)

I have cluster-enabled yes

like image 577
yali Avatar asked May 28 '26 23:05

yali


1 Answers

(yeah, this is an old question)

This is typically a result of an attempt to connect using cluster mode to a standalone server (started as a container for development?). IOW, in the code you probably have:

Config config = new Config();
config.useClusterServers() // <<--- Cluster mode
      .addNodeAddress("redis://127.0.0.1:7000");

but should be:

Config config = new Config();
config.useSingleServer() // <<-- Single node mode
      .setAddress("redis://127.0.0.1:7000");

See: https://github.com/redisson/redisson/wiki/2.-Configuration/#26-single-instance-mode

like image 91
kofemann Avatar answered May 31 '26 13:05

kofemann