Update the port of a controller
Overview
Use this task to change the port used by a single collective controller or a controller that is part of a replica set.
Create a collective with one or more controllers.
When we created a controller, we either specified a port number for it, or used the default value. For example, the following element in a controller server.xml file specifies a replica port of 10011:
<collectiveController replicaPort="10011" replicaSet="localhost:10010" isInitialReplicaSet="false" />
When a replica set contains only one controller, change the replicaPort value, adding the configuration element for it, if necessary. However, when the replica set has many controllers, we must stop a controller before we change its port. Also, a majority of controllers in the replica set must remain running, with the port unchanged, until after successfully changing the port of the stopped controller.
Procedure
- Stop the controller.
If the controller is part of a multicontroller collective, ensure that most of the controllers remain running.
- Update the replicaPort attribute of the collectiveController element.
When updating a single controller collective, or the initial controller in a multicontroller collective, add the collectiveController element with a replicaPort attribute, as demonstrated in the following example.
- <collectiveController replicaPort="44444" />
It is not necessary to add other attributes to the collectiveController element.
- Restart the stopped controller.
- Check the messages.log file of the controller, and verify that it can communicate with the other controllers.
Look for the CWWKX6011I message in the controller messages to see whether the controller synchronized correctly.