Azure的表的存储,如何避免连接错误(我试过重试) [英] Azure Table Storage, How to avoid connection error (I tried retry)

查看:122
本文介绍了Azure的表的存储,如何避免连接错误(我试过重试)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了很多错误,如无连接可以作出,因为目标机器积极地拒绝它70.37.127.112:443

所以我添加 Microsoft.P​​ractices.TransientFaultHandling 重试。

但尽管如此,很多错误(即使重试后)的

我想知道:

1,由于Azure是一个分布式的服务,为什么我总是达到70.37.127.112(我通过访问存储简单原始的 DefaultEndpointsProtocol = https和帐户名= STORAG​​E_ACCOUNT; ..... 然后用 tableContext.CreateQuery<数据类型>(表格名); )。我发现我的所有表(甚至在不同的存储帐户)全部命中70.37.127.112。我的问题,是有没有办法改变它?

2,如何消除上述完全错误?

错误的详细信息。

  System.Net.WebException:无法连接到远程服务器---> System.Net.Sockets.SocketException:无连接可以作出,因为目标机器积极地拒绝它70.37.127.112:443
   在System.Net.Sockets.Socket.DoConnect(端点endPointSnapshot,SocketAddress的SocketAddress的)
   在System.Net.ServicePoint.ConnectSocketInternal(布尔connectFailure,插座S4,S6插座,插座及放大器;插座,ip地址和放大器;地址,ConnectSocketState状态,IAsyncResult的asyncResult,超时的Int32,异常和放大器;除外)
   ---内部异常堆栈跟踪的结尾---
   在System.Net.HttpWebRequest.GetResponse()
   在System.Data.Services.Client.QueryResult.Execute()
   在System.Data.Services.Client.DataServiceRequest.Execute [TElement](DataServiceContext背景下,QueryComponents queryComponents)
   在System.Data.Services.Client.DataServiceQuery`1.Execute()
   在System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
   在System.Linq.Enumerable.ToList [TSource](IEnumerable`1源)
   在Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   在Microsoft.P​​ractices.TransientFaultHandling.RetryPolicy.ExecuteAction [TResult](Func`1 FUNC)


解决方案

关于第一个问题,在Azure结构控制器负责分配资源。当你请求一个服务实例(例如Azure存储),它会找到一个可用的服务器,将负责处理该请求。此服务器可能负责不同的服务实例,您的或其他人的,因为Azure是一个共享的环境。

您可以用亲和团体,<一个href=\"http://msmvps.com/blogs/nunogodinho/archive/2012/03/04/importance-of-affinity-groups-in-windows-azure.aspx\"相对=nofollow>由努诺·迪尼奥解释的,有控制的一个更加精细的程度如何布料控制器将提供你的服务(例如,在同一个集群或不同集群)。

请参阅深入了解Windows Azure存储:有什么新的引擎盖下的深潜有关架构的解释。

关于第二个问题,消除错误,我注意到被拒绝的端口是443。它被封锁由我自己的网络上的防火墙或代理服务器,这个端口之前,发生在我身上。请检查是否是这种情况,并将它打开。

如果您确信您的流量可以达到远程服务器,接下来的行动最好的办法是打开使用Windows Azure的支持团队支持票。根据我的经验,他们是快速和有效的。

对于这一点,去支持选项为Windows Azure 并选择客户支持| Windows Azure的。

I got lots of errors like No connection could be made because the target machine actively refused it 70.37.127.112:443

So I add Microsoft.Practices.TransientFaultHandling to retry.

But still, lots of errors (even after retry)

I like to know:

1st, since Azure is a distributed service, why am I always reach 70.37.127.112 ( I access storage by simple original DefaultEndpointsProtocol=https;AccountName=storage_account;....., then use tableContext.CreateQuery<datatype>("table_name"); ). I noticed all my tables (even in different Storage account) all hit 70.37.127.112. My question, is there a way to change it?

2nd, how to eliminate the error above totally?

error details

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 70.37.127.112:443
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at System.Data.Services.Client.QueryResult.Execute()
   at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
   at System.Data.Services.Client.DataServiceQuery`1.Execute()
   at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)

解决方案

About your first question, the Azure Fabric Controller is in charge of allocating resources. When you request a service instance (e.g. Azure Storage) it will find an available server that will be in charge of dealing with the requests. This server may be in charge of different service instances, either yours or other people's, since Azure is a shared environment.

You can use affinity groups, as explained by Nuno Godinho, to have a finer degree of control on how the Fabric Controller will provision your services (e.g. in the same cluster or in different clusters).

See Inside Windows Azure storage: what's new and under the hood deep dive for a explanation on the architecture.

About the second question, on eliminating the error, I noticed that the port being refused is 443. It has happened to me before that this port was being blocked by a firewall or proxy on my own network. Please check if this is the case and have it opened.

If you're sure that your traffic can reach the remote server, the next best course of action is to open a support ticket with Windows Azure's support group. In my experience, they're quick and efficient.

For that, go to Support options for Windows Azure and choose Customer Support | Windows Azure.

这篇关于Azure的表的存储,如何避免连接错误(我试过重试)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