Fork me on GitHub

阿里云 Redis 服务遇到的问题

ERR unknown command eval 
 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

 异常详细信息: StackExchange.Redis.RedisServerException: ERR unknown command eval

源错误: 

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪: 

[RedisServerException: ERR unknown command eval]
   StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl(Message message, ResultProcessor`1 processor, ServerEndPoint server) +3128
   StackExchange.Redis.RedisBase.ExecuteSync(Message message, ResultProcessor`1 processor, ServerEndPoint server) +122
   StackExchange.Redis.RedisDatabase.ScriptEvaluate(String script, RedisKey[] keys, RedisValue[] values, CommandFlags flags) +279
   Microsoft.Web.Redis.<>c__DisplayClass4.<Eval>b__3() +55
   Microsoft.Web.Redis.StackExchangeClientConnection.RetryForScriptNotFound(Func`1 redisOperation) +135
   Microsoft.Web.Redis.StackExchangeClientConnection.RetryLogic(Func`1 redisOperation) +144
   Microsoft.Web.Redis.StackExchangeClientConnection.Eval(String script, String[] keyArgs, Object[] valueArgs) +542
   Microsoft.Web.Redis.RedisConnectionWrapper.Set(ISessionStateItemCollection data, Int32 sessionTimeout) +89
   Microsoft.Web.Redis.RedisSessionStateProvider.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +833
   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +909
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

咨詢阿里雲的技術人員,默認阿里云redis服务不支持eval命令,但是可以人工開通。

连接字符串问题

//MS
//var conn = ConnectionMultiplexer.Connect("contoso5.redis.cache.windows.net,ssl=true,password=...");

//实例ID.redis.rds.aliyuncs.com:6379,password=实例ID:密码
//var connection = ConnectionMultiplexer.Connect("r-uf6e12fbebe0a0e4.redis.rds.aliyuncs.com:6379,password=r-uf6e12fbebe0a0e4:xxx");

 

posted @ 2016-10-26 17:52  花儿笑弯了腰  阅读(5958)  评论(0编辑  收藏  举报