Start and Stop Locators

You start and stop locators with the sqlf utility and the locator script. The command line options determine the address and port at which SQLFire peers communicate with the locator, as well as the address and port that thin clients use to connect to the SQLFire cluster using the locator.

Start Locators

Always start locator members first when you start a SQLFire cluster. This ensures that the locators can manage server discovery from the beginning, as individual SQLFire servers join and leave the cluster.

If your cluster uses multiple locators, specify the complete list of locator addresses and ports when you start each locator.

For example, the following command starts an initial locator for both peer and client access:
sqlf locator start -peer-discovery-address=locator1host -peer-discovery-port=10101 \
     -locators=locator1host[10101],locator2host[20202] \
     -client-bind-address=locator1host -client-port=1527 -dir=locator1

The -peer-discovery-address and -peer-discovery-port options define a unique connection that all members of this SQLFire distributed system use for communicating with the locator (see Start and Stop Locators). The -client-bind-address and -client-port options define a connection that client applications can use to connect to the cluster using this locator (see Connect to a Distributed System Using Locators).

The -locators option lists the peer connection information for all locators used in the same SQLFire distributed system. The command above specifies a distributed system with two locators. The second locator would be started using a similar command:

sqlf locator start -peer-discovery-address=locator2host -peer-discovery-port=20202 \
     -locators=locator1host[10101],locator2host[20202] \
     -client-bind-address=locator2host -client-port=1528 -dir=locator2

All log and status files are stored in the specified directories (or in the current working directory if you omit the -dir option).

Configure Locators for WAN Member Discovery provides additional information about starting locators for WAN replication.

Stop Locators

To stop a running locator, use the command:
sqlf locator stop -dir=locator_directory

To stop an entire SQLFire distributed system, use the sqlf shut-down-all command. You can optionally include the -skip-locators option with sqlf shut-down-all to leave standalone locator members running in the distributed system.