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. IOS微信浏览器返回事件监听问题

    业务需求:从主页进入A订单页面,然后经过各种刷新或点标签加载后点左上角的返回直接返回到主页 采取方法:采用onpopstate事件监听url改变,从而跳转到主页 遇到的问题:安卓上测试没问题:苹果手机 ...

  2. 2019牛客多校八 H. How Many Schemes (AC自动机,树链剖分)

    大意: 给定树, 每条边有一个字符集合, 给定$m$个模式串, $q$个询问$(u,v)$, 对于路径$(u,v)$中的所有边, 每条边从对应字符集合中取一个字符, 得到一个串$s$, 求$s$至少包 ...

  3. ABP 基于DDD的.NET开发框架 学习(一)

    ABP总体介绍 ABP是ASP.NET Boilerplate Project,ASP.NET样板项目. ABP框架定位于快速开发 ABP是一个用于最快实践和流行开发现代Web应用程序的新起点,旨在成 ...

  4. java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapa

    java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapa 少导入包!spring-core-*.jar ...

  5. R_数据视觉化处理_中阶_05

    条形图:条形图通过垂直或水平的条形展示了类型变量的分布(频数).最简单的用法为:barplot(height),height为矩阵或向量. horiz=TRUE选项:表示水平,在此之前先使用table ...

  6. kvm第四章-- 虚拟化网络管理

  7. css常用代码大全

    css常用代码大全,html+css代码 html+css可以很方便的进行网页的排版布局,还能减少很多不必要的代码. 一.文本设置1.font-size: 字号参数 2.font-style: 字体格 ...

  8. Fortify漏洞之Path Manipulation(路径篡改)

    继续对Fortify的漏洞进行总结,本篇主要针对 Path Manipulation(路径篡改)的漏洞进行总结,如下: 1.Path Manipulation(路径篡改) 1.1.产生原因: 当满足以 ...

  9. [LeetCode] 300. 最长上升子序列 ☆☆☆(动态规划 二分)

    https://leetcode-cn.com/problems/longest-increasing-subsequence/solution/dong-tai-gui-hua-she-ji-fan ...

  10. 认识和学习redis

    redis VS mysql """ redis: 内存数据库(读写快).非关系型(操作数据方便) mysql: 硬盘数据库(数据持久化).关系型(操作数据间关系) 大量 ...