Configure Firewall
If you have a firewall or a router between your cache clients (web/app servers) and the cache servers, then you must open up specific ports in your firewall. This will ensure that cache clients are able to talk to the cache servers.
NCache server uses the following TCP ports for communication.
- Client/Server Port: 9800 (the default TCP port for cache client and server communication).
- Management Port: 8250 (the default TCP port for PowerShell cmdlets and NCache Service).
- Cluster Port: Cluster-port that you define in a cache cluster configuration. It is recommended to use a consecutive range of ports, (the default range is 7800-7900), and configure Firewall to allow communication on this port range.
- Cache Management Port: The port range for cache management. The default port range is 8300-8400.
If there is a port conflict and the above default ports are being used by other applications then you must configure all the cache servers to use different ports.
Step 1: Modify Alachisoft.NCache.Daemon.dll.config file
This file is located in the /opt/ncache/bin/service
folder on all cache servers.
Change the "Port" for Client/Server communication and "ManagementPort" for NCache management in the file below.
<appSettings>
...
<add key="NCacheServer.Port" value="9800"/>
<add key="NCacheServer.ManagementPort" value="8250"/>
...
</appSettings>
Step 2: Restart NCache Service
Anytime you modify Alachisoft.NCache.Daemon.dll.config, you must restart NCache Service on all cache servers. Do the following in PowerShell:
> sudo systemctl restart ncached