Error creating bean with name ‘redissonclient’:

The contents of the error report are as follows:

 Error creating bean with name ‘redissonClient’: Bean instantiation via factory method failed; nested exception is org.springframework.beans .BeanInstantiationException: Failed to instantiate [ org.redisson.api .RedissonClient]: Factory method ‘create’ threw exception; nested exception is java.lang.NoSuchMethodError : . nio.NioEventLoopGroup .<init>(ILjava/util/concurrent/ThreadFactory;)V


The version of reisson I use is 3.10.7

Finally, through debugging the source code, I found that the version of netty I used was too high. After several tests, I used netty

At present, redisson does not support netty 5. At the same time, version 3.10.7 of redisson does not support part of netty 4.0. X, so you need to pay attention when using redisson



After solving the previous problem, I have encountered a problem, that is, I clearly configured the redisson node address as the remote address, but the redisson node has to connect to my local address, that is, that is to say, the address of the redisson node connection is inconsistent with the address of the redis configured by me, as shown in the figure below

You can see that the first step is to grab the configuration from the remote server that I configured, and then connect directly to my local server. It’s conceivable that I can’t connect. Later, when debugging the source code, I suddenly thought whether there was a problem with the configuration of my redis cluster. After checking the process, I found that the processes of redis server are all there. Later, I suddenly thought that the processes of redis are all there, but the It’s not in the cluster state. After checking the configuration method of redis cluster, it’s found that in addition to the basic change of configuration file, you need to start the cluster in two steps

1. Start each node of redis

2. Create clusters through redis cli

And my problem is that I didn’t do step 2, and then I did step 2, and I tested again and finally connected,

There is another possibility for this error report, that is, redis.conf File bind configuration error, pro test, in redis.conf This problem will appear whether “bind” or “bind” binding address is or The solution is to set the value of “bind” to the real IP of the machine, that is, the intranet IP or the Internet IP, depending on your application. Of course, this is the setting needed to build a redis cluster. If it is a stand-alone redis, it is better to comment out the bind or set it to

When using redis cli to connect to redis cluster, use the following command:

Redis cli – C – H ﹣ any node IP – P ﹣ port number

For the construction of redis cluster, please refer to:

Read More: