redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, but seems to be not monitored.
在使用Redis的哨兵Sentinel配置时,报错如下:
redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, but myMaster seems to be not monitored.
报错原因:
可能是因为哨兵配置sentinel.conf中的服务器名称,和程序中哨兵连接池配置的服务器名称不一致导致的。
解决方法:
查看哨兵配置 sentinel.conf,如下:
sentinel monitor mymaster 192.168.0.102 6379 2
其中的 哨兵配置中的服务器名称为 mymaster。
接着再看java程序中的JedisSentinelPool配置的哨兵名称:
JedisSentinelPool sentinelPool=new JedisSentinelPool("myMaster",sentinelSet,jedisPoolConfig);
程序中的服务器名称为myMaster。
可以看到,sentinel.conf中配置的服务器名称和程序中的服务器名称不一样,因此报错。。将程序中的服务器名称改正就解决了。
redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, but seems to be not monitored.的更多相关文章
- 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 ...
- Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
问题: java连接不上redis. 异常信息: Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.ne ...
- redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect time out
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect ti ...
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
超时 Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: jav ...
- 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 ...
- ERR Unsupported CONFIG parameter: notify-keyspace-events; nested exception is redis.clients.jedis.exceptions.JedisDataException
异常信息 时间:2017-04-05 15:53:57,361 - 级别:[ WARN] - 消息: [other] The web application [ROOT] appears to hav ...
- redis报错:java.net.SocketException: Broken pipe (Write failed); nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed)
最近写了一个服务通过springboot构建,里面使用了redis作为缓存,发布到服务器运行成功,但是有时候会报redis的错误:org.springframework.data.redis.Redi ...
- redis.clients.jedis.exceptions.JedisDataException: ERR invalid DB index
添加redis配置文件, 启动后,调用报错 redis.clients.jedis.exceptions.JedisDataException: ERR invalid DB index ERR i ...
- jedisCluster 报错: redis.clients.jedis.exceptions.JedisClusterException: No way to dispatch this command to Redis Cluster because keys have different slots.
根本原因:jedisCluster不支持mget/mset等跨槽位的操作. 版本:2.9.0 解决办法,推荐更改redis的驱动修改为: lettuce lettuce 项目地址:https://gi ...
随机推荐
- 31.用 CSS 的动画原理,创作一个乒乓球对打动画
原文地址:https://segmentfault.com/a/1190000015002553 感想:纯属动画 HTML代码: <div class="court"> ...
- MVC基于角色权限控制--管理角色
管理角色分为 添加角色.删除角色.修改角色.给角色分配权限(修改角色权限) 新建RoleInfoController继承BaseController namespace CZBK.ItcastOA.W ...
- H5视频推流方案
导语 随着直播平台爆发式增长,直播平台从 PC 端转战移动端,紧跟着直播的潮流,自己学习实现了一套简单的 H5 视频推流的解决方案,下面就给小伙伴们分享一下自己学习过程中的经验. 环境部署 1. 配置 ...
- 【转】Django 图表制作(By Highcharts)
马克,待不时之需 Django 图表制作(By Highcharts):https://blog.csdn.net/Temanm/article/details/54141759 免费而优秀的图表JS ...
- golang 字符串截取
java中有SubString,那golang怎么截取字符串? str := "hello world" fmt.Print(str[:]) 以上代码输出 hello 数组,sli ...
- [ilink32 Error] Fatal: Unable to open file 'SDDEBUG.OBJ'
[ilink32 Error] Fatal: Unable to open file 'SDDEBUG.OBJ' 这个路径NativeXml407\general\sdDebug.pas找不到了 修正 ...
- synchronized 和 lock 的区别
1.Lock不是Java语言内置的,synchronized是Java语言的关键字,因此是内置特性.Lock是一个类,通过这个类可以实现同步访问: 2.Lock和synchronized有一点非常大的 ...
- JAVA企业级快速开发平台,JEECG 3.7.3 新春版本发布
JEECG 3.7.3新春版本发布 - 微云快速开发平台 导读 ⊙精美Echart报表 ⊙二维码生成功能 ⊙Online接口改造采用JWT机制 ⊙智能菜单搜索 ⊙代码生成器模板优 ...
- ReentrantLock 学习笔记
有篇写的很不错的博客:https://blog.csdn.net/aesop_wubo/article/details/7555956 基于JDK1.8 参考着看源码 ,弄清楚lock()和un ...
- The Google File System——论文详解(转)
“Google文件存储系统(GFS)是构建在廉价服务器之上的大型分布式系统.它将服务器故障视为正常现象,通过软件方式自动容错,在保证系统可用性和可靠性同时,大大降低系统成本. GFS是Google整个 ...