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 : io.netty.channel . 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 4.1.36.final
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 127.0.0.1, 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 0.0.0.0 or 127.0.0.1. 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 0.0.0.0
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:
https://my.oschina.net/ruoli/blog/2252393
Read More:
- Error creating bean with name ‘application‘: Instantiation of bean failed;
- Error creating bean with name ‘enablererediskeyspacenotificationsinitializer’
- Error creating bean with name ‘xxcontroller’
- Error creating bean with name ‘redisTemplate‘ defined in class path resource [xx/RedisConfig.class]
- Springboot error creating bean with name ‘xmlmodelplug’:
- Error creating bean with name ‘lettuceClientResources‘ defined in class path resource
- Idea SpringBoot:Error creating bean with name ‘XXXXController‘
- Error creating bean with name xxxxxx : unsatisfied dependency…
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
- Spring AOP is an error creating bean with name
- About error creating bean with name ‘xxxxx’: invocation of init method
- Error creating bean with name usercontroller appears when springboot starts
- Error creating bean with name ‘requestMappingHandlerAdapter‘ defined in class path resource
- Error creating bean with name ‘helloController‘: Injection of autowired dependencies failed;
- elasticsearch NoClassDefFoundError error creating RestHighLevelClient bean
- Error creating bean with name ‘datasource’ defined in class path resource
- Springboot startup exception: error creating bean with name ‘permissioncontroller’
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘use
- Error creating bean with name ‘sqlsessionfactory’ defined in class path resource…..
- Error creating bean with name ‘sqlsessionfactory’ defined in ServletContext resource)