Start and stop nodes individually¶
This page explains how to start, stop, disable, enable, and restart individual KX Sensors nodes without affecting the rest of the cluster.
You can stop or shut down individual nodes without affecting the remaining nodes, which will continue to run normally.
Start a node¶
When you start an individual node, you automatically start all processes and service classes running on that node. Disabled nodes are not started unless you explicitly name them.
| Syntax | kxsctl start [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-c |
(console) Start in interactive console. |
-d |
(debug)* Load debugging utilities. |
-n |
(node) Specify node(s). |
--port |
Set the desired port. |
-o |
(observe)* Keep protected execution enabled. |
-p |
(process) Specify process(es). |
-s |
(service class) Specify service class(es). |
* Only available when in interactive console.
A target that isn't in the manifest is rejected. The --threads, --taskset, --tls-mode and --auth overrides apply to every target you name.
Example 1¶
When you start a node with no process or service class restrictions, you automatically start all processes and service classes defined for that node in manifest.yaml. If any of these processes or service classes cannot be started or take too long to start, the start command fails and kxsctl exits non-zero.
kxsctl start -n A
Example 2¶
In this example, you are starting node A in an interactive console in debug mode.
kxsctl start -n A -c -d
Example 3¶
In this example, you are starting kxsRTO_A on port 30000.
kxsctl start -n A -p kxsRTO_A 30000
Stop a node¶
When you stop an individual node, you automatically stop all process and service classes running on that node. To restart a stopped node, run kxsctl start.
| Syntax | kxsctl stop [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-f |
(force) Forces process termination if graceful attempts fail. Applies to services only. |
-n |
Specified node(s). |
-p |
Specified process(es). |
-s |
Specified service class(es). |
A process that is running but disabled can be stopped. kxsctl stop waits for both deregistration from Discovery and process exit before it reports completion, and exits non-zero if a target never stops or the operation times out.
Disable a node¶
Disables the specified node. Disabled nodes are not started automatically by the start or restart system commands. All associated metadata, including database and log files, is left intact.
| Syntax | kxsctl disable [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-n |
Specified node(s). |
-s |
Specified service class(es). |
You must name a target. Use system to disable every node, disabled ones included. A target that is already disabled is reported and skipped. You can disable a running process, and kxsctl warns you that it remains running.
Enable a node¶
Enables the specified node. Enabled nodes are started automatically by the start or restart system commands. All associated metadata, including database and log files, is reused.
| Syntax | kxsctl enable [targets] [flags] |
|---|---|
| Flag | Description |
|---|---|
-n |
Specified node(s). |
-s |
Specified service class(es). |
You must name a target. Use system to enable every node, disabled ones included. A target that is already enabled is reported and skipped rather than failing the command.
Restart a node¶
When you restart a node, you automatically stop and restart all processes and service classes running on that node.
| Syntax | kxsctl restart [flags] |
|---|---|
| Flag | Description |
|---|---|
-c |
(console) Start in interactive console. |
-d |
(debug)* Load debugging utilities. |
-f |
(force) Forcibly stop process(es). |
-n |
(node) Specify node(s). |
--port |
Set the desired port. |
-o |
(observe)* Keep protected execution enabled. |
-p |
(process) Specify process(es). |
-s |
(service class) Specify service class(es). |
* Only available when in interactive console.
kxsctl restart warns you which targets it stops but doesn't start again, for example a disabled node.