[英]Unable to connect AWS Redis cache in .net C# - RedisConnectionException: 'No connection is active/available to service this operation
I have created AWS ElasticCache - redisCache in console.我在控制台中创建了 AWS ElasticCache - redisCache。 I want to access same from .net core/framework application - But unable to connect same.
我想从 .net core/framework 应用程序访问相同的内容 - 但无法连接相同的内容。
ConfigurationOptions option = new ConfigurationOptions
{
AbortOnConnectFail = false,
Ssl = true,
ConnectTimeout =5000,
KeepAlive = 2,
EndPoints = { "xxxxxxxxxx.cache.amazonaws.com:6379" }
};
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(option);
IDatabase db = redis.GetDatabase();
string value = "abcdefg";
db.StringSet("mykey", value);
string getValue = db.StringGet("mykey");
return getValue;
Gettitng below error - Gettitng 低于错误 -
StackExchange.Redis.RedisConnectionException: 'No connection is active/available to service this operation: SET mykey; StackExchange.Redis.RedisConnectionException:'没有连接处于活动状态/可用于服务此操作:SET mykey; UnableToConnect on xxxxx.cache.amazonaws.com:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 5s ago, last-write: 5s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 5s ago, v: 2.2.88.56325, mc: 1/1/0, mgr: 10 of 10 available, clientName: machineId, IOCP: (Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=1,Free=32766,Min=8,Max=32767), v: 2.2.88.56325'
UnableToConnect on xxxxx.cache.amazonaws.com:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, 未完成: 0, last-read: 5s ago, last-write: 5s ago, keep-alive: 60s,状态:正在连接,mgr:10 个中的 10 个可用,最后一次心跳:从不,全局:5 秒前,v:2.2.88.56325,mc:1/1/0,mgr:10 个中的 10 个可用,clientName:machineId,IOCP:( Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=1,Free=32766,Min=8,Max=32767), v: 2.2.88.56325'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.