You have the following options:
- Edit the server.xml file located in the TomcatInstallationFolder\conf folder and in the Receiver tag, for the address value, instead of auto, enter the IP address of the network interface card to which you want the session replication to take place.
For example, if you have two network interface cards, eth1 with 10.x.x.x as the IP address and eth2 with 172.x.x.x as the IP address, and if you want the session replication to happen on eth2, you must set the address value to 172.x.x.x.
Original address value in the Receiver tag:
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4000"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
New address value in the Receiver tag:
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="172.x.x.x"
port="4000"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
For information about clustering and session replication, see the Apache Tomcat documentation at https://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html.
- Disable the network interface that you do not intend to use. For example, if you want to disable eth1, use any one of the following commands at the command prompt:
- ifconfig eth1 down
- ifdown eth1
Note
Verify your etc/hosts file. Remove any bad entries that are present.