Home > Back-end >  Redis abnormal JedisClusterMaxAttemptsException: No more cluster attempts left.
Redis abnormal JedisClusterMaxAttemptsException: No more cluster attempts left.

Time:09-20

Problem: redis. Clients. Jedis. Exceptions. JedisClusterMaxAttemptsException: No more cluster attempts left.
1, use the redis cluster server configuration, and directly show success


2, the code is as follows:

3, redis. Config the bind of binding is LAN IP server:



4, using ruby open cluster:


5, ps - ef | grep redis also can service has started the


6, with online configuration is the same as the other, he's always quote this exception, always can't find the reason, I tried the Jedis,
Can be normal use, are as follows:


Is the use of JedisCluster this class has been an error, is there any help solve the great god, don't appreciate,
* note: previously tried redis. Conf commented "bind 172.18.212.119", or useless

CodePudding user response:

From the top,,,,

CodePudding user response:

Himself has been resolved, or did you go to see the redis official document, to solve the following steps:

The inside of the 1, redis. Conf "bind IP address" is to limit access to the IP, will need to be written off

2, using ruby commands open clusters are using a public IP, as follows:
Ruby redis - trib. Rb create -- replicas 1 public IP: 7000 public IP: 7001 public IP: 7002 public IP: 7003 public IP: 7004 public IP: 7005

3, and most important, if you execute 2 steps have been "Waiting for the cluster to join... ", it must be your port is not open, don't question, the port here
Instead of 7000-7005, 17000-17005, because the port number set redis cluster is "redis port + 10000", this is very important,

I by operating the above steps, have been able to normal use redis cluster, since then, learning, knot,

CodePudding user response:

Public Ip which is refers to the network card Ip? Don't eth0 that IP is not public IP?
  • Related