当前位置 : 主页 > 编程语言 > java >

连接widows云服务器上的redis时连接不上【解决】

来源:互联网 收集:自由互联 发布时间:2022-07-13
redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are

redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command ‘CONFIG SET protected-mode no’ from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to ‘no’, and then restarting the server. 3) If you started the server manually just for testing, restart it with the ‘–protected-mode no’ option. 4) Setup a bind address or an authentication passwor

等一系列报错后…我终于找到错误。
首先,把网上的各种步骤走一遍。
1.服务器上配置文件中注释build 127.0.0.1
2.服务器配置文件将protected-mode属性设置no
…等等
项目中配置文件的主机等配置好,timeout根据网上标准写,3.2.1以后6000。
最终解决方法是一定要用redis-server redis.windows.conf这个命令,即在redis目录下打开cmd窗口输入redis-server redis.windows.conf,双击打开不能远程连接!
 

 

 

以上情况是在windows server服务器上安装redis。在公司局域网访问redis的配置。



上一篇:【Java Web】 Tomcat 的 使用、部署
下一篇:没有了
网友评论