远程连接redis数据库问题

1.错误: Could not get a resource from the pool

问题描述:本地maven远程连接redis数据库,报出:

Caused by: redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool

2.解决方法

查了一下,排除防火墙的问题后,原因是redis默认是不支持远程连接的,在redis的配置文件redis.conf中做出如下修改:
1.注释仅本地回环限制

#bind 127.0.0.1

2.因为redis本身处于保护模式,所以有两种方式:关闭保护模式;开启密码保护。这里选择第一种,修改配置文件中的将protected-mode yes修改为protected-mode no

3.使用包含配置文件的方式启动redis

./redis-server . ./redis.conf

3.问题解决

远程连接redis数据库无法获取连接问题

相关文章:

  • 2021-07-13
  • 2021-11-18
  • 2021-12-27
  • 2022-12-23
  • 2021-08-22
  • 2021-12-14
  • 2021-10-16
猜你喜欢
  • 2021-12-01
  • 2021-12-05
  • 2021-10-17
  • 2022-01-14
  • 2021-11-17
  • 2021-06-09
  • 2021-06-29
相关资源
相似解决方案