You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
重新描述一下问题
应用redission连接哨兵,哨兵配置了三个地址,代码在调用到SentinelConnectionManager的public SentinelConnectionManager(SentinelServersConfig cfg, Config configCopy)方法时,for循环中可以获取到三个地址,但是在验证方法if (NetUtil.createByteArrayFromIpAddressString(addr.getHost()) == null && !addr.getHost().equals("localhost")) {
sentinelHosts.add(addr);
}
中,因为NetUtil.createByteArrayFromIpAddressString(addr.getHost()) 有返回值,不是空,
导致地址不能添加到哨兵地址中,最终会导致无法连接。
异常后系统会报org.redisson.client.RedisConnectionException Create breakpoint:SENTINEL SENTINELS command returns less than 2 nodes or connection can't be established to some of them!
lcwlv929
changed the title
SentinelConnectionManager管理类中的NetUtil.createByteArrayFromIpAddressString(addr.getHost()) == null是什么意思呢
SentinelConnectionManager管理类中的NetUtil.createByteArrayFromIpAddressString(addr.getHost()) == null这个条件是不是有问题呢
May 11, 2024
SentinelConnectionManager管理类中的NetUtil.createByteArrayFromIpAddressString(addr.getHost()) == null判断条件在什么时候为空,是不是应该写成不为空的时候
添加sentinelHosts.add(addr);
这方法的意思是哨兵地址的时候添加,还是没有哨兵地址的时候添加,
The text was updated successfully, but these errors were encountered: