Exception when using Windows Azure caching: this host is not known

I am trying to get started with Azure and trying to use the caching feature. I created a cloud services project and added a working cache role and a web role. I installed nuget "Windows Azure Caching" in projects for both roles and added the name of the cache user role as an identifier in the DataCacheClients element in the web.config of the web role.

I added the following code to the web role:

DataCacheFactory cf = new DataCacheFactory(); DataCache c = cf.GetDefaultCache(); 

When I try to run this locally in the emulator, I get the following exception:

  ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server: net.tcp://MvcWebRole1:24233. Inner Exception : No such host is known 

Could you tell me what I am missing here?

Used by Azure SDK: v2.0

+8
caching azure
source share
3 answers

The timing of your question could not be better. We also ran into the same problem and stroked our heads about the problem. We had one project where everything worked perfectly, and in one we got the same error. Based on our research, we identified a problem with the Nuget caching package. It seems that a new version (2.1.0.0) was released yesterday, and we found that if we install this package, we will get this error. Can you check the package version in your case? The documentation states that this new version can only be used with the latest release of the SDK (2.1).

One solution would be to uninstall version 2.1.0.0 and install version 2.0.0.0. To install version 2.0.0.0, open the package manager console ( View --> Other Windows --> Package Manager Console ) and enter the following command:

 Install-Package Microsoft.WindowsAzure.Caching -Version 2.0.0.0 

This fixed our problem. Hope it fixes yours too.

+14
source share

Here is a link to the Windows Integration Engineering blog on how to deal with this issue. They recommend upgrading to Azure SDK v 2.1 or rolling back as accepted response states.

http://blogs.msdn.com/b/cie/archive/2013/08/08/windows-azure-caching-2-1-0-0-no-such-host-is-known.aspx

+2
source share

This exception can also occur when calculating the emulator if the cache is not configured for the role in the client library configuration. In my case, this happened on purpose, because the cache emulator has some problems that can slow down testing and debug the service.

In a previous version of Windows Azure caching, in this case, the construction of the DataCacheFactory failed with an exception (processed by my code); with Windows Azure Caching 2.1 (and Azure SDK 2.1) in the same scenario, the code would take into account the role name as the server address, and thus, when building the DataCache it would try to communicate with the nonexistent cache - this leads to a 3-minute wait, and an exception posted in question.

I modified my code to discover a new situation for this scenario - you can find more details in this SO question .

+1
source share

All Articles