Modifying Storage Node Service Port Ranges

This section explains how to modify your Storage Node service port ranges after an initial configuration and deployment.

When you initially configure your installation, you specify a range of ports that your Storage Node's Replication Nodes and Admin services use. These ports are collectively called the service port ranges. Configuring them at installation time was optional. If you did not configure them, the configuration scripts automatically selected a range of ports for you.

The process of modifying your service port range depends on whether the Storage Node has already been deployed. You can determine whether a Storage Node has been deployed by using the Command Line Interface (CLI) to run the show topology command. (See show topology for details). The show topology command lists the Storage Node, along with the host and port if it has been deployed.

Storage Node Not Deployed

Use this process to modify your Service Port Ranges if the Storage Node has been configured but not deployed.

Execute the following steps on the Storage Node host:

  1. Kill the existing Storage Node process. You can find the ID of this process by using:

    ps -af | grep -e "kvstore.jar.*start.*<KVROOT>" 

    Kill the process using:

    kill <storage node id>
  2. Remove all the files from the <KVROOT> directory.

    rm -rf <KVROOT>/*
  3. Recreate the Storage Node bootstrap configuration file with the updated service port ranges, being sure to specify the -servicerange parameter. For example:

    java -Xmx64m -Xms64m \
    -jar <KVHOME>/lib/kvstore.jar makebootconfig -root <KVROOT> \
    -port <port> -host <host> -harange <harange> \
    -servicerange <startPort, endPort>

    See makebootconfig for details on using this utility.

  4. Restart the Storage Node:

    java -Xmx64m -Xms64m -jar <KVHOME>/lib/kvstore.jar restart

You can proceed to deploy the Storage Node using the Admin CLI. It will use the newly specified service port range.

Storage Node Deployed

Use this process to modify your Service Port Ranges if the Storage Node has been deployed.

  1. Using the Admin CLI, modify the service port range using the plan change-parameters command. Specify servicePortRange while you do. For example:

    plan change-parameters -service <id> \
    -params servicePortRange=<startPort,endPort> 

    servicePortRange is described in Storage Node Parameters.

  2. Restart the Storage Node process and its services. The Replication Nodes and any admin services for the Storage Node can be stopped in an orderly fashion using the CLI. Use the show topology command (show topology) to list all the services associated with the Storage Node.

    Stop each of these services using the plan stop-service command. See plan stop-service for details on this command. Note that when you stop a service, you must use the services ID, which you can find from the output of the show topology command. Keep track of these IDs because you will need them when you restart the Storage Node.

    Repeat until all services for the Storage Node have been stopped.

  3. Kill the existing Storage Node process. You can find the ID of this process by going to the Storage Node host and issuing:

    ps -af | grep -e "kvstore.jar.*start.*<KVROOT>" 

    Kill the process using:

    kill <storage node id>

    Note:

    Avoid killing all Replication Nodes in your store at the same time, as doing so will result in unexpected errors.

  4. Restart the Storage Node by going to the Storage Node host and issuing:

    java -Xmx64m -Xms64m -jar <KVHOME>/lib/kvstore.jar restart
  5. Restart the Storage Node services by using plan start-service for each service on the Storage Node. See plan start-service for details.

  6. When the Storage Node is restarted and all its Replication Nodes and any admin services are running, the services will be using the updated service port range. You can check by first locating the process ID of the Storage Node services using this command:

    ps -af | grep -e "ManageService.*<KVROOT>"

    and then check the ports the services are listening to by using this command:

    netstat -tlpn | grep <id>

    One of the listening ports is the service port and it should be within the new range.