infinity
infinity

Reputation: 1920

Windows Azure In-Role Caching not working after SDK 2.5 Upgrade

I updated my Azure web role project from SDK v1.8 to SDK v2.5 and the In-Role caching does not seem to work any more. I am seeing the following error

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://10.175.252.32:20004/. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 10.175.252.32:20004 at Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke() at Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.TcpConnectionCallback(IAsyncResult result) --- End of inner exception stack trace --- at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination) at Microsoft.ApplicationServer.Caching.SocketClientProtocol.ExecuteApi(IVelocityRequestPacket request, IMonitoringListener listener) at Microsoft.ApplicationServer.Caching.SocketClientProtocol.Upsert(VelocityPacketType type, String key, Object value, DataCacheItemVersion oldVersion, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener) at Microsoft.ApplicationServer.Caching.SocketClientProtocol.Put(String key, Object value, DataCacheItemVersion oldVersion, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener) at Microsoft.ApplicationServer.Caching.DataCache.InternalPut(String key, Object value, DataCacheItemVersion oldVersion, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener) at Microsoft.ApplicationServer.Caching.DataCache.<>c__DisplayClass23.b__22() at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)

Here is the app.Config setting

<dataCacheClients>
  <dataCacheClient name="default">
    <autoDiscover isEnabled="true" identifier="WorkerRole" />
  </dataCacheClient>
</dataCacheClients>

Here are the packages on my project

<package id="WindowsAzure.ServiceBus" version="2.5.3.0" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="4.2.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Caching" version="2.5.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="EnterpriseLibrary.TransientFaultHandling.Caching" version="6.0.1304.0" targetFramework="net45" />

Even on the emulator, I am seeing the same error (without the additional information). WinDebug would not work on the Azure Role (it opens to an erred state).

Any help will be appreciated

Upvotes: 2

Views: 270

Answers (1)

McGaz
McGaz

Reputation: 1362

This question is an old one (but still relevant), but I stumbled across it and would just like to add the answer in case anyone else gets this...

The problem is that the Windows Azure Cache is tightly linked to the SDK. So if you are using this and you update the SDK you must also update your Windows Azure Cache to the latest version.

The NuGet package is "Microsoft.WindowsAzure.Caching".

I would always recommend re-imaging your virtual machine after an SDK update just to make sure everything works ok. I had a problem where I updated an existing virtual machine and so had 2 versions of the SDK. When the virtual machine was updated for a Windows Update, only 1 version of the SDK was available and the cache failed.

Upvotes: 0

Related Questions