Troubleshooting Windows Server AppFabric Caching

This topic lists areas to check when troubleshooting the caching features of Windows Server AppFabric to help resolve some of the more common issues.

The most common issues are summarized in the following table and described in the following headings.

Issue Type For Additional Information

Using the Windows PowerShell administration tool.

Using Windows PowerShell to Manage Windows Server AppFabric Caching Features

Communications or firewall related.

TCP/IP Communications (Windows Server AppFabric Caching)

Cache host issues.

Lead Hosts and Cluster Management (Windows Server AppFabric Caching) and Cache Clients and Local Cache (Windows Server AppFabric Caching)

Cache cluster high availability issues.

High Availability (Windows Server AppFabric Caching)

Configuration storage location permissions.

Shared Folder-Based Cluster Configuration (Windows Server AppFabric Caching) and SQL Server-Based Cluster Configuration (Windows Server AppFabric Caching)

Cache Administration with Windows PowerShell

On the Windows Vista, Windows 7, and Windows Server 2008 operating systems, you must right-click the Windows PowerShell shortcut and select Run as administrator for the cache administration tool to work correctly.

Parameter values for the commands are case sensitive. For example, if you create a cache called NamedCache1, the command Get-CacheConfig -CacheName namedcache1 will not work. You must match the case, like this: Get-CacheConfig -CacheName NamedCache1.

When running the Windows PowerShell cache administration tool on a cache host, you must have administrator permissions on all cache hosts in the cluster for the commands to function properly.

Problems running Windows PowerShell commands may also result from issues described in the following sections.

Firewall Exceptions and Port Configuration

It is important that all cache servers have firewall exceptions for the cache, cluster, and arbitration ports. The AppFabric Configuration Wizard can automatically configure these firewall exceptions; but you may want to confirm these exceptions when troubleshooting communication issues.

We recommend that the firewall exceptions are based on the application name, DistributedCacheService.exe. Explicitly specifying exceptions based on the port numbers helps eliminate any question that issues may be caused by an incorrectly configured firewall exception. For example, an explicit port exception eliminates the chance that the wrong executable name was selected by mistake while configuring the application-based firewall exception manually.

The computer that is running the cache-enabled application does not need a firewall port exception configured. It contains the information that tells the client application which port to use to communicate with the cache host. If the application configuration file lists the wrong port number, the client will not be able to communicate with the host. By checking the port exceptions on the cache host and verifying the application and cluster configuration files, you can help exclude firewall configuration issues. For more information about the configuration files, see Windows Server AppFabric Caching Configuration Options.

The following table shows the default values for each port, and where the details are stored in each configuration file, as applicable.

Note

Each cache host refers to the cluster configuration settings to determine the appropriate ports to use to communicate with the cluster. Use the Windows PowerShell Get-CacheHostConfig command to see which ports are being used by each cache host. For more information, see Using Windows PowerShell to Manage Windows Server AppFabric Caching Features.

Port Name Default Value Application Configuration File Attribute Cluster Configuration File Attribute

Cache port

22233

cachePort

cachePort

Cluster port

22234

Not applicable

clusterPort

Arbitration port

22235

Not applicable

arbitrationPort

Replication port

22236

Not applicable

replicationPort

Cache Host Issues

When lead hosts perform the cluster management role, a majority of lead hosts must remain running in the cache cluster. If a majority of lead hosts stop running, the entire cluster will stop running. If a non-lead host fails, the cache cluster will continue to function. If high availability is not enabled, cached objects that were stored on that cache host will be lost.

If there is a question about which cache hosts have been designated as lead hosts, use the Get-CacheHostConfig command with the HostName parameter. It is designated as a lead host when the IsLeadHost property is true. For more information about Windows PowerShell, see Using Windows PowerShell to Manage Windows Server AppFabric Caching Features.

It is important that all cache services start and stop at the same time. For this reason, the Start-CacheCluster, Stop-CacheCluster, and Restart-CacheCluster commands are the only supported means of changing the cache service state on the cache servers. Before you shut down individual cache servers for maintenance, you can also use the Stop-CacheHost command.

Note

The Stop-CacheHost command will not stop a cache host Windows service if it is performing the cluster management role and the stop will cause the entire cluster to shut down.

Cache Cluster High Availability Issues

For the high availability feature to help insulate your application from the failure of a cache host, at least three cache hosts must be members of the cache cluster. This is due to a strong consistency requirement stating that there must always be two copies of a cached object or region in a high availability-enabled cache. To maintain two copies of a cache or region, a high availability-enabled cache requires at least two cache hosts to function. For more information about the high availability feature, see High Availability (Windows Server AppFabric Caching)).

Cache Cluster Configuration Storage Location Permissions

All cache hosts must be able to access the cluster configuration storage location. Each time a new cache host is added to the cluster, the installation program must grant the cache host permissions to the configuration storage location. The cache cluster must also be restarted to recognize new cache hosts for the first time. For more information about the necessary permissions that are required for your cache cluster, see the Windows Server AppFabric Installation Guide (https://go.microsoft.com/fwlink/?LinkId=169172).

See Also

Concepts

Cluster Configuration Storage Options (Windows Server AppFabric Caching)
Shared Folder-Based Cluster Configuration (Windows Server AppFabric Caching)
SQL Server-Based Cluster Configuration (Windows Server AppFabric Caching)
Windows Server AppFabric Caching Configuration Options
Using Windows PowerShell to Manage Windows Server AppFabric Caching Features
Windows Server AppFabric Caching Concepts
Developing a Cache Client (Windows Server AppFabric Caching)