NHibernate.Caches.AppFabric nuget package unable to establish connection with Azure AppFabric Caching SErvice

181 Views Asked by At

NHibernate.Caches.Appfabric nuget package for using Azure AppFabric Caching service as the second level cache for NHibernate was working fine with V 1.8 of the Azure SDK.

However after upgrading to VS 2012 and version 2.0 of the Azure SDK the nuget package has stopped working and the AppFabric DLL is unable to Establish Connection with the Azure AppFabric Caching service. We get the following error when connecting to the Azure AppFabric Caching service:

  Exception type: DataCacheException 
Exception message: 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://192.168.171.9:20005.

at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination) at Microsoft.ApplicationServer.Caching.DataCacheFactory.EstablishConnection(IEnumerable1 servers, RequestBody request, Func3 sendMessageDelegate, DataCacheReadyRetryPolicy retryPolicy) at Microsoft.ApplicationServer.Caching.SocketClientProtocol.Initialize(IEnumerable1 servers) at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName, CreateNewCacheDelegate cacheCreationDelegate, DataCacheInitializationViaCopyDelegate initializeDelegate) at NHibernate.Caches.AppFabric.AppFabricCacheFactory.GetCache(String cacheName, Boolean useDefault) at NHibernate.Caches.AppFabric.Adapters.AppFabricCacheNamedAdapter.GetCache(IAppFabricCacheFactory cacheFactory) at NHibernate.Caches.AppFabric.AppFabricCacheAdapter..ctor(String regionName) at NHibernate.Caches.AppFabric.Adapters.AppFabricCacheNamedAdapter..ctor(String regionName) at NHibernate.Caches.AppFabric.AppFabricCacheAdapterFactory.Create(String regionName) at NHibernate.Caches.AppFabric.AppFabricProvider.BuildCache(String regionName, IDictionary2 properties) at NHibernate.Cache.CacheFactory.CreateCache(String usage, String name, Boolean mutable, Settings settings, IDictionary`2 properties) at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)

=====================================================

Can you please suggest how to resolve this issue??

Thanks

1

There are 1 best solutions below

1
On

According to the walk-through the mentioned exception is mainly thrown due to either of the two reasons

  1. Accounts access to AppFabric.
  2. Mismatch in the security credentials of Server and client configurations.

Having said that the study I'm referring to is not for azure, but still I hope it is off assistance. Refer to the link below, http://blogs.msdn.com/b/mspfe/archive/2013/03/22/the-case-of-the-broken-appfabric.aspx