I'm trying with Sitecore 8.2 and Sitecore 9.0.2 to change the session state provider from inproc to AWS hosted Redis session provider and get the following exception:
[RedisConnectionException: No connection is available to service this operation: EVAL] StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl(Message message, ResultProcessor
1 processor, ServerEndPoint server) +690 StackExchange.Redis.RedisBase.ExecuteSync(Message message, ResultProcessor
1 processor, ServerEndPoint server) +122 StackExchange.Redis.RedisDatabase.ScriptEvaluate(String script, RedisKey[] keys, RedisValue[] values, CommandFlags flags) +141 Sitecore.SessionProvider.Redis.<>c__DisplayClass12_0.b__0() +55 Sitecore.SessionProvider.Redis.StackExchangeClientConnection.RetryForScriptNotFound(Func1 redisOperation) +140 Sitecore.SessionProvider.Redis.StackExchangeClientConnection.RetryLogic(Func
1 redisOperation) +144 Sitecore.SessionProvider.Redis.StackExchangeClientConnection.Eval(String script, String[] keyArgs, Object[] valueArgs) +609 Sitecore.SessionProvider.Redis.RedisConnectionWrapper.TryTakeWriteLockAndGetData(String sessionId, DateTime lockTime, Object& lockId, ISessionStateItemCollection& data, Int32& sessionTimeout) +352 Sitecore.SessionProvider.Redis.RedisSessionStateProvider.GetItemFromSessionStore(Boolean isWriteLockRequired, HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +1113 Sitecore.SessionProvider.Redis.RedisSessionStateProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +225 System.Web.SessionState.SessionStateModule.GetSessionStateItem() +169 System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1002 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +689 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131
This is what I changed in my web.config (Sitecore 8.2):
<sessionState mode="Custom" customProvider="redis" timeout="20">
<providers>
<add name="redis" type="Sitecore.SessionProvider.Redis.RedisSessionStateProvider,Sitecore.SessionProvider.Redis" connectionString="session" pollingInterval="2" applicationName="private"/>
</providers>
</sessionState>
This is the AWS Redis endpoint defined in my connectionString.config (Sitecore 8.2)
<add name="session" connectionString="example.cache.amazonaws.com:6000,password=xxxx,ssl=true,abortConnect=False" />
I am doubting that StackExchange.Redis version used by Sitecore.SessionProvider.Redis is 1.0.488 and this maybe the cause of the issue.
I wonder if anyone else has come across a similar exception using Redis provider on AWS. Appreciate any pointers to troubleshoot the issue.
UPDATED: Sitecore logs showing connection to Redis
33488 15:15:31 INFO All tasks are already complete 33488 15:15:31 INFO example.cache.amazonaws.com:6000 failed to nominate (Faulted) 33488 15:15:31 INFO > UnableToResolvePhysicalConnection on GET 33488 15:15:31 INFO No masters detected 33488 15:15:31 INFO example.cache.amazonaws.com:6000 Cluster v4.0.10, slave; keep-alive: 00:01:00; int: Connecting; sub: ConnectedEstablished, 1 active; not in use: DidNotRespond 33488 15:15:31 INFO example.cache.amazonaws.com:6000: int ops=8, qu=0, qs=0, qc=2, wr=0, sync=9, socks=2; sub ops=4, qu=0, qs=0, qc=0, wr=0, subs=1, sync=4, socks=1 33488 15:15:31 INFO Circular op-count snapshot; int: 0+8=8 (0.80 ops/s; spans 10s); sub: 0+4=4 (0.40 ops/s; spans 10s) 33488 15:15:31 INFO Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago 33488 15:15:31 INFO resetting failing connections to retry... 33488 15:15:31 INFO retrying; attempts left: 2... 33488 15:15:31 INFO 1 unique nodes specified 33488 15:15:31 INFO Requesting tie-break from example.cache.amazonaws.com:6000 > __Booksleeve_TieBreak... 33488 15:15:31 INFO Allowing endpoints 00:00:05 to respond... 33488 15:15:31 INFO Awaiting task completion, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=4,Free=32763,Min=4,Max=32767) 33488 15:15:31 INFO All tasks completed cleanly, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=3,Free=32764,Min=4,Max=32767) 33488 15:15:31 INFO example.cache.amazonaws.com:6000 returned, but incorrectly 33488 15:15:31 INFO Awaiting task completion, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=3,Free=32764,Min=4,Max=32767) 29412 15:15:31 INFO Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=2,Free=32765,Min=4,Max=32767) 29412 15:15:31 INFO example.cache.amazonaws.com:6000 failed to nominate (WaitingForActivation) 29412 15:15:31 INFO No masters detected