Versions Compared

Key

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

...

  • --http-port=<[hostname or ip address:]number>
    • Specifies the HTTP port that the Agent is listening to in order to receive requests from a JS7 Controller:agent. sh|.cmd --http-port=####
    • where #### is the port number.
    • This option can be used to indicate which network interface the JS7 Agent should listen to if a hostname or IP address is specified, for example with --http-port=myhost:4445.
    • Without this option being used the port defaults to 4445 and the Agent 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_AGENT_HTTP_PORT (see below)
      • Third precedence: use of default value
  • --https-port=<[hostname or ip address:]number>
    • Specifies the HTTPS port that the Agent is listening to in order to receive requests from a Controller:
    • agent.sh|.cmd command --https-port=####

    • where #### is the port number.
    • This option can be . This option can be used to indicate which network interfaces interface the Agent should listen to if a hostname or IP address is specified, for example, with --https-port=myhost:4445.
    • When using the HTTPS protocol for connections from a Controller instance consider additionally allowing the HTTP protocol for local connections as with --http-port=localhost:4445. As the Agent Start Script makes use of an HTTP connection this protocol has to be in place to allow the Agent to be started, stopped, etc. by its Start Script.
    • Without this option being used the port defaults to 4445 and the Agent 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 SJS7_AGENT_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, tmp and state directories.
    • This location has to be unique for any Agent instance.
    • If a data directory is specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_DATA (see below)
      • Third precedence: use of default value JS7_AGENT_HOME/var_<JS7_AGENT_PORT>
  • --config-directory=<location of config directory>
    • Specifies the location of the config directory for configuration data.
    • This location has to be unique for any Agent instance.
    • Should a configuration directory be specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_CONFIG_DIR (see below)
      • Third precedence: use of default value JS7_AGENT_HOME/var_<JS7_AGENT_PORT>
  • --forceWith the stop and restart commands this option terminates any running processes of jobs. See explanations to the --sigkill-delay option.
    • Specifies the delay for terminating
  • The option is available for Agents running on Unix.
  • --sigkill-delay
    • Specifies the delay for killing job processes in case the Agent is terminated. A value --sigkill-delay=5 will specify 5 seconds. Default: 3.
    • In a situation when When the Agent is crashed or is terminated using the --force switch, the Agent's Watchdog Script will terminate remaining job processes and child processes.
      • if the --sigkill-delay option specifies a positive, non-zero value
        • send all processes and child processes created by the Agent the SIGTERM signal,
        • wait for the period specified with the --sigkill-delay option,
      • send remaining job processes and child processes the SIGKILL signal.
    • The option is available for Agents running on Unix .This option is available starting from release 2.7.2, see
      Jira
      serverSOS JIRA
      columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-2148
  • --timeout
    • With the stop command this option waits for the indicated number of seconds and kills terminates the Agent including any running job processes of jobs if the timeout is exceeded.

  • --kill-script=<path>
    • The kill script provides the functionality to kill tasks and any child processes of jobs.

    • Kill scripts are by default provided from the following locations:
      • JS7_AGENT_DATA/work/kill_task.sh for Unix.

      • JS7_AGENT_DATA\work\kill_task.cmd for Windows.

    • This option can be used to specify the location of an individual kill script if required.

    • Should an individual kill script be specified then the following order of precedence applies:

      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_KILL_SCRIPT (see below)
      • Third precedence: use of default value
    • Starting from release 2.7.2 this option is ignored, see 
      Jira
      serverSOS JIRA
      columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-2148
  • --java-options=<java options>
    • This option can be used to apply Java options for the Agent, e.g. for memory settings.

    • Without this option being used the Java options default to -Xms100m.

    • 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 value
  • --job-java-options=<java options>
    • This option can be used to specify Java options for Shell jobs that load a JVM. This option does not apply to jobs derived from JS7 - Job Templates that are executed in the Agent's JVM.
    • In order to specify a number of Java options quotes have to be used like this:
      • --job-java-options="-Xms100m -Xmx1g"
    • When specifying Java options for execution with Shell jobs then the following order of precedence applies:

      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_JOB_JAVA_OPTIONS (see below)

