通过StackExchange.Redis无法重新连接到Azure中的Redis [英] Can't reconnect to Azure Redis via StackExchange.Redis
问题描述
买者的:好了,所以这是一个奇怪的一个,我不知道如果是的话是正确的地方
我有一个Azure的网站连接到Azure的Redis的缓存实例。 (使用StackExchange.Redis)
一切是伟大的,后来有一天 - 网站couln't连接到Redis的
错误:
这是不可能连接到redis的服务器(S);以创建断开连接多路复用器,禁用AbortOnConnectFail。 SocketFailure上PING
下面是我的连接字符串:
mycache.redis.cache.windows.net,SSL = TRUE,密码= XXXXXX,syncTimeout = 5000
下面是我的诊断步骤:
- 尝试,并从地方到Azure的Redis的连接。结果是:成功(?因此code为好)
- 尝试和升速新的Azure Redis的情况下,从Azure的连接。结果:FAIL(?网站无法连接到任何蔚蓝Redis的实例)
- 在提速过程所需新Azure的网站,用同样的code的示数code,指向现有的Redis缓存。结果是:成功(?嗯,什么)
- 文件新的MVC的网站,加入StackExchange.Redis,部署到新的Azure网站,连接到Redis的。结果是:成功(?所以Redis的还是不错的)
- 在部署上述香草MVC的网站的现有的Azure的网站(所以同样的code为4,连接到同一个Redis的,唯一的区别在于它使用了旧的Azure网站物理计算机/网络)。结果:FAIL(WTF?)
所以 - 我想的Redis已经列入黑名单的Azure的网站? (是,即使可能吗?)我知道的客户的(我的code)将不会尝试重新连接保持,但我反弹的网站很多次,它只是不能重新连接到Redis的。
这纺了的新的Azure的网站,事实上与一样code 的连接到的一样Redis的实例的结果成功,告诉我,某种黑名单/路由问题的Azure / Redis的已发生。
任何想法?
修改的
看起来问题是天青VNET。当我的网站是在Azure虚拟网络的一部分,它不能连接到Redis的。但是,当我走在网络它的出的,它连接的罚款。在今天之前,这种设置是工作的罚款。
所以,我想知道是否天青作出了变化,从而在互联星空网站无法连接到Azure的Redis的? (是没有意义的,我知道)
编辑2 的:
附从Redis的连接尝试的日志。
例外:这是不可能连接到redis的服务器(S);至 创建断开连接多路复用器,禁用AbortOnConnectFail。 SocketFailure上PING 连接字符串,删除:6380,密码= 密码删除,SSL = TRUE 连接连接字符串,删除:6380 /互动... BeginConnect:连接字符串,删除:6380 1独特的节点 指定请求从抢七的连接字符串,删除:6380
__ Booksleeve_TieBreak ...允许端点00:00:05回应...等待任务完成,IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000), 工人:(BUSY = 4,免费= 32763,最小为1,最大值= 32767)并非所有任务完成 干净,IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 5,免费= 32762,最小为1,最大值= 32767)的连接字符串,删除:6380 没有回应等待任务完成,IOCP: (BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 5,免费= 32762,最小为1,最大值= 32767)并非所有的任务完成了干净, IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 5,免费= 32762,最小为1,最大值= 32767)的连接字符串,删除:6380 未能提名(WaitingForActivation)无大师检测 连接字符串,删除:6380:独立V2.0.0,硕士;保持活动:00:01:00; INT:连接;子:连接;不再用: DidNotRespond 连接字符串,删除:6380:INT OPS = 0,屈= 2, QS = 0,QC = 0,WR = 0,袜子= 1;子OPS = 0,曲= 0,QS = 0,QC = 0,WR = 0,袜子= 1 循环运算数的快照; INT:0(0.00 OPS /秒;跨越10秒);分:0 (0.00 OPS /秒;跨越10秒)同步超时:0;射后不理:0;持续 心跳:-1s前重新连接失败重试...重试; 企图离开:2 ... 1独特的节点指定的请求从抢七 连接字符串,删除:6380> __Booksleeve_TieBreak ...允许端点00:00:05回应...等待任务完成,IOCP: (BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 6,免费= 32761,最小为1,最大值= 32767)并非所有的任务完成了干净, IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 7,免费= 32760,最小为1,最大值= 32767)的连接字符串,删除:6380 没有回应等待任务完成,IOCP: (BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 7,免费= 32760,最小为1,最大值= 32767)并非所有的任务完成了干净, IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 7,免费= 32760,最小为1,最大值= 32767)的连接字符串,删除:6380 未能提名(WaitingForActivation)无大师检测 连接字符串,删除:6380:独立V2.0.0,硕士;保持活动:00:01:00; INT:连接;子:连接;不再用: DidNotRespond 连接字符串,删除:6380:INT OPS = 0,屈= 2, QS = 0,QC = 0,WR = 0,异步= 3,袜子= 2;子OPS = 0,曲= 0,QS = 0,QC = 0,WR = 0, 袜子= 2圆形运数的快照; INT:0(0.00 OPS /秒;跨越10秒); 子:0(0.00 OPS /秒;跨越10秒)同步超时:0;射后不理:0; 最后的心跳:-1的前重置连接失败重试... 重试;企图离开:1 ... 1独特的节点指定的请求 抢七从连接字符串,删除:6380> __Booksleeve_TieBreak ...允许端点00:00:05回应...等待任务完成,IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000), 工人:(BUSY = 8,免费= 32759,最小为1,最大值= 32767)EndConnect: 连接字符串,删除:6380(套接字关闭)连接完成:连接字符串,删除:6380所有任务完成干净利落,IOCP:(BUSY = 0,自由= 1000 ,最小为1,最大= 1000),工人: (BUSY = 11,免费= 32756,最小为1,最大值= 32767) 连接字符串,删除:6380故障:SocketFailure上PING等待任务完成,IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000), 工人:(BUSY = 11,免费= 32756,最小为1,最大值= 32767)并非所有任务完成 干净,IOCP:(BUSY = 0,自由= 1000,最小为1,最大= 1000),工人: (BUSY = 7,免费= 32760,最小为1,最大值= 32767)的连接字符串,删除:6380 未能提名(WaitingForActivation)无大师检测 连接字符串,删除:6380:独立V2.0.0,硕士;保持活动:00:01:00; INT:连接;子:连接;不再用: DidNotRespond 连接字符串,删除:6380:INT OPS = 0,屈= 2, QS = 0,QC = 0,WR = 0,异步= 7,袜子= 3;子OPS = 0,曲= 0,QS = 0,QC = 0,WR = 0, 袜子= 3圆形运数的快照; INT:0(0.00 OPS /秒;跨越10秒); 子:0(0.00 OPS /秒;跨越10秒)同步超时:0;射后不理:0; 最后的心跳:-1s前
谁能破译这个?
我的Azure的Web应用程序的团队 - 它看起来像你的互联星空钻进了特别奇怪的状态,并中断网络连接为您的应用程序。我已经解决了这个问题。
我们是令人难以置信的深表歉意......
Caveat: Okay so this is a weird one, and i'm not sure if SO is the right place.
I have an Azure Website connecting to an Azure Redis Cache instance. (using StackExchange.Redis)
Everything was great, then one day - the website couln't connect to Redis.
Error:
It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING
Here's my connection string:
mycache.redis.cache.windows.net,ssl=true,password=xxxxxx,syncTimeout=5000
Here were my diagnosis steps:
- Try and connect from local to Azure Redis. Result: SUCCESS (so code is good?)
- Try and spinup NEW Azure Redis instance, connect from Azure. Result: FAIL (website can't connect to ANY azure Redis instance?)
- Spinup NEW Azure Website, with same code as erroring code, pointing to existing Redis cache. Result: SUCCESS (um, what?)
- File new MVC website, add StackExchange.Redis, deploy to new Azure Website, connecting to Redis. Result: SUCCESS (so Redis is good?)
- Deploy above vanilla MVC website to existing Azure Website (so same code as 4, connecting to same Redis, only difference is it's using the old Azure Website physical machine/networking). Result: FAIL (wtf??)
So - i'm thinking Redis has "blacklisted" the Azure website? (is that even possible?) I know that the client (my code) won't try and keep reconnecting, but i've bounced the site many times, and it just can't reconnect to Redis.
The fact that spinning up a new Azure Website, with the same code connecting to the same Redis instance results in success, tells me that some kind of blacklisting/routing issue has occured in Azure/Redis.
Any ideas?
EDIT
Looks like the problem is Azure VNET. When my website is part of the Azure Virtual Network, it can't connect to Redis. But when i take it out of the network, it connects fine. Before today, this setup was working fine.
So im wondering if Azure has made a change so that websites in a VNET cannot connect to Azure Redis? (makes no sense i know)
EDIT 2:
Attached is the logs from the Redis connection attempt.
Exception: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING connection-string-removed:6380,password=password-removed,ssl=True Connecting connection-string-removed:6380/Interactive... BeginConnect: connection-string-removed:6380 1 unique nodes specified Requesting tie-break from connection-string-removed:6380
__Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=4,Free=32763,Min=1,Max=32767) Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=5,Free=32762,Min=1,Max=32767) connection-string-removed:6380 did not respond Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=5,Free=32762,Min=1,Max=32767) Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=5,Free=32762,Min=1,Max=32767) connection-string-removed:6380 failed to nominate (WaitingForActivation) No masters detected connection-string-removed:6380: Standalone v2.0.0, master; keep-alive: 00:01:00; int: Connecting; sub: Connecting; not in use: DidNotRespond connection-string-removed:6380: int ops=0, qu=2, qs=0, qc=0, wr=0, socks=1; sub ops=0, qu=0, qs=0, qc=0, wr=0, socks=1 Circular op-count snapshot; int: 0 (0.00 ops/s; spans 10s); sub: 0 (0.00 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago resetting failing connections to retry... retrying; attempts left: 2... 1 unique nodes specified Requesting tie-break from connection-string-removed:6380 > __Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=6,Free=32761,Min=1,Max=32767) Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=7,Free=32760,Min=1,Max=32767) connection-string-removed:6380 did not respond Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=7,Free=32760,Min=1,Max=32767) Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=7,Free=32760,Min=1,Max=32767) connection-string-removed:6380 failed to nominate (WaitingForActivation) No masters detected connection-string-removed:6380: Standalone v2.0.0, master; keep-alive: 00:01:00; int: Connecting; sub: Connecting; not in use: DidNotRespond connection-string-removed:6380: int ops=0, qu=2, qs=0, qc=0, wr=0, async=3, socks=2; sub ops=0, qu=0, qs=0, qc=0, wr=0, socks=2 Circular op-count snapshot; int: 0 (0.00 ops/s; spans 10s); sub: 0 (0.00 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago resetting failing connections to retry... retrying; attempts left: 1... 1 unique nodes specified Requesting tie-break from connection-string-removed:6380 > __Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=8,Free=32759,Min=1,Max=32767) EndConnect: connection-string-removed:6380 (socket shutdown) Connect complete: connection-string-removed:6380 All tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=11,Free=32756,Min=1,Max=32767) connection-string-removed:6380 faulted: SocketFailure on PING Awaiting task completion, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=11,Free=32756,Min=1,Max=32767) Not all tasks completed cleanly, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=7,Free=32760,Min=1,Max=32767) connection-string-removed:6380 failed to nominate (WaitingForActivation) No masters detected connection-string-removed:6380: Standalone v2.0.0, master; keep-alive: 00:01:00; int: Connecting; sub: Connecting; not in use: DidNotRespond connection-string-removed:6380: int ops=0, qu=2, qs=0, qc=0, wr=0, async=7, socks=3; sub ops=0, qu=0, qs=0, qc=0, wr=0, socks=3 Circular op-count snapshot; int: 0 (0.00 ops/s; spans 10s); sub: 0 (0.00 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago
Can anyone decipher this?
I'm with the Azure Web Apps team - it looks like your VNET got into a particularly strange state, and was interrupting network connectivity for your app. I have fixed this behavior.
We are incredibly sorry for the inconvenience...
这篇关于通过StackExchange.Redis无法重新连接到Azure中的Redis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!