1

It looks like there are a number of questions already open on this topic, but I believe mine might be different. My setup:

  • 1 Azure Cache Worker Role
  • 1 Web Role

Up until about a week ago, they existed in harmony, until I tried to upgrade to Azure caching 2.1. Once I did that, I was afflicted with the "No such host is known" problem that seems to have affected many developers out there. I found many questions and sites that directed me to upgrade my Azure SDK installation to the new 2.1 version. I have done all of these things:

  • Install newest Azure SDK 2.1
  • Uninstall Azure SDK 2.0
  • Uninstall and Reinstall Azure Caching 2.1
  • Triple check configuration of all my caching settings
  • Triple check that all references are pointing to the newest versions and not the old ones
  • Upgrade my Azure Project to 2.1 by right-click, going to Properties, and clicking Upgrade

and I am still getting the following (My Error):

Exception type: SocketException 
Exception message: No such host is known
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)

This is different than the more typical error that most other questions and sites are showing, which is (More commonly reported error, not mine):

No such host is known 
Exception message: No such host is known
at Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke()

I am about 30 hours into troubleshooting this, and could really use some help. Maybe I am just missing some step about the upgrade of the SDK? Somehow maybe sneakily it is still using an old version of a DLL? Is there some foolproof way to check this besides looking at the path of every reference in the project (which I have already done, and they all match up)?

4

2 回答 2

2

不是真正的答案,而是一些可能有助于您诊断问题的评论:

  • Visual Studio 2012/Update 3 - 请确保您已将最新更新应用于 VS。我们经历过类似的问题,这是帮助我们的事情之一。
  • 收集大量缓存诊断数据- 在您的缓存配置部分中,将Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel值更改为4缓存工作者角色的配置部分中的值。完成此操作后,在缓存工作者角色的 OnStart() 方法中添加以下代码行:

    DiagnosticMonitorConfiguration dmConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();
    
    // Configure the collection of cache diagnostic data.
    CacheDiagnostics.ConfigureDiagnostics(dmConfig);
    
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString",
        dmConfig);
    
    return base.OnStart();
    

希望这能让您了解到底发生了什么。

于 2013-09-01T05:55:24.227 回答
0

这也不是您问题的直接答案,但我认为它可能有助于解决您的问题。

当我在计算模拟器中运行托管服务并且故意禁用缓存时,我遇到了这个异常——在以前版本的 Windows Azure 缓存中,DataCacheFactory构造时会抛出异常,我会正确处理它,而使用 2.1 版(和 Azure SDK 2.1)构造没有错误,但是在你提到的异常被抛出之前,DataCacheFactory我在构造上卡住了 3 分钟。DataCache

我在他的回答中使用了 Gaurav Mantri 描述的过程,我发现在以前版本的 Windows Azure 缓存中,DataCacheFactory如果在 中找不到缓存角色,则会抛出异常csdef,而在 2.1 中它会考虑缓存角色名称作为网络中的地址 - 从而导致 3 分钟的等待和随后的异常。

因此,我调整了我的代码来检测这种新行为——有关更多详细信息,请参阅这个 SO question

于 2013-10-07T17:59:24.523 回答