日期:2023-07-17  浏览次数:488 次

springboot项目启动redis连接失败问题记录RedisException 如:vue-element前后端有来商城后端启动问题解决方案

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: /127.0.0.1:6379

 at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)

 at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)

 ... 181 common frames omitted

作者:33cd82ad2276
链接:http://www.jianshu.com/p/a1aeaeca1513
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

 

redis-server --service-stop

指定配置的密码连接才可以正常
redis-server.exe redis.windows.conf

一般这样启动不可以

redis-server --service-start

 

C:\Program Files\Redis>redis-server --service-stop
[37864] 17 Jul 16:18:40.220 # Redis service successfully stopped.

C:\Program Files\Redis>redis-server.exe redis.windows.conf
[28216] 17 Jul 16:18:46.239 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[28216] 17 Jul 16:18:46.239 # Redis version=5.0.14.1, bits=64, commit=ec77f72d, modified=0, pid=28216, just started
[28216] 17 Jul 16:18:46.239 # Configuration loaded
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 5.0.14.1 (ec77f72d/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 28216
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'