Switches

  • -c ,  --curl
    • Specifies that the curl utility should be used instead of the built-in HTTP client when sending commands to the Agent.
  • -f, --force
    • With the stop and restart commands this option terminates any running processes of jobs. See explanations to the --sigkill-delay option.

    • When operated for Unix, the alternative option name --sigkill can be used.

Watchdog Script agent_watchdog.sh, agent_watchdog.cmd

...

  • The command will keep the start script running as PID 1 in order to receive later stop/kill signals ( SIGTERM, SIGKILL ) signals from the container management software.
  • The command start-docker is an alias for start-container.
  • Jira
    serverSOS JIRA
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId6dc67751-9d67-34cd-985b-194a8cdc9602
    keySET-223

...

  • The Agent waits for running job processes to be completed.
  • Unix
    • Using the --force command line option switch will immediately terminate any running job processes and will terminate the Agent normally.
      • collect PIDs of job processes,
      • if the --sigkill-delay option is used
        • send SIGTERM signal to remaining job processes and child processes for which PIDs have been collected,
        • wait for the indicated delay or for stdout/stderr to be released by processes whichever is shorter,
      • send SIGKILL signal to job processes and child processes,
      • terminate the Agent with exit code 0.
  • Windows
    • Using the --force command line option switch will forcibly terminate job processes and child processes.
  • Using the --timeout command line option will wait for the indicated timeout that the Agent terminates. If the timeout is exceeded and if the Agent is still running then then Agent and runing jobs will be focibly terminated:
    • Agent
      • collect PIDs of job processes,
      • terminate the Agent with exit code 143 for Unix.
    • Watchdog
      • Unix
        • if the --sigkill-delay option is used
          • send SIGTERM signal to remaining job processes and child processes for which PIDs have been collected,
          • wait for the indicated delay or for stdout/stderr to be released by processes whichever is shorter,
        • send SIGKILL signal to remaining job processes and child processes.
      • Windows
        • forcibly terminates job processes and child processes.
  • Only one of the --force and --timeout options can be used.

...

  • The Agent waits for running processes of any jobs to be completed.
  • UnixUsing the --force  command line option switch will terminate any running job processes and will terminate the Agent as explained in chapter Stopping the Agent.
  • The Agent terminates with exit code 97 Windows
  • Using the --xxx command line option
  • The Agent terminates with on Unix and exit code 98 on Windows.
  • The --timeout command line option cannot be used.

Anchor
#status_agent
#status_agent
Checking the Agent Status

...

The command reports the status of an Agent being started. Use of the -c or --curl option switch prefereably will use the curl utility, otherwise the built-in Java HTTP Client is used.

...

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

...

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

This The command installs the Agent's Windows Service. After the installation, users find users find the Windows Service with the name SOS JS7 Agent -port=<number> in the Services Manager Console. The Windows service uses the local system account.

...

Code Block
languagebash
agent_4445.cmd start-service [--http-port=<number><[interface:]number>]

This The command starts the Windows Service with the name name SOS JS7 Agent -port=<number>.

Info

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

...

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

This The command removes the Windows Service. After executing this the command users should not find the Windows Service with the name name SOS JS7 Agent -port=<number> in the Services Manager Console any longer.

...

After installation of the Windows Service users find the.\service\js7_agent_<http-port>w.exe file file. This The program can be executed to configure the Windows Service.

...

Debugging the Windows Service

  • For general information see JS7 - Log Levels and Debug Options
  • The log level can be increased by using the Agent's Apache ProcRun Daemon Service Manager daemon/service.On  On Windows systems this is installed in the Agent's service folder directory with a name such as as js7_agent_<port>w.exe  where <port> is the Agent's HTTP port.
  • Users can start the ProcRun Manager, select the Logging tab in the user interface and set the log level to Debug
  • The For the location of log files is explained above. see JS7 - Log Files and Locations.
  • Users should consider reverting the debug log level to its original value once they are finished with debugging.

...