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 ... 
随机推荐
- 实用的DDos攻击工具
			来源: http://www.safecdn.cn/linux/2018/12/ddos/95.html  特别提示:仅用于攻防演练及教学测试用途,禁止非法使用 Hyenae 是在windows平台 ... 
- leetcode1004
			class Solution: def getMax(self,B:'List[int]'): n = len(B) maxlen = 0 curlen = 0 for i in range (n): ... 
- python内置函数使用
			print(abs(1)) #绝对值,正数就是自己 ",''])) #计算可迭代对象中是否为真,其中一个为假,就显示为假 print(all('')) # If the iterable i ... 
- NRF51822之RNG
			在裸机下官方已经提供另一个RNG的例子(RF51_SDK_10.0.0_dc26b5e\examples\peripheral\rng) 好了现在我将给出在蓝牙模式下如何使用例子 #include & ... 
- Spring Cloud (5)hystrix  服务熔断
			1.pom文件 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId&g ... 
- Activity工作流学习(二)--Activity数据库
			23张表 ACT_RE_资源库流程规划表 act_re_deployment 部署信息表 act_re_model 流程设计模型部署表 act_re_procdef 流程定义数据表 ACT_RU_运行 ... 
- 深度学习原理与框架-神经网络架构  1.神经网络构架 2.激活函数(sigmoid和relu) 3.图片预处理(减去均值和除标准差)  4.dropout(防止过拟合操作)
			神经网络构架:主要时表示神经网络的组成,即中间隐藏层的结构 对图片进行说明:我们可以看出图中的层数分布: input layer表示输入层,维度(N_num, input_dim) N_num表示输 ... 
- Oracle部署安装
			1.用户有数据库服务器则不需要安装Oracle服务器端,若没有需要安装 https://jingyan.baidu.com/article/363872eccfb9266e4aa16f5d.html ... 
- jquery事件绑定与事件委托
			//事件绑定简写形式 $(".div2 button").click(function () { $(".div1").scrollTop(0) }) //写全 ... 
- How to Pronounce the Numbers 1 – 10
			How to Pronounce the Numbers 1 – 10 Share Tweet Share Tagged With: Numbers Numbers are something you ... 
