Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppFabric Cache not working on azure after upgrading to V2.0 of azure SDK #4

Open
rgupta77 opened this issue Aug 2, 2013 · 3 comments

Comments

@rgupta77
Copy link

rgupta77 commented Aug 2, 2013

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:SubStatus: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

@SimonTaylor
Copy link
Owner

Hi,

I'm sorry you are having problems. What have you tried to resolve this?

I have only ever tested this library with windows server app fabric
rather than azure although I have heard that (up until now) it has
worked fine. Are you aware of any breaking changes between v1.8 and v2.0
of the Azure SDK?

Thanks
Simon

Simon Taylor
Director

Tel: +44 (0) 1242 460768
Mob: +44 (0) 7825 332 003
www.spt-development.com http://www.spt-development.com

On 02/08/2013 03:55, rgupta77 wrote:

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:SubStatus: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(IEnumerable|1
servers, RequestBody request, Func|3 sendMessageDelegate,
DataCacheReadyRetryPolicy retryPolicy)
at
Microsoft.ApplicationServer.Caching.SocketClientProtocol.Initialize(IEnumerable|1
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, IDictionary|2 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


Reply to this email directly or view it on GitHub
#4.

@rgupta77
Copy link
Author

rgupta77 commented Aug 6, 2013

I was relying on the NHibernate.Caches.AppFabric library to work with the Azure Caching Service. I have tried setting the channelOpenTimeout and requestTimeout attributes on the dataCacheClient element under dataCacheClients section in web.config, however this has not helped.

The dataCacheClients section for Azure AppFabric is a bit different from the Windows Server AppFabric version and looks as follows:
dataCacheClients
dataCacheClient name="default" channelOpenTimeout=3000 requestTimeout=5000
autoDiscover isEnabled="true" identifier="SCMProfitCache"
dataCacheClient
dataCacheClients

the default AppFabricProviderSettings look as follows:

AppFabricProviderSettings
CacheType="Named"
NamedCacheTypeRegionName="nhibernate"
NamedCachesMustExist="false" LockTimeout="30000" LocksRegionName="Locks"

I have tried changing these to use CacheType="Region" and reducing the LockTimeout value. However i was still unable to resolve the Estabilsh connection error.

The NHibernate.Caches.AppFabric library was working fine with the .Net Framework 4. however after migrating to VS 2012 and .Net Framework 4.5 the library does not work.

I dont know of any breaking changes between Azure SDK 1.8 and 2.0.
I have even tried upgrading to Azure SDK 2.1 (released on July 31st 2013) however the establish connection error still exists.

@SimonTaylor
Copy link
Owner

What happens if you just upgrade to .net 4.5 but stick with the older version of the SDK?

On 6 Aug 2013, at 06:49, rgupta77 [email protected] wrote:

I was relying on the NHibernate.Caches.AppFabric library to work with the Azure Caching Service. I have tried setting the channelOpenTimeout and requestTimeout attributes on the dataCacheClient element under dataCacheClients section in web.config, however this has not helped.

The dataCacheClients section for Azure AppFabric is a bit different from the Windows Server AppFabric version and looks as follows:
dataCacheClients channelOpenTimeout=3000 requestTimeout=5000
dataCacheClient name="default"
autoDiscover isEnabled="true" identifier="SCMProfitCache"
dataCacheClient
dataCacheClients

the default AppFabricProviderSettings look as follows:

AppFabricProviderSettings
CacheType="Named"
NamedCacheTypeRegionName="nhibernate"
NamedCachesMustExist="false" LockTimeout="30000" LocksRegionName="Locks"

I have tried changing these to use CacheType="Region" and reducing the LockTimeout value. However i was still unable to resolve the Estabilsh connection error.

The NHibernate.Caches.AppFabric library was working fine with the .Net Framework 4. however after migrating to VS 2012 and .Net Framework 4.5 the library does not work.

I dont know of any breaking changes between Azure SDK 1.8 and 2.0.
I have even tried upgrading to Azure SDK 2.1 (released on July 31st 2013) however the establish connection error still exists.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants