项目中使用jedis或redisson连接redis时,如果redis没有密码,但在配置文件中写为

spring:
  redis:
    database: 0
    host: 127.0.0.1
    password:
    port: 6379
    timeout: 10000
通常会报错: ERR Client sent AUTH, but no password is set

原因分析:把上面的文字翻译其实就知道了,客户端设置了auth认证,但没设置密码。

解决方案-:
  在redis配置文件中redis.conf加入:

requirePass: 你的密码

解决方案二:
  把上面的配置中password一行去掉,既然没密码,就不要写。

spring:
  redis:
    database: 0
    host: 127.0.0.1
    port: 6379
    timeout: 10000

方案二才是根本,既然没密码,就不要写。写个password,后面却没密码,当然要报错。

【java异常】【redis】ERR Client sent AUTH, but no password is set的更多相关文章

  1. 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 ...

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

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

  3. Java链接Redis时出现 “ERR Client sent AUTH, but no password is set”

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

  4. 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 ...

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

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

  6. 鏈接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] 解決 啟動 ...

  7. 连接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 ...

  8. 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 ...

  9. 解决ERR Client sent AUTH, but no password is set

    在搭建cookies池时,需要将账号密码保存到redis,保存时报错:ERR Client sent AUTH, but no password is set 报错原因:Redis服务器没有设置密码, ...

随机推荐

  1. java8 HashTable 原理

    HashTable原理 Hashtable是基于陈旧的Dictionary类的,HashMap是Java 1.2引进的Map接口的一个实现.Hashtable中的方法是同步的,而HashMap方法(在 ...

  2. Golang(八)go modules 学习

    0. 前言 最近加入鹅厂学习 k8s,组内使用 Go 1.11 以上的 go modules 管理依赖,因此整理了相关资料 本文严重参考原文:初窥Go module 1. 传统 Golang 包依赖管 ...

  3. Data Science: An overview

    Week 1 Data Science: An overview Objective: 1.Is data science the same as statistics or analysis? st ...

  4. HUSKY CLOCK1.0上线啦!

    有人需要HUSKY CLOCK1.0下载资源的请联系1335415335@qq.com! 感谢支持,您的认可是我们前进的动力!

  5. Zookeeper在linux上的安装

    1:进入 cd  /usr/local目录下 2:创建zookeeper目录  midir zookeeper 3:将压缩包复制到zookeeper目录下  cp /root/zookeeper/zo ...

  6. 关于stm32f10x_conf.h文件

    简介 stm32f10x_conf.h文件有2个作用:①提供对assert_param运行时参数检查宏函数的定义.②将开发者用到的标准外设头文件集中在这个文件里面,而stm32f10x_conf.h又 ...

  7. GitBook基本使用

    1.安装 Node.js:https://nodejs.org/en/ 2.安装 GitBook: npm install gitbook-cli -g gitbook -V  #查看gitbook是 ...

  8. spring boot 在eclipse里启动正常,但打包后启动不起来

    现象描述: spring boot 在eclipse里启动正常,但打包后启动不起来. 错误日志如下: D:\Project>java -jar MKKY_CMS.jar . ____ _ __ ...

  9. Java反射获取泛型类型

    本文链接:https://blog.csdn.net/hongxingxiaonan/article/details/49202613 在Java反射技术的应用中,取得一个类的成员.方法和构造函数相对 ...

  10. .NET设计模式-观察者模式

    Observer(观察者模式) 定义对象间的一种一对多的依赖关系,以便当一个对象的状态发生改变时,所有依赖于它的对象都得到通知并自动刷新. 说白了就是事件. using System; namespa ...