Versions Compared

Key

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

Table of Contents

Installing the JobScheduler Universal Agent

Prerequisites

  • A Java Runtime Environment starting from version 1.8 is required.

Preparation

  • Choose the JobScheduler Universal Agent archive for your platform the target system from the JobScheduler Downloads page.
    Installation
  • Unzip the downloaded file to an arbitrary directory.
  • Directory structure
    • bin
      • jobscheduler_agent.cmd
        • The start script for Windows platforms.
      • jobscheduler_agent.sh
        • The start script for Unix platforms.
    • lib
      • The directory for Java libraries.
      • Consider the settings in log4j.xml should you want to adjust the log output format.
    • var_4445
    • service (for Windows)
  • On Windows Systems:
    • You have to change the directory permissions for the .\logs and .\service directories if you have extracted the JobScheduler Agent under e.g. C:\Program Files.
      • This step is not required if you extracted the JobScheduler Agent to e.g. C:\ProgamData.
      • Start a command prompt with elevated administrator rights and type e.g.

        Code Block
        languagebash
        titleset full acces for "Users" on .\service and .\logs directory
        cd "path\to\JobScheduler Agent installation"
        icacls "service" /L /grant *S-1-5-32-545:(OI)(CI)F
        icacls "logs" /L /grant *S-1-5-32-545:(OI)(CI)F 
    • An installer is provided that is explained in detail with the JobScheduler Universal Agent - Installation with Windows Installer article.
      • The installer asks for elevated administrator privileges, therefore it is not necessary to change the permissions in the .\service directory and the installer sets read/write permissions for the log directory.
  • On Unix systems:
  • A tarball is provided and a versatile batch installation feature that allows Agents to be deployed to hundreds of servers within minutes.
  • Users requiring to install a small number of Agents on Unix should follow the instructions given in the JobScheduler Universal Agent - Running multiple instances article.
    • For Unix systems:
    • For Windows systems:
      • A .zip archive is available that can be used for:
        • manual installation on a small number of computers.
          (Described in the current article.)
        • the installation of a large number of Agents using third party deployment tools.
      • An installer that can be used for manual installation a small number of computers.
        (Described in detail in the JobScheduler Universal Agent - Installation with Windows Installer article.)

Installation

    • Unzip the downloaded file to an arbitrary directory.
    • Directory structure (only files and folders directly relevant ):
      • bin
        • jobscheduler_agent.cmd
          • The start script for Windows platforms.
        • jobscheduler_agent.sh
          • The start script for Unix platforms.
        • jobscheduler_agent_instance.sh-example
      • lib
        • The directory for Java libraries.
        • Configure the settings in log4j.xml file if you want to adjust the log output format.
      • var_4445
      • service (for Windows)
    • On Windows Systems:
      • You have to change the directory permissions for the .\logs and .\service directories if you have extracted the JobScheduler Agent under e.g. C:\Program Files.
        • This step is not required if you extracted the JobScheduler Agent to e.g. C:\ProgamData.
        • Start a command prompt with elevated administrator rights and type e.g.

          Code Block
          languagebash
          titleset full acces for "Users" on .\service and .\logs directory
          cd "path\to\JobScheduler Agent installation"
          icacls "service" /L /grant *S-1-5-32-545:(OI)(CI)F
          icacls "logs" /L /grant *S-1-5-32-545:(OI)(CI)F 
    • If multiple instances are configured then every instance must have its own ./var_4445 data directory (e.g. ./var_<port of the instance>)

Update of a JobScheduler Universal Agent

  • Preparations for an update
    • Stop all JobScheduler Universal Agent instances
    • Remove the ./lib directory
  • Unzip the downloaded file to the installation directory
  • If you use the Windows installer of JobScheduler Universal Agent then the ./lib directory is updated automatically during the setup. It is not necessary to remove the ./lib directory before you start the installer.

