Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
Usage: controller.sh command [options] [switches] command: start [options] start-container [options] stop [options] abortrestart [options] status restart [options] status cancel [options] cancel | kill [options] switch-over [options] revert [options] cert [cert-options] | see https://kb.sos-berlin.com/x/jLbAAw options: --id=<identifier> | Controller ID, default: controller --http-port=<[interface:]port> | http network interface and port, default: 4444 --https-port=<[interface:]port> | https network interface and port, default: --data-directory=<directory> | | default: /default: /var/sos-berlin.com/js7/controller/var --config-directory=<directory> | default: /var/sos-berlin.com/js7/controller/var/config --timeout=<seconds> | timeout for terminating Controller instance --java-options=<java options> | default: -Xmx500m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/aIC9uYo7B switches: -cf | --fail-curlover | fail-over active role on stop and restart -c | use | --curl instead of Java http client -f | --force | use curl instead of Java http client | force termination on stop and restart see https://kb.sos-berlin.com/x/CKrAAw for more information. |
...
Code Block | ||||
---|---|---|---|---|
| ||||
Usage: controller.cmd command [options] [switches] command: start [options] start-container [options] stop [options] abortrestart [options] restartstatus [options] statuscancel [options] cancelswitch-over | kill [options] revert switch-over [options] revertstart-service [options] install-service [options] remove-service [options] cert [cert-options] | see https://kb.sos-berlin.com/x/jLbAAw options: --id=<identifier> | Controller ID, default: controller --http-port=<[interface:]port> | http network interface and port, default: 4444 --https-port=<[interface:]port> | https network interface and | https network interface and port, defaultport, default: --data-directory=<directory> | default: C:\ProgramData\sos-berlin.com\js7\controller\controller --config-directory=<directory> | default: C:\ProgramData\sos-berlin.com\js7\controller\controller\config --timeout=<seconds> | timeout for terminating Controller instance --java-options=<java options> | default: -Xmx500m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/aIC9uYo7B switches switches: -f | --forcefail-over | fail-over active role on stop and restart -c | --curl | force termination on stop and restart | use curl instead of Java http client see https://kb.sos-berlin.com/x/CKrAAw for more information. |
...
- --id
- Specifies a unique identifier for a Controller. Identifiers Identifiers such as "controller-test", "controller-production" etc. can be used. Upper case and lower case characters are considered, the characters a-z, A-Z, 0-9, underscore and hyphen are allowed. Spaces are not allowed in a Controller ID. Default:
controller
. - If users intend to operate a Controller Cluster with two Controller instances for the active and for the standby cluster member, then the same Controller ID must be specified for both Controller instances as otherwise the instances will not be considered to be members of the same cluster.
- Specifies a unique identifier for a Controller. Identifiers Identifiers such as "controller-test", "controller-production" etc. can be used. Upper case and lower case characters are considered, the characters a-z, A-Z, 0-9, underscore and hyphen are allowed. Spaces are not allowed in a Controller ID. Default:
- --http-port
- Specifies the HTTP port which the Controller instance is listening to in order to receive requests from JOC Cockpit or a partnering Controller instance in a cluster.
The option can be used to indicate which network interface the JS7 Controller should listen to if a hostname or IP address is specified - for example with
--http-port=myhost:4444
.- When the option is not used the port defaults to
4444
and the Controller listens to all available network interfaces.
- If a port is specified then the following order of precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_HTTP_PORT
(see below) - Third precedence: use of default value
- Specifies the HTTP port which the Controller instance is listening to in order to receive requests from JOC Cockpit or a partnering Controller instance in a cluster.
--https-port
- Specifies the HTTPS port that the Controller is listening to in order to receive requests from JOC Cockpit or a pairing Controller instance in a cluster:
The option can be used to indicate which network interface the Controller should listen to if a hostname or IP address is specified - for example with
--https-port=myhost:4443
.- When using the HTTPS protocol for connections from JOC Cockpit and from a pairing Controller instance the the HTTP protocol has to be allowed for local connections such as
--http-port=localhost:4444
. As the Controller Start Script uses a an HTTP connection this the protocol has to be in place to allow the Controller instance to be started, stopped etc. by its Start Script.
- If a port is specified then the following order of precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_HTTPS_PORT
(see below) - Third precedence: use of default value
- Specifies the HTTPS port that the Controller is listening to in order to receive requests from JOC Cockpit or a pairing Controller instance in a cluster:
--data-directory
- Specifies the location of the data directory that usually includes the
config
,logs
andstate
sub-directories. - If a data directory is specified then the following order of precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_DATA
(see below) - Third precedence: use of default value
JS7_CONTROLLER_HOME\var
- Specifies the location of the data directory that usually includes the
--config-directory
- Specifies the location of the
config
directory for configuration data. - If a configuration directory is specified then the following order of precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_CONFIG_DIR
(see below) - Third precedence: use of default value
JS7_CONTROLLER_DATA/config
- Specifies the location of the
--timeout
With the
stop
command this option waits for the indicated number of seconds and terminates the Controller if the timeout is exceeded.- When using JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems users should consider that the
--timeout
value will count towards the systemd service file'sTimeoutStopSec
setting. Users must ensure that the Controller is terminated when the systemd timeout is exceeded.
--java-options
--java-options
- This option can be used to apply Java options for the Controller, e.g. for memory settings, see JS7 - FAQ - Which Java Options are recommended.
Without this option being used Java options default to
-Xms500m
.- In order to specify a number of Java options quotes have to be used like this:
--java-options="-Xms100m Xms500m -Xmx1g"
When specifying Java options then the following order of precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JAVA_OPTIONS
(see below) - Third precedence: use of default value
...
-c , --curl
- Specifies that the
curl
utility should be used instead of the built-in HTTP client when sending commands to the Controller.
- Specifies that the
-f, --fail-forceover
With the
stop
andrestart
commands this option forcibly terminates the will fail-over the active role to the Standby Controller instance.- The switch is available starting from release 2.7.2.
Watchdog Script: controller_watchdog.sh, controller_watchdog.cmd
...
When used for Container operation using Unix OS then the following command is used:
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd start-container [options] |
This The command is used to start the JS7 Controller in a container:
- The command will keep the start script running as PID 1 in order to receive later stop/kill signals (SIGTERM, SIGKILL) from the container management software.
- The command
start-docker
is an alias forstart-container
. Jira server SOS JIRA columnIds issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key SET-223
Anchor #stopping_controller #stopping_controller
Stopping the Controller Instance
#stopping_controller | |
#stopping_controller |
Code Block | ||
---|---|---|
| ||
# terminate Controller instance
controller_instance.sh|.cmd stop [options] |
This command will safely terminate the Controller (recommended).
# wait up to 60s to stop Controller instance
controller_instance.sh|.cmd stop --timeout=60
# stop Controller instance and fail-over active role
controller_instance.sh|.cmd stop --fail-over |
The command will terminate the Controller.
- If a Controller instance will take time to terminate, then the command will wait accordingly. If If a Controller Cluster is operated, then fail-over will not occur.
- Using the
---timeoutfail-over
switch will fail-over the active role to the Standby Controller instance in a Controller Cluster. - Using the
--timeout
command line option will terminate the Controller instance when the number of seconds specified for the timeout is exceeded.
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd abort [options] |
The Controller process is aborted immediately.
If a Controller Cluster is being operated then this command will cause fail-over.
...
- No fail-over will occur if the Controller terminates within the given timeout.
- Fail-over will occur if the Controller does not terminate within the given timeout.
- If the
--fail-over
switch is used then the--timeout
option will be ignored.
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd cancelabort | kill [options] |
The Controller process is forcibly terminated. The command kill
can be used as an alternative to cancel
.
The behavior corresponds to sending a SIGKILL signal with a command such as kill -9
(Unix) or taskkill
(Windows).
If a Controller Cluster is being operated then the command will cause fail-over.
Restarting the Controller Instance
aborted immediately.
If a Controller Cluster is operated then the command will cause fail-over.
Starting from release 2.7.2 the command is deprecated and is replaced by the stop
command using the --fail-over
switch.
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd cancel | kill [options] |
The Controller process is forcibly terminated. The command kill
can be used as an alias to cancel
.
The command corresponds to sending a SIGKILL signal with an OS command such as kill -9
(Unix) or taskkill
(Windows).
If a Controller Cluster is operated then the command will cause fail-over.
Restarting the Controller Instance
Code Block | ||
---|---|---|
| ||
# restart Controller instance
controller_instance.sh|.cmd restart [options]
# wait up to 60s and restart Controller instance
controller_instance.sh|.cmd restart --timeout=60
# fail-over active role and restart Controller instance
| ||
Code Block | ||
| ||
controller_instance.sh|.cmd restart [options]--fail-over |
The Controller process is stopped and is started:
- The Controller is stopped as explained in chapter Stopping the Controller Instance. This includes handling of fail-over in a Controller Cluster.
- The Controller is started similar to use of the
start
command using the same options as for initial start.
If the --fail-over
switch is used then the --timeout
option will be ignoredIf a Controller Cluster is operated then the command will not cause switch-over.
Checking the Controller Instance Status
...
Code Block |
---|
ERROR: java.nio.file.NoSuchFileException: C:\ProgramData\sos-berlin.com\js7\controller\controller\state\session-token ...JS7 Controller(controller) not started! |
Switching-over
...
the
...
Active Controller Instance
...
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd switch-over [options] |
If a Controller Cluster is operated then this the command will switch -over the active role in the Controller Cluster, more precisely the currently Active Controller Instance takes the standby role and the previous Standby Controller Instance takes the active role.
This command is applicable from the Active Controller Instance only.
from the Active Controller instance to the Standby Controller instance. The command can be executed for the Active Controller instance only.
After switch-over the Controller instance is restarted.
Reverting a Controller Cluster to a Standalone Controller
...
If a Controller Cluster is operated then this the command can be executed after the Controller is stopped. The command will revert the Controller Cluster to a Standalone Controller instance.
...