jedis 连接 redis:Could not get a resource from the pool——我的出错原因和解决办法
windows 下安装的,本机使用
现象:刚装好开发使用好好的, 重启电脑后就报这个错
网上的所有可能都试过,没有用。
最后,放弃所有包装,用最原始的代码进行连接测试:
Jedis jedis=new Jedis("127.0.0.1");
jedis.auth("7777");//password
jedis.set("firstKey", "hello redis!");
ERR Client sent AUTH, but no password is set
于是,重新设置密码:
redis 127.0.0.1:6379> CONFIG SET requirepass "123456"
OK
redis 127.0.0.1:6379> AUTH 123456
Ok
问题解决!!!
可是,我之前明明设置了密码的,为什么一重启密码就不起作用了呢?
于是,关掉服务器,再打开,重新跑了一下测试代码,玛尼???这个错误又出来啦!!!
参见:
http://blog.csdn.net/rchm8519/article/details/48347797
jedis 连接 redis:Could not get a resource from the pool——我的出错原因和解决办法的更多相关文章
- 通过jedis连接redis单机成功,使用redis客户端可以连接集群,但使用JedisCluster连接redis集群一直报Could not get a resource from the pool
一,问题描述: (如题目)通过jedis连接redis单机成功,使用JedisCluster连接redis集群一直报Could not get a resource from the pool 但是使 ...
- redis使用问题一:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool] with root cause
本文使用的是spring-data-redis 首先说下redis最简单得使用,除去配置. 需要在你要使用得缓存得地方,例如mybatis在mapper.xml中加入: <cache evict ...
- 用Jedis连接Redis
jedis中的方法名,和Redis的命令几乎一样 1.jar包,作为测试只需要一个jar 2.代码 package com; import java.util.HashMap; import java ...
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
超时 Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: jav ...
- Java 使用Jedis连接Redis数据库(-)
redis 安装: Linux 安装redis 1)下载jar包: 使用Jedis需要以下两个jar包: jedis-2.8.0.jar commons-pool2-2.4.2.jar 2)测试red ...
- jedis 连接 redis
一.连接单机版的 redis /** * 直接连接 redis * @throws Exception */ @Test public void test1() throws Exception { ...
- jedis异常:Could not get a resource from the pool
前几天公司后端系统出现了故障,导致app多个功能无法使用,查看日志,发现日志出现较多的redis.clients.jedis.exceptions.JedisConnectionException: ...
- Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法
Java链接Redis时出现 "ERR Client sent AUTH, but no password is set" 异常的原因及解决办法 [错误提示] redis.clie ...
- pip install 提示代理连接失败原因及解决办法
# pip install 提示代理连接失败原因及解决办法 1. 错误提示 在公司电脑上安装Python的虚拟环境时输入命令: pip install virtualenv 系统提示以下异常信息: R ...
随机推荐
- 使用清华源和阿里源替代Ubuntu源
sudo nano /etc/apt/source.list 替换为如下文本 # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors. ...
- CentOS以守护进程的方式启动程序的另类用法daemon
在Linux下如果以守护进程的方式启动程序,也就是后台运行,有几种方式,比如后面带&&,nuhop,那么在CentOS下可以使用daemon这个函数来启动,比如: daemon --p ...
- word如何插入和删除脚注,尾注
在我们日常使用word时,经常会使用到脚注/尾注来对文中某些文字或内容进行注释或是重点说明,效果挺好,挺直观和明显.但是很多人并不会使用,特别是当需要删除脚注事,就特别苦恼了,那根小横线怎么也删除不掉 ...
- android.os.handler(转)
android.os.handler相关知识整理 Handler在android里负责发送和处理消息.它的主要用途有: 1)按计划发送消息或执行某个Runnanble(使用POST方法): 2)从其他 ...
- LOG EXPLORER ApexSQL Log
http://www.minisoft.cn/ https://www.apexsql.com/sql_tools_log.aspx
- delphi 游戏
http://www.cnblogs.com/devlyn/archive/2010/08/24/1807190.html
- CentOS 安装 Redis (高可用)
原文:https://www.sunjianhua.cn/archives/centos-redis.html 下载地址: http://download.redis.io/releases/ 官方文 ...
- cocos2d-x 清空缓存
如场景切换 在内存吃紧的情况下 我们可以选择 先清理一下缓存 // 清空缓存 CCDirector::sharedDirector()->purgeCachedData();
- HTML5学习笔记:跨域
在跨域安全性方面,有多个地方会有限制,主要是XMLHttpRequest对象的跨域限制和iFrame的跨域限制,下面我们分别来看一下. Ajax跨域(CORS) CORS是一个W3C标准,全称是&qu ...
- nodeJS 相关开源项目
摘要:NodeJS是一个服务器端JavaScript解释器,它将改变服务器应该如何工作的概念.它的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个(只有一个)物理机的连接代码 ...