Question

Having persuaded it all to work in my development environment, and then on a test server, I'm trying to set up AppFabric Cache on a server that will be in production.

So I have the AppFabricCache Service installed on what I'll call "cacheserver1" and a client installed on what I'll call "webserver1". When I connect to the cache from a client installed on cacheserver1, it works. When I connect to the cache from a client installed on webserver1 - or from my development machine, having opened the firewall - the cache service crashes.

Application: DistributedCacheService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.CallbackException
Stack:
   at System.Runtime.AsyncResult.Complete(Boolean)
   at System.ServiceModel.Channels.ConnectionStream+IOAsyncResult.OnAsyncIOComplete(System.Object)
   at System.ServiceModel.Channels.SocketConnection.OnSendAsync(System.Object, System.Net.Sockets.SocketAsyncEventArgs)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)
   at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

The "hosts" section of the ClusterConfig.xml reads:

<hosts>
  <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
    hostId="990129399" size="849" leadHost="true" account="WIN-BLABLABLA\AppFabricCache"
    cacheHostName="AppFabricCachingService" name="WIN-BLABLABLA"
    cachePort="22233" />
</hosts>

The firewall is configured so that cacheserver1 accepts incoming connections on port 22233 from webserver1. They're both AWS machines, not on the same domain or anything... I had assumed that I could just talk over TCPIP.

  1. How is a simple request crashing the whole service? This doesn't make me feel reassured about the robustness of the cache service.
  2. Is this configuration how a Distributed Cache is meant to be used?
  3. What do I need to do to make it work / get a more helpful error out of it?
Was it helpful?

Solution

Got it!

I needed to disable the Cache Security (which is fine, I'm just going to manage it with the firewalls).

I needed to add to the config file on the client (webserver), and

<advancedProperties>
  <securityProperties mode="None" protectionLevel="None">
    <authorization>
      <allow users="Everyone" />
    </authorization>
  </securityProperties>
</advancedProperties>

to ClusterConfig.xml on the cacheserver

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top