Cant get Azure Cache to work. "There is a temporary failure. Please retry later."
Asked Answered
C

4

2

So, today I

  1. installed the azure SDK 2.1, and
  2. created a new project With a single WorkerRole,
  3. got the Caching package using NuGet,
  4. set the caching for the role to "Collocated"
  5. Set the Host to "WorkerRole1" in the app.config
  6. commented the security section since this is only a test
  7. inserted the following line on the "Run" `DataCache c = new DataCacheFactory().GetDefaultCache();
  8. Hit Debug

and got this error trying to execute the line above:

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.)

I looked around a lot (for about 5 hours) and found no explanation for this... Can anyone help?

Cellulose answered 28/8, 2013 at 20:6 Comment(3)
Just curious - should the host name be WebRole1 if all you have is a worker role?Chiseler
Yea, try changing WebRole1 to WorkerRole1 or whatever the actual name of the worker Role is.Alarum
ops that was a typo! my badCellulose
C
3

I installed the older version of the SDK (versions 1.8 and 2.0) and now its working... go figure...

Cellulose answered 30/8, 2013 at 20:51 Comment(1)
I wasted my whole day and finally found your answer. It worked like a charm. thank you.Tactful
M
1

I've run into this when the Cloud Service project was not properly upgraded to 2.1. Make sure that the project is definitely using the 2.1 SDK, then make sure all your NuGet packages are updated. The latest Azure Caching NuGet package requires the Windows Azure 2.1 SDK.

Magisterial answered 30/8, 2013 at 17:29 Comment(2)
the thing is that I'm not getting a DLL exception or something like that... but ill check it outCellulose
Which might make sense if the versions of the DLLs are mismatched. Good luck!Magisterial
R
1

In my case I've got the same exception (with Azure SDK 2.1 and Windows Azure Caching 2.1) when I disable the cache from the designated role and run the hosted service in the compute emulator (I need this behavior to disable caching based only on csdef configuration, without additional settings).

In previous version of Azure Caching this scenario caused an exception in DataCacheFactory constructor, now I have no longer this exception but the role hangs in the DataCache constructor call for three minutes and than I've got the exception you describe.

I've solved this problem by changing the code that detects if cache is disabled -- you can read more details in this SO question.

Rinaldo answered 7/10, 2013 at 18:4 Comment(0)
E
1

I have run into the same error, and the issue for me was that I've installed the Caching package from NuGet (by following instructions from here: http://www.windowsazure.com/en-us/documentation/articles/cache-dotnet-how-to-use-in-role/#NuGet) which installs the latest version by default and have neglected the fact that my project was on an older version of Azure (2.1). Consequently some components from the caching package referenced Microsoft.WindowsAzure.Diagnostics, Version=2.2.0.0 which was a higher version than the referenced Diagnostics assembly in the project.

I fixed it by uninstalling the Azure Cache package (v 2.2) and manually installing the coinciding version (v 2.1) by running this command in the Package Manager Console:

PM> Install-Package Microsoft.WindowsAzure.Caching -Version 2.1
Empirical answered 8/3, 2014 at 14:43 Comment(1)
After 6 hours of trial and error, I found your post. Thank you.Fogy

© 2022 - 2024 — McMap. All rights reserved.