Question

I have to use the azure cache service in my node.js code and I am leveraging tomasz janczuk's azurecache library. But I have encountered below error when connecting to cache service

The error says - "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"

This error doesnt happen in my .NET code where am also accessing the cache service but only throws up when i access the cache service from my node.js code. After looking on web i got to know that this might happen if there is a mismatch between versions of azure sdk and azure caching. But am using the latest versions of all SDKs. Am using Azure SDK for .NET 2.1, Azure caching 2.1 and the latest azure node.js sdk released on 22-08-2013. Please let me know how i can resolve this issue. I have been banging my head about it from the past few days.

Was it helpful?

Solution 2

It was my mistake. I was getting data from the cache before putting anything into it. Putting some data into cache and then getting data from it worked. But must say its a very bad wording of the error that is being displayed when there is no data in the cache.

OTHER TIPS

You are using the same endpoint url and access key in your node and .Net code? Normally, the .Net connection info is provided through configuration, ensure that you are using:

var azurecache = require('azurecache')

var cache = azurecache.create({
    identifier: '<your_endpoint_url>', // or set the AZURE_CACHE_IDENTIFIER environment variable
    token: '<your_access_key>', // or set the AZURE_CACHE_TOKEN environment variable
    ttl: 3600 // optional TTL in seconds (default 1 day); or set the AZURE_CACHE_TTL env variable
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top