Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleUsage on Unix
Usage: controller.sh command [options]
  command:
    start           [options]
    start-container [options]
    start-docker    [options]
    stop            [options]
    abort           [options]
    restart         [options]
    status          [options]
    killcancel        | kill    [options]
    switch-over     [options]
    revert          [options] 
    cert            [cert-options]                    | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --id=<JS7 Controller Id><identifier>                                 | Controller ID, default: controller
    --http-port=<[hostname or ip address:]number>interface:]port>                    | http network interface and port, default: 4444
    --https-port=<[hostname or ip address:]number>interface:]port>                   | https network interface and port, default:
    --data-directory=<location of data directory><directory>                      | default: /var/sos-berlin.com/js7/controller/var
    --config-directory=<location of config directory><directory>                    | default: /var/sos-berlin.com/js7/controller/var/config
    --timeout=<timeout > 0, in seconds><seconds>                         | only for stop; if timeout is| reachedtimeout thenfor SIGKILLterminating isController sentinstance
     --java-options=<java options>                     | default: -Xmx500m -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/aIC9
see also https://kb.sos-berlin.com/x/CKrAAw for more information.
Code Block
languagetext
titleUsage on Windows
Usage: controller.cmd command [options]
  command:
switches: 
    -c | --curl      start           [options]
    start-container [options]
    start-docker    [options]
    stop     | use curl instead of Java http [options]client
    abort-f | --force         [options]
    restart         [options]
    status          [options]
  | force killtermination on stop and restart
  
see https://kb.sos-berlin.com/x/CKrAAw for more information.



Code Block
languagetext
titleUsage on Windows
Usage: controller.cmd command [options]
  command:
  switch-over  start   [options]
    revert    [options]
     start-container [options]
    certstop            [cert-options]
    abort           [options]
    restart | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --id=<JS7 Controller ID>[options]
    status          [options]
    cancel | kill   [options]
    switch-over |   default: controller[options]
    --http-port=<[hostname or ip address:]number>revert        | default: 4444[options]
    --https-port=<[hostname or ip address:]number>cert       | default:
    --data-directory=<location of data directory>[cert-options]           | default: C:\ProgramData\sos-berlin.com\js7\controller\controller
    --config-directory=<location of config directory> | default:see C:\ProgramData\https://kb.sos-berlin.com\js7\controller\controller\config/x/jLbAAw
  options:
    --timeoutid=<timeout<identifier> > 0, in seconds>               | only for stop; if timeout is reached then KILL is sent
    --java-options=<java options>     | 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/aIC9
  switches: 
    -f | --force                                      | 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/aIC9
see also force termination on stop and restart
  
see https://kb.sos-berlin.com/x/CKrAAw for more information.

Command Line Options

  • --id=<JS7 Controller 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.
    • 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.
  • --http-port=<[hostname or ip address:]number>
    • 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.
      • controller.sh|.cmd command --http-port=####

      • where #### is the port number.
      • This option can be also

        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
      this
      • 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
  • --https-port=<[hostname or ip address:]number>
    • 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:Controller instance in a cluster:
      • The option can be

      • controller.sh|.cmd command --https-port=####

      • where #### is the port number.
      • This 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 HTTP connection this 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
  • --data-directory=<location of data directory>
    • Specifies the location of the data directory that usually includes the config, logs and state 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
  • --config-directory=<location of 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
  • --timeout
    • With the stop command this option waits for the indicated number of seconds and kills the Controller if the timeout is exceeded.

    --revoke
  • --java-options=<java options>
    • This option can be used to apply Java options for the Controller, e.g. for memory settings.
    • 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 -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 valuevariable 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.
  • -f, --force
    • With the stop and restart commands this option forcibly terminates the Controller instance.

Watchdog Script: controller_watchdog.sh, controller_watchdog.cmd

...

  • If a Controller Cluster is being operated then fail-over will not occur.
  • Using the --timeout command line option will terminate the Controller when the number of seconds specified for the timeout is exceeded.

...

If a Controller Cluster is being operated then this command will cause a fail-over.

The command is deprecated and is replaced by the stop command using the --force switch or --timeout option..


Code Block
languagebash
controller_instance.sh|.cmd cancel | kill [options]

The Controller process is killedforcibly 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 this the command will cause a fail-over.

Restarting the Controller Instance

...

If a Controller Cluster is operated then this the command will not cause a switch-over.

Checking the Controller Instance Status

...

If the Controller instance is up and running then this the command will result in output such as:

...

Code Block
languagebash
controller_instance.sh|.cmd cert [cert-options]

This The command is used to generate an SSL certificate /TLS Certificate for client and server authentication. 

...

Code Block
languagebash
controller_instance.cmd install-service [--http-port=<number>]

This The command installs the Controller instance's Windows Service. After the installation, users find users find the Windows Service with the name SOS JS7 Controller -id=<Controller ID> in the Services Manager Console. The Windows Service uses the local system account.

...

Code Block
languagebash
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>.

Info

The stop command performs more than a simple stop-service command : the stop command checks if the Controller instance was started by the command line interface or as a Windows Service and stops the Controller instance accordingly. Therefore there is no stop-service command.

...

Code Block
languagebash
controller_instance.cmd remove-service [--http-port=<number>]

This The command removes the Windows Service. After executing this command users should no longer find the Windows Service with the name name SOS JS7 Controller -id=<controller-id> in the Services Manager Console.

...

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  On Windows systems this is installed in the Controller instance's service folder with a name such as js7_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
  • The For the location of log files is explained above. see JS7 - Log Files and Locations.
  • Users should consider reverting the log level back to its original value once they are finished with debugging.

...