Changing the port of a replica
To change the port of a replica that is in a replica set which has many replicas, you must stop and start replicas in a specific order and not change the port of at least one replica until after you change the ports of the other replicas.
Before you begin
Create a replica set. See Configuring Liberty collective replica sets. The topic includes Example: Create and activate a replica set, an example of creating a replica set consisting of three collective controllers on the same host.
About this task
When you added a replica to a replica set, you specified a port number for the replica. For example, the following element in a replica server.xml file specifies a replica port of 10011:
<collectiveController replicaPort="10011"
replicaSet="localhost:10010"
isInitialReplicaSet="false" />
When a replica set contains only one replica, you can simply change the replicaPort value. However, when the replica set has many replicas, you must stop a replica before changing its port. Also, one replica in the replica set must remain running and must not have its port changed until after you change the ports of the stopped replicas successfully.