Page History
Table of Contents |
---|
Controller
...
Instance Start-up
Start Script
...
Usage
Running the start script without parameters shows the usage clause:
: controller.sh, controller.cmd
The JS7 Controller includes a Start Script for managing the Controller instance:
- The default location of the Start Script is:
/opt/sos-berlin.com/js7/controller/<controller-id>/bin\controller.sh
on Unix andC:\Program Files\sos-berlin.com\js7\controller\<controller-id>\bin\controller.cmd
on Windows.
- Use of the Start Script is authoritative to start Controller instances.
Usage
Running the Controller Start Script without arguments displays the usage clause:
Code Block | ||||
---|---|---|---|---|
| ||||
Usage: controller.sh command [options] [switches]
command:
start | ||||
Code Block | ||||
| ||||
Usage: controller.sh command [options] command: start [options] start_docker [options] stop [options] start-container [options] stop abort [options] restart [options] status status [options] killcancel [options] switch-over [options:] --id=<JS7revert Controller Id> [options] cert | default: controller [cert-options] --http-port=<[hostname or ip address:]number> | default: 4444 | see https://kb.sos-berlin.com/x/jLbAAw options: --https-port=<[hostname or ip address:]number> | default: id=<identifier> --data-directory=<location of data directory> | default: /var/sos-berlin.com/js7/controller/var --config-directory=<location of data directory> | default: /var/sos-berlin.com/js7/controller/var/config| Controller ID, default: controller --javahttp-options=<java options>port=<[interface:]port> | http network interface and port, default: 4444 --https-port=<[interface:]port> | https network interface and port, default: -Dfile.encoding=UTF-8 -Xmx500m -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block; see also https://kb.-data-directory=<directory> | default: /var/sos-berlin.com/xjs7/controller/aIC9 see also https://kb.var --config-directory=<directory> | default: /var/sos-berlin.com/x/CKrAAw for more information. | ||||
Code Block | ||||
| ||||
Usage: controller.cmd command [options] command: js7/controller/var/config --timeout=<seconds> start [options] | timeout for terminating stopController instance --java-options=<java options> [options] | abortdefault: [options]-Xmx500m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/uYo7B switches: restart-f | --fail-over [options] status [options] | fail-over killactive role on stop and restart -c | [options] --curl install-service [options] remove-service [options] start-service [options] options: --id=<JS7 Controller ID> | use curl instead of Java http client see https://kb.sos-berlin.com/x/CKrAAw for more information. |
Code Block | ||||
---|---|---|---|---|
| ||||
Usage: controller.cmd command [options] [switches] command: start | default: controller[options] --http-port=<[hostname or ip address:]number>stop [options] restart | default: 7444 --https-port=<[hostname or ip address:]number> [options] status [options] | default: cancel --data-directory=<location of data directory> [options] switch-over [options] | default: C:\ProgramData\sos-berlin.com\js7\controller\controller revert --config-directory=<location of data directory> [options] start-service [options] | default: C:\ProgramData\sos-berlin.com\js7\controller\controller\configinstall-service [options] --java-options=<java options> remove-service [options] cert [cert-options] | default: -Dfile.encoding=UTF-8 -Xmx500m -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block; see also https://kb.sos-berlin.com/x/aIC9jLbAAw see also https://kb.sos-berlin.com/x/CKrAAw for more information. |
Command Line Options
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: 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/uYo7B
switches:
-f | --fail-over | fail-over active role on stop and restart
-c | --curl | use curl instead of Java http client
see https://kb.sos-berlin.com/x/CKrAAw for more information. |
Command Line Options
- --id
- Specifies a unique identifier for a Controller. 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 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
- 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.
- -id=<JS7 Controller ID>
- is a unique identifier for an instance of Controller within a network
- -http-port=<[hostname or ip address:]number>
- is the HTTP port that the Controller is listening to in order to receive requests from JOC Cockpit and Agent
controller.cmd|sh command -http-port=####
- where
####
is the numeric port. - This option can be also used for indicating which network interfaces the JS7 Controller should listen to if you specify a hostname or IP address in addition
- Without this option being used the port defaults to 4444 and the Controller listens to all available network interfaces.
- Should you want to specify a port then the following precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_HTTP_PORT
(see below) - Third precedence: use of default value
- is the HTTP port that the Controller is listening to in order to receive requests from JOC Cockpit and Agent
-https-port=<[hostname or ip address:]number>
- is the HTTPS port that the Controller is listening to in order to receive requests from a Controller:
agent.cmd|sh command -https-port=####
- where
####
is the numeric port. - This option can be also used for indicating which network interfaces the Controller should listen to if you specify a hostname or IP address in addition
- Should you want to specify a port then the following precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JS7_CONTROLLER_HTTPS_PORT
(see below) - Third precedence: use of default value
- is the HTTPS port that the Controller is listening to in order to receive requests from a Controller:
-data-directory=<number>
- Location of the data directory.
- It has to be unique over all JS7 Controller instances
- Should you want to specify a data directory then the following 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_JS7_CONTROLLER_HTTP_PORT
)
-java-options=<java options>
With Java 1.8 the initial memory allocation has changed, for details see How to manage the Java heap space.
This option can be used to apply Java options for the Controller, e.g. the memory settings.
Without this option being used the Java options default to '-Xms500m'.
Should you want to specify the Java options then the following precedence applies:
- First precedence: command line option
- Second precedence: environment variable
JAVA_OPTIONS
(see below) - Third precedence: use of default value
--config-directory
- configuration files are stored.
- It has to be unique over all JS7 Controller instances
- Should you want to specify a data directory then the following 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)
Environment Startup Script
Usage
Info | ||
---|---|---|
| ||
Why should a user use environment variables? Where are they located? File names for Windows/Linux |
Environment Variables
The following environment variables can be used:
JAVA_HOME
- points to the location of the Java Runtime Environment (JRE).
- Without setting this environment variable Java will be used from the location specified by the system path.
- Please consider that
JAVA_HOME
does not point to the location of a JDK but to a JRE directory where thebin/java
executable resides.
JAVA_OPTIONS
- sets Java options, e.g. the Java memory settings for the Controller.
- Without setting this environment variable the Java options default to '-Xms500m'.
JS7_CONTROLLER_CONFIG_DIR
- configuration files are stored.
- It has to be unique over all JS7 Controller instances
JS7_CONTROLLER_DATA
- points to the directory where the JS7 Controller has its data directory.
- Without setting this environment variable the default value is
JS7_CONTROLLER_HOME\var_JS7_CONTROLLER_HTTP_PORT
JS7_CONTROLLER_HTTP_PORT
- sets the HTTP port that the JS7 Controller is listening to.
- indicates which network interfaces the JS7 Controller should listen to if a host or IP address is specified.
- if only a port number is specified then the JS7 Controller listens to all available network interfaces via HTTP.
- Without setting this environment variable the port defaults to 4444.
JS7_CONTROLLER_HTTPS_PORT
- sets the HTTPS port that the JobScheduler Agent is listening to.
- indicates which network interfaces the JS7 Controller should listen to if a host or IP address is specified.
- if only a port number is specified then the JS7 Controller listens to all available network interfaces via HTTPS.
- Without setting this environment variable the HTTPS protocol doesn't use.
JS7_CONTROLLER_LOGS
- sets the directory where the JS7 Controller log file is created.
- This setting defaults to the directory
logs
in the JS7 Controller installation directory. - For Windows systems for which the JS7 Controller is installed in the program directory that is pointed to by the
%ProgramFiles%
environment variable, it is recommended not to use the default setting. Instead specify a different path via theJS7_CONTROLLER_LOGS
environment variable, e.g. some location in the data directory that is pointed to by the%ProgramData%
environment variable.
JS7_CONTROLLER_PID_FILE_DIR
- sets the directory where the JS7 Controller pid file is created.
- This setting defaults to the directory that is specified with the
JS7_CONTROLLER_LOGS
environment variable or the log directory default value.
Running the Controller
- SOS does not recommend running the JS7 Controller as
root
(for Unix) or asAdministrator
(for Windows).
Starting the Controller
Code Block | ||
---|---|---|
| ||
controller.cmd|sh start [options] |
Stopping the Controller
Code Block | ||
---|---|---|
| ||
controller.cmd|sh stop [options] |
This command will safely terminate the Controller(recommended).
Code Block | ||
---|---|---|
| ||
controller.cmd|sh abort [options] |
The Controller process is terminated immediately.
Code Block | ||
---|---|---|
| ||
controller.cmd|sh kill [options] |
The controller process is killed.
- This corresponds to sending SIGKILL with a kill command.
Restarting the Controller
Code Block | ||
---|---|---|
| ||
controller.cmd|sh restart [options] |
Checking the Controller Status
Code Block | ||
---|---|---|
| ||
controller.cmd|sh status [options] |
Should the Controller be up and running then this command will result in some output such as:
Code Block | ||
---|---|---|
| ||
id: controller
version: 2.0.0-alpha.20210706 (2021-07-06)
buildId: KvsbZFR9QfOT-GAJg33fLA
startedAt: 1625646518935
totalRunningTime: 632857.312
orderCount: 1973
system:
hostname: KA0054
cpuModel: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
mxBeans:
operatingSystem:
availableProcessors: 4
systemLoadAverage: -1
java:
version: 1.8.0_171
memory:
maximum: 501743616
total: 501743616
free: 420687192
systemProperties:
java.vendor: Oracle Corporation
os.arch: amd64
java.runtime.name: Java(TM) SE Runtime Environment
os.version: '10.0'
os.name: Windows 10
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.version: 1.8.0_171
|
Should the Controller not be running then some output is provided such as:
...
--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 an HTTP connection 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
- 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="-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
Switches
-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-over
With the
stop
andrestart
commands this option 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
Technically the Controller is started and is restarted from its Watchdog Script, for details see JS7 - Controller Watchdog.
Instance Start Script: controller_instance.sh, controller_instance.cmd
The JS7 Controller includes a template file for an Instance Start Script which can be modified to specify start-up parameters.
- The Instance Start Script sets a number of environment variables and then executes the Start Script.
- Users can adjust start-up parameters from environment variables in the Instance Start Script as described below.
It is recommended that an individual Instance Start Script is created from the template file as this allows individual start-up parameters to be specified using environment variables.
Location
- The default location of the Instance Start Script template file is:
/opt/sos-berlin.com/js7/controller/<controller-id>/bin/controller_instance.sh-example
on Unix andC:\Program Files\sos-berlin.com\js7\controller\<controller-id>\bin\controller_instance.cmd-example
on Windows.
- Users can create a copy of the template file and remove the
-example
extension from the file name. The renamed Instance Start Scriptcontroller_instance.sh
(Unix) orcontroller_instance.cmd
(Windows) will not be overwritten when updating the Controller later on.- If the Controller installation is performed on Windows using the installer, either in headless mode or in graphical mode, then the installer automatically creates the script.
- If the Controller installation is performed by extracting a .tar.gz/.zip archive then the Instance Start Script has to be created from a copy of the template file.
- Once the Instance Start Script been copied users can modify start-up parameters from environment variables, as described below.
Usage
The Instance Start Script can be executed with the same arguments as the Start Script as described above.
Anchor | ||||
---|---|---|---|---|
|
Most environment variables in the Instance Start Script correspond to command line options in the Start Script (explained above). The following environment variables can be adjusted in the script:
JS7_CONTROLLER_ID
- The unique identifier of a Controller. 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.
- If a Controller Cluster is operated 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 members of the same cluster. This identifier cannot be modified after initial start of a Controller. Changes to the Controller ID require dropping the Controller's journal, i.e. the contents of its
JS7_CONFIG_DIR\state
directory. - Corresponding command line option:
--id
JS7_CONTROLLER_USER
- The operating system user account that the Controller instance is started with. The Controller Start Script will switch to this account when being executed from a different account, for example if started by the
root
account. - There is no corresponding command line option.
- The operating system user account that the Controller instance is started with. The Controller Start Script will switch to this account when being executed from a different account, for example if started by the
JS7_CONTROLLER_HTTP_PORT
- The HTTP port that the JS7 Controller is listening to.
- This setting optionally indicates which network interface the JS7 Controller should listen to if a host or IP address is specified such as
JS7_CONTROLLER_HTTP_PORT=myHost:4444
. - If only a port number is specified then the JS7 Controller listens to all available network interfaces via HTTP.
- Without setting this environment variable the port defaults to
4444
. - Corresponding command line option:
--http-port
JS7_CONTROLLER_HTTPS_PORT
- Sets the HTTPS port that the JS7 Controller is listening to.
- This setting indicates which network interface the JS7 Controller should listen to if a host or IP address is specified as for example with
JS7_CONTROLLER_HTTPS_PORT=myHost:4443
- If a port number only is specified then the JS7 Controller listens to all available network interfaces via HTTPS.
- When using the HTTPS protocol for connections from JOC Cockpit and from a paired Controller instance then the HTTP protocol has to be allowed for local connections such as
JS7_CONTROLLER_HTTP_PORT=localhost:4444
. As the Controller Start Script makes use of an HTTP connection this protocol has to be in place to allow the Controller instance to be started, stopped etc. by its Start Script. - The HTTPS protocol is not used if this environment variable is not set.
- Corresponding command line option:
--https-port
JS7_CONTROLLER_DATA
- Points to the parent directory where the JS7 Controller finds its configuration data, log data and journals.
- Without setting this environment variable the default value is
JS7_CONTROLLER_HOME\var
. - For Windows systems where the JS7 Controller is installed in the program directory this is indicated by the
%ProgramFiles%
system environment variable. It is recommended that the default setting is not used. Instead a different path should be specified via theJS7_CONTROLLER_DATA
environment variable, such as a location in the system data directory that is indicated by the%ProgramData%
environment variable, for example,JS7_CONTROLLER_DATA=C:\ProgramData\sos-berlin.com\js7\controller
. - Corresponding command line option:
--data-directory
JS7_CONTROLLER_CONFIG_DIR
- Specifies the directory where configuration files are stored.
- When this environment variable is not specified, the default value of
JS7_CONTROLLER_DATA/config
will be used. - Corresponding command line option:
--config-directory
JS7_CONTROLLER_LOGS
- Specifies the directory where the JS7 Controller log files are created.
- This setting defaults to the
JS7_CONTROLLER_DATA/logs
directory. - There is no corresponding command line option.
JS7_CONTROLLER_PID_FILE_DIR
- Sets the directory where the JS7 Controller PID file is created.
- This setting defaults to the directory which is specified with the
JS7_CONTROLLER_LOGS
environment variable or the log directory default value. - There is no corresponding command line option.
JS7_CONTROLLER_PID_FILE_NAME
- Sets the file name to which the JS7 Controller stores its PID.
- The default value is
controller.pid
. - There is no corresponding command line option.
Display feature availability StartingFromRelease 2.5.1
JAVA_HOME
- Points to the location of the JVM, either a JRE (Java Runtime Environment) or JDK (Java Development Kit).
- Without setting this environment variable Java will be used from the location specified by the system path.
- The
JAVA_HOME
environment variable does not necessarily point to the location of a JDK but to a JRE directory where thebin/java
executable resides, for example if the location of the Java executable is/opt/java/jdk8u202-b08/jre/bin/java
thenJAVA_HOME=/opt/java/jdk8u202-b08/jre
. - There is no corresponding command line option.
JAVA_OPTIONS
- Specifies Java options, for example the Java memory settings for the Controller instance.
- When this environment variable is not set, the Java options will default to
-Xms500m
. - Corresponding command line option:
--java-options
Running the Controller Instance
- SOS does not recommend running the JS7 Controller as the
root
account (for Unix) or as theAdministrator
account (for Windows) for a simple reason: there is no need to do so. - The Controller does not execute any jobs as this task is performed by Agents. Therefore any user account can be used to operate the Controller.
The examples below make use of a controller_instance.sh
(Unix) or controller_instance.cmd
(Windows) Instance Start Script which is created from the template file.
Starting the Controller Instance
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd start [options] |
When used for Container operation using Unix OS then the following command is used:
Code Block | ||
---|---|---|
| ||
controller_instance.sh start-container [options] |
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]
# 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 a Controller Cluster is operated, then fail-over will not occur.
- Using the
--fail-over
switch will fail-over the active role to the Standby Controller instance in a Controller Cluster. - Using the
--timeout
option will terminate the Controller instance when the number of seconds specified is exceeded.- 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 abort [options] |
The Controller process is 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
controller_instance.sh|.cmd restart --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 ignored.
Checking the Controller Instance Status
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd status [options] |
If the Controller instance is up and running then the command will result in output such as:
Code Block | ||
---|---|---|
| ||
id: controller
version: 2.0.0-alpha.20210706 (2021-07-06)
buildId: KvsbZFR9QfOT-GAJg33fLA
startedAt: 1625646518935
totalRunningTime: 632857.312
orderCount: 1973
system:
hostname: KA0054
cpuModel: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
mxBeans:
operatingSystem:
availableProcessors: 4
systemLoadAverage: -1
java:
version: 1.8.0_171
memory:
maximum: 501743616
total: 501743616
free: 420687192
systemProperties:
java.vendor: Oracle Corporation
os.arch: amd64
java.runtime.name: Java(TM) SE Runtime Environment
os.version: '10.0'
os.name: Windows 10
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.version: 1.8.0_171
|
If the Controller is not running then output is created like this:
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 the command will switch the active role 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
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd revert [options] |
If a Controller Cluster is operated then the command can be executed after the Controller is stopped. The command will revert the Controller Cluster to a Standalone Controller instance.
For details see JS7 - How to revert a Controller Cluster to a Standalone Controller.
Performing Certificate Rollout
Code Block | ||
---|---|---|
| ||
controller_instance.sh|.cmd cert [cert-options] |
The command is used to generate an SSL/TLS Certificate for client and server authentication.
For details and command line options see JS7 - Certificate Authority - Rollout Certificates for HTTPS Connections
Windows Service Interface
The following information applies to batch headless installation on Windows systems. For installation with a GUI and user dialog see JS7 - Controller - Installation with Using the Windows Graphical Installer.
The Controller is operable can be operated as a Windows Service. The start script Start Script of the Controller instance allows installinginstallation/removing removal of the Windows Service.
The examples below make use of an controller_instance.cmd
Instance Start Script that is created from the template file.
Installing the Windows Service
Code Block | ||
---|---|---|
| ||
controller_instance.cmd install-service [--http-port=<number>] [-ip-address=<hostname or ip address>=<number>] |
This The command installs the Controller instance's Windows Service. After the installation, you users find the Windows Service with the name SOS JS7 Controller -id=<Controller ID>
in the Services Manager Console. The Windows service Service uses the "local system" account account.
Warning |
---|
During the service installation, it tries to copy the executable file for the Windows Service to the |
...
Code Block | ||
---|---|---|
| ||
controller_instance.cmd start-service [--http-port=<number>] |
This The command starts the Windows Service with the name name SOS JS7 Controller -id=<Controller ID><controller-id>.
Info |
---|
The |
...
Code Block | ||
---|---|---|
| ||
controller_instance.cmd remove-service [--http-port=<number>] |
This The command removes the Windows Service. After executing this command you will not users should no longer find the Windows Service with the name name SOS JS7 Controller -id=<Controller ID><controller-id>
in the Services Manager Consoleany longer.
Configuring the Windows Service
After the installation of the Windows Service, you will find theThe .\service\js7_controller_<Controller ID>w<controller-id>w.exe
file . Start this program is installed along with the Windows Service. This program can be executed to configure the Windows Service.
For example, goto go to the "Startup" tab |
Usage Examples
Running the Controller on Windows
For Windows® operating systems the location of the Java Runtime Environment and of the log directory can be specified like this:
Code Block | ||
---|---|---|
| ||
set JAVA_HOME=%ProgramFiles%\Java\jre8
set JS7_CONTROLLER_LOGS=%ProgramData%\sos-berlin.com\js7\controller\controller\var\logs
"%ProgramFiles%\sos-berlin.com\agent\js7\controller\bin\controller.cmd" start |
Running the Controller on Linux
...
parameters |
Debugging the Windows Service
- For general information see JS7 - Log Levels and Debug Options.
- The Controller instance log level can be increased using the Controller's Apache ProcRun Daemon Service Manager daemon/service. On Windows systems this is installed in the Controller instance's
service
folder with a name such asjs7_controller_<controller-id>w.exe
where<controller-id>
is the unique Controller ID. - Users can start the ProcRun Manager, select the Logging tab in the user interface and set the level to Debug.
- For the location of log files see JS7 - Log Files and Locations.
- Users should consider reverting the log level back to its original value once they are finished with debugging.