Running the JobScheduler Universal Agent

  • SOS does not recommend to run running the JobScheduler Agent as root (for Unix) or as Administrator (for Windows).
  • Instead the user account should be used that jobs are executed for. Should jobs be executed for a number of user accounts then consider the chapter Running multiple instances of JobScheduler Universal Agent.

...

  • The Agent log level can be increased using the Agent's Apache ProcRun Demon Service Manager demon/service.
  • On Windows systems this is installed in the Agent service Folder and will have a name such as sos_jobscheduler_agent_4444w.exe where 4444 is the port the agent can be addressed over. 
  • Start the ProcRun Manager, select the Logging tab in the Manager interface and set the level to Debug
  • The location of the log files has already been described above. 
  • (Do not forget to set the debug level back to Info once finished.)

 

Anchor
running_multiple_instances
running_multiple_instances
Running multiple instances of JobScheduler Universal Agent

 
Show If
groupsos-members
  • Any number of Agent instances can be started from the same installation, however, different ports have to be used that the Agent is listening to for requests of a JobScheduler Master.
  • Running the Agent for different user accounts and ports 
    • Use the environment variable SCHEDULER_USER to operate the Agent for a user account that is different from the one that starts the Agent.
    • Use the environment variable SCHEDULER_HTTP_PORT or the option -http-port=#### to start the Agent for a port that is different from the default setting.
    • Make sure that the directories SCHEDULER_LOG_DIR and SCHEDULER_PID_FILE_DIR are readable and writable for the different user accounts
  • Add the startup options as given in the following examples to your individual startup script.

Examples for Windows

Code Block
languagebash
titleSet port by commands and options
set JAVA_HOME=%ProgramFiles%\Java\jre8
 
"%ProgramFiles%\sos-berlin.com\agent\jobscheduler_agent_1.10\bin\jobscheduler_agent.cmd" start -http-port=4446
Code Block
languagebash
titleSet log directory and port by environment variables
set JAVA_HOME=%ProgramFiles%\Java\jre8
set SCHEDULER_LOG_DIR=%ProgramData%\sos-berlin.com\agent\jobscheduler_agent_1.10\logs
set SCHEDULER_HTTP_PORT=4446
 
"%ProgramFiles%\sos-berlin.com\agent\jobscheduler_agent_1.10\bin\jobscheduler_agent.cmd" start

Examples for Unix

Code Block
languagebash
titleSwitch user account and port by commands and options
su - js
jobscheduler_agent.sh start -http-port=4446
Code Block
languagebash
titleSwitch user account and port by environment variables
SCHEDULER_USER=js
SCHEDULER_HTTP_PORT=4446
export SCHEDULER_USER SCHEDULER_HTTP_PORT

jobscheduler_agent.sh start

Testing the JobScheduler Universal Agent Operability

A simple way to test if the installed JobScheduler Agent works as expected is to carry out a test using Process Classes. The Process Class and the corresponding job will be defined in your JobScheduler Master, which will connect to the JobScheduler Agent. SOS recommends to do the test locally to exclude connection problems, e.g. firewall settings, since the goal of the test is to see whether the JobScheduler Agent is working properly.

Process Class and Standalone Job

First create a Process Class, for example the following (find attached example: agent1.process_class.xml):

...

Find more details and use cases from the article: How to execute Jobs and Job Chains with Agents

Logs

The easiest way to check if the test was successful is to verify the contents of the job log in JOC and to see if the job completed successfully. Otherwise an error will be reported in JOC.

...

Code Block
languagebash
titleJobScheduler Universal Agent Log
2015-04-28 16:11:24.462 +0200 [DEBUG] akka.io.TcpListener - New connection accepted
......
......
2015-04-28 16:13:39.231 +0200 [DEBUG] spray.can.server.HttpServerConnection - TcpConnection terminated, stopping

Remote File Watching

To configure remote file watching, see JobScheduler Universal Agent - Remote File Watching

See also

...