使用jedis连接redis可能会出现的问题及解决方案

使用jedis连接redis可能会出现的问题及解决方案:

1)ip绑定问题

Connection refused: connect

把Redis的配置文件redis.conf里的

bind localhost(或者bind 127.0.0.1,表明只有该主机才能访问)注释掉。

或者修改为:

bind ip     表明,只能通过ip访问。

2)、保护模式

DENIED Redis is running in protected mode because protected mode is enabled…

redis处于保护模式,只能本地链接,我们需要修改配置文件redis.conf,将protected-mode yes改成no

原文地址:https://www.cnblogs.com/heviny/p/11181749.html