2

I have following Error when trying to run applicaiton:

It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING

RedisConnectionException: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING]
StackExchange.Redis.ConnectionMultiplexer.Connect(ConfigurationOptions  configuration, TextWriter log) in c:\TeamCity\buildAgent\work\58bc9a6df18a3782\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:767
Microsoft.Web.Redis.StackExchangeClientConnection..ctor(ProviderConfiguration configuration) +263
Microsoft.Web.Redis.<>c__DisplayClass3.<.ctor>b__1() +26
Microsoft.Web.Redis.RedisSharedConnection.TryGetConnection() +107
Microsoft.Web.Redis.RedisConnectionWrapper..ctor(ProviderConfiguration configuration, String id) +334
Microsoft.Web.Redis.RedisSessionStateProvider.GetItemFromSessionStore(Boolean isWriteLockRequired, HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +997
Microsoft.Web.Redis.RedisSessionStateProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +128
System.Web.SessionState.SessionStateModule.GetSessionStateItem() +111
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +778
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +254
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Davit Sedrakyan
  • 317
  • 3
  • 17
  • See : http://stackoverflow.com/questions/30895507/it-was-not-possible-to-connect-to-the-redis-servers-to-create-a-disconnected – Steve Oct 19 '16 at 15:51
  • already saw that, not works for me – Davit Sedrakyan Oct 19 '16 at 15:58
  • Did you find an answer? – Signcodeindie Jan 14 '18 at 08:21
  • @Signcodeindie hey, problem was in project, but not with redis server. – Davit Sedrakyan Feb 26 '18 at 18:28
  • In general, that error means you cannot reach the Redis server. It can be caused by many things: wrong connection string, different network, firewall setup etc, etc. Try to ping Redis with telnet from the machine where your application fails – OlegI Feb 19 '20 at 18:15
  • Does this answer your question? [It was not possible to connect to the redis server(s); to create a disconnected multiplexer](https://stackoverflow.com/questions/30895507/it-was-not-possible-to-connect-to-the-redis-servers-to-create-a-disconnected) – ggorlen May 09 '23 at 00:15

1 Answers1

0

Most probably your connection time out is very less, also set AbortOnConnectFail to false . Below code is for reference hope it helps!

var config = new ConfigurationOptions()
            {
                KeepAlive = 0,
                AllowAdmin = true,
                EndPoints = { { "127.0.0.1", 6379 },{ "127.0.0.2", 6379 } },
                ConnectTimeout = 5000,
                ConnectRetry = 5,
                SyncTimeout = 5000,
                AbortOnConnectFail = false,
            };
Priya
  • 367
  • 3
  • 5