StellaBellum Server Lifetime Management - SWG-Source/swg-main GitHub Wiki

This information is useful for managing starting/stopping clusters from the command line. It is particularly useful when running a cluster across multiple physical machines as all of the TaskManager processes can get in-sync before starting up the cluster.

First, make sure autoStart is set to 0 under the TaskManager heading:

[TaskManager]
autoStart=0

Then, after starting the TaskManager process as normal it will wait for commands before starting up fully.

To manage the cluster simply type in one of the following commands and hit enter.

##Commands

start

Starts the cluster.

stop

Stops the cluster.

exit

Kills the cluster if it is running, then terminates the TaskManager process.

public

Sets the ConnectionServer to public

private

Sets the ConnectionServer to private

Running ConnectionServer on a separate machine

This is useful when you want to run the galaxy behind a closed network, with all of its bits communicating over the local network, while still allowing to run a connection server on a separate machine where it can be publicly accessed. It is necessary to do this because by default, each node uses the IP its hostname resolves to as the address it tells all other remotes to communicate on.

First, set up 2 machines with server instances and default configurations. The primary server, node0, is the game cluster server and node1 is just running the ConnectionServer (and the TaskManager process that spawns it). Now, make the following configuration changes to each server's configurations:

node0

default.cfg

[TaskManager]
autoStart=0

[CentralServer]
startConnectionServer=node1:<NODE1_REMOTE_IP>:44463:44464
chatServiceBindInterface=eth0
connectionServiceBindInterface=eth0
commodityServerServiceBindInterface=eth0
customerServiceBindInterface=eth0
gameServiceBindInterface=eth0
planetServiceBindInterface=eth0

[ConnectionServer]
gameServiceBindInterface=eth0
chatServiceBindInterface=eth0
customerServiceBindInterface=eth0
pingPort=44462

nodes.cfg

[TaskManager]
node0=<NODE0_INTERNAL_IP>
node1=<NODE1_INTERNAL_IP>

node1

nodes.cfg

[TaskManager]
node0=<NODE0_INTERNAL_IP>
node1=<NODE1_REMOTE_IP>