哨兵执行start()方法时,将抛出一个异常,即没有Redis哨兵可用。 我尝试了两种方法,但都没有用。
_redisManager = new RedisSentinel("123421@47.100.237.179:16379,123421@47.100.237.179:16380".Split(',')).Start();
异常消息:OneTimeSetUp:ServiceStack.Redis.RedisException:否 Redis Sentinels可用 ----> ServiceStack.Redis.RedisResponseException:未知命令'AUTH'
_redisManager = new RedisSentinel("47.100.237.179:16379,47.100.237.179:16380".Split(',')).Start();
异常消息:OneTimeSetUp:ServiceStack.Redis.RedisException:否 Redis Sentinels上市了-> ServiceStack.Redis.RedisException:Redis Sentinel报告否 主人可用
答案 0 :(得分:0)
似乎您没有指定主名称:
var sentinelHosts = new[]{ "47.100.237.179:16379", "47.100.237.179:16380" };
var sentinel = new RedisSentinel(sentinelHosts, masterName: "mymaster");
IRedisClientsManager redisManager = sentinel.Start();