Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法。

【错误提示】

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:53)

at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226)

at cn.hncu.RedisPool.getJedis(RedisPool.java:66)

at cn.hncu.RedisJava.main(RedisJava.java:15)

Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is setat redis.clients.jedis.Protocol.processError(Protocol.java:127)

at redis.clients.jedis.Protocol.process(Protocol.java:161)at redis.clients.jedis.Protocol.read(Protocol.java:215)

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)

at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)

at redis.clients.jedis.BinaryJedis.auth(BinaryJedis.java:2139)

at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:108)

at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)

【问题原因】

Redis服务器没有设置密码,但客户端向其发送了AUTH(authentication,身份验证)请求。

【解决办法】

确定Redis启动时指定是哪个配置文件。

如上图是 redis.windows.conf 文件,用文本编辑工具打开文件,找到“requirepass”,去掉注释设置密码。

编辑完后保存,重新启动Redis,再运行程序,OK。

Java链接Redis时出现 “ERR Client sent AUTH, but no password is set”的更多相关文章

  1. Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法

    Java链接Redis时出现 "ERR Client sent AUTH, but no password is set" 异常的原因及解决办法 [错误提示] redis.clie ...

  2. Tomcat redis session manager connect redis show: ERR Client sent AUTH, but no password is set

    解决问题redis问题:ERR Client sent AUTH, but no password is set - 东篱煮酒 - 博客园https://www.cnblogs.com/niepeis ...

  3. 解决问题redis问题:ERR Client sent AUTH, but no password is set

    是的,这又是一个坑爹的问题. 明明在redis.conf中设置了密码,而且redis还启动了,为什么说没有密码呢? 大家都知道linux下启动redis有很多种方法, 其中有 ./redis-serv ...

  4. 连接redis错误:ERR Client sent AUTH, but no password is set

    问题原因:没有设置redis的密码 解决:命令行进入Redis的文件夹: D:\Redis-x64-3.2.100>redis-cli.exe 查看是否设置了密码: 127.0.0.1:6379 ...

  5. java程序启动redis报错ERR Client sent AUTH, but no password is set

    配置文件中注释掉password一句 重启程序即可

  6. 【java异常】【redis】ERR Client sent AUTH, but no password is set

    项目中使用jedis或redisson连接redis时,如果redis没有密码,但在配置文件中写为 spring: redis: database: 0 host: 127.0.0.1 passwor ...

  7. Redis错误:jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

    原文链接:http://blog.csdn.net/rchm8519/article/details/48347797 redis.clients.util.Pool.getResource(Pool ...

  8. redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

    使用哨兵模式连接redis连接池时,遇到错误: Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sen ...

  9. 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379]

    問題 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379] 解決 啟動 ...

随机推荐

  1. [C++] 习题 2.14 用队列实现桶排序

    目录 前置技能 队列(已在上篇提到栈的时候顺便提到了,不再赘述) 桶排序 具体实现 由用户输入n个10以内的数,每输入i(0≤i≤9),就把它插入第i号队列中,最后把10个队列中的非空队列,按队列号从 ...

  2. 剑指offer64:滑动窗口的最大值

    1 题目描述 给定一个数组和滑动窗口的大小,找出所有滑动窗口里数值的最大值.例如,如果输入数组{2,3,4,2,6,2,5,1}及滑动窗口的大小3,那么一共存在6个滑动窗口,他们的最大值分别为{4,4 ...

  3. Python random模块(以后用到一个再更新一个)

    random模块是产生随机数的模块 1.random.random() 这是产生0~1之间一个随机浮点数,但是不会包括1 import random num = 0 while num < 10 ...

  4. 图像处理库 Pillow与PIL

    PIL只支持python2的版本到2.7: Python imaging Library : Pillow 是PIL派生的一个分支,支持3以上Python版本. 命令使用pip安装: pip inst ...

  5. CH09 开机自动烧录QSPI

    版本信息: 版本 REV2018 时间 05/22/2018       XILINX ZYNQ LINUX篇 基于米联MZ7X系列                       电子版自学资料   常 ...

  6. linux安装imagemagick,centos安装imagemagick方法

    1.安装文件格式支持库 yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype- ...

  7. MySQL 索引机制

    MySQL 原理篇 MySQL 索引机制 MySQL 体系结构及存储引擎 MySQL 语句执行过程详解 MySQL 执行计划详解 MySQL InnoDB 缓冲池 MySQL InnoDB 事务 My ...

  8. Ubuntu下添加定时任务执行php文件

    //添加自动下载定时任务1. vim /etc/crontab2. 添加 #每5分钟执行一次*/5 * * * * root /usr/bin/php /home/wwwroot/123.php3. ...

  9. python 复制列表

    python的变量仅仅是指向对象的标签,所以在操作列表的时候,list1 = list2这种做法只会复制一个标签,然后指向对象,并非生成一个新的对象. 大致有5中方法可以复制列表: a = [1,2, ...

  10. mysql limit和offset用法

    limit和offset用法 mysql里分页一般用limit来实现 1. select* from article LIMIT 1,3 2.select * from article LIMIT 3 ...