Reputation: 203
It looks like there are a number of questions already open on this topic, but I believe mine might be different. My setup:
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:
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)?
Upvotes: 1
Views: 678
Reputation: 1808
This also is not a direct answer to your problem but I think it may prove helpful to resolve your situation.
I've got this exception when I run my hosted service in the compute emulator and the cache was disabled on purpose -- in previous version of Windows Azure Caching an exception would be thrown on DataCacheFactory
construction and I would handle it properly, while with version 2.1 (and Azure SDK 2.1) the DataCacheFactory
is constructed without errors but then I've got stuck on DataCache
construction for 3 minutes before the exception you mention is thrown.
I've used the procedure described by Gaurav Mantri in his answer and I've been able to discover that in previous versions of Windows Azure Caching the DataCacheFactory
would throw an exception if the cache role was not found in the csdef
, while in 2.1 it would consider the cache role name as an address in the network -- thus causing the 3 minute wait and the subsequent exception.
I've thus adapted my code to detect this new behavior -- for more detail see this SO question
Upvotes: 0
Reputation: 136196
Not really an answer but some comments which might help you diagnose the problem:
Collect lots of cache diagnostics data - In your cache configuration section, change the Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel
value to 4
in your cache worker role's configuration section. After you do that, add the following lines of code in your cache worker role's OnStart() method:
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();
Hopefully this should give you an idea about what exactly is going on.
Upvotes: 2