我正在将系统转向生产,其中一部分涉及将用于身份验证缓存的REDIS服务器从开发盒上运行的服务更改为更合适的环境。新盒子(现在)配置为主机和奴隶密码
我连接REDIS的代码遵循标准模式:
container.Register<IRedisClientsManager>(c => new PooledRedisClientManager("localhost:6379"));
container.Register<ICacheClient>(c => (ICacheClient)c.Resolve<IRedisClientsManager>().GetCacheClient());
对于新框,我将其修改为:
string[] ReadWriteHosts = new[] {
"XYZ@10.10.10.10:6379"
};
string[] ReadOnlyHosts = new[] {
"XYZ@10.10.10.11:6379"
};
var REDISClientManager = new PooledRedisClientManager(ReadWriteHosts, ReadOnlyHosts);
container.Register<IRedisClientsManager>(REDISClientManager);
container.Register<ICacheClient>(c => (ICacheClient)c.Resolve<IRedisClientsManager>().GetCacheClient());
当我启动应用程序并尝试登录时,我会收到:
'base.UserSession' threw an exception of type 'ServiceStack.Redis.RedisResponseException'
"Client sent AUTH, but no password is set, sPort: 0, LastCommand: "
我还没有成功地完成任务,只是想知道是否有人能看到任何明显错误的东西。