Agents allow users to define specific actions that can run locally or remotely throughout a JAMS network. By default, JAMS can only run Jobs and Setups on the primary engine. Agents allow users to extend that capability to run Jobs on a variety of different environments. For example, by deploying JAMS Agents, a single JAMS Scheduler can execute tasks on many systems.
The JAMS Agentd is a version of the JAMS Agent which runs as a background process on Linux/Unix machines. This topic details how to install this unique Agent to your primary machine.
![]() |
NOTE: JAMS Jobs running on Agentd Agents must use either the UnixScript or UnixShell Execution Methods. |
The jams-agentd daemon can be started and stopped using the chkconfig command on Red Hat-derived systems and with the invoke-rc.d command on Debian-derived machines.
![]() |
Note: Making any modifications to the config file will require a daemon restart. The config file includes comments describing the various available options. |
Normally, jams-agentd will run as root in order to allow it to authenticate and run Jobs as other users. However, it can also be run as a non-root user by disabling the root services for jams-agentd.
In this mode, all Jobs will be run as the executing user, irrespective of the requested user name for that Job. The config file and all working directories are then located in the jams directory on the user’s home directory.
To run jams-agentd to run as a non-root user, the following steps must be performed:
Disable Run as Root for AgentD |
Copy Code
|
---|---|
jams-agentd --kill-daemon jams-agentd --remove-service |
Run jams-agentd as non-root |
Copy Code
|
---|---|
# create a directory for JAMS mkdir ~/jams # create the specified conf file based on the user jams-agentd -C ~/jams/jams-agentd.config # read and modify jams-agentd.config for your environment # Check the listening port, as non-root users cannot listen on ports less than 1024 #Start jams-agentd daemon edit the .conf file jams-agentd -d # jams-agentd will create all other directories it needs to run as a non-root user |
Stop the Installer |
Copy Code
|
---|---|
jams-agentd -K |
![]() |
NOTE: It may be necessary to use the full pathname for the daemon when executed by a non-root user. |
As of JAMS version 6.3.7, PUBLIC-KEY is a valid user_authentication option in the config file, but will only work with JAMS v. 6.4.26 or later.
Currently, the PAM support needs to have a PAM configuration file for jams-agentd. This is expected to be in the /etc/pam.d directory. When installing jams-agentd, the installer will attempt to create this file by copying the file for sshd with certain edits.
The PAM support only uses auth and account parts. No password updates are possible, nor is a session used.
It should be possible to authenticate with SSH using PAM (with the pam_ssh.so module), but this is not the same as the PUBLIC-KEY authentication. In this case, the JAMS User would need to have a Password that unlocks the Private Key on the target machine, but not a Key Management setting.
Option | Description |
---|---|
-c-config-file <config_file> | Use an alternate configuration file |
-d/--daemon-mode | Fork/exit the program to run in the background |
-l--log-level <level> | Set the logging lvel to ERROR, WARN, INFO, DEBUG, or TRACE |
-p/--port-number <port> | Listen on alternate port |
Command | Description |
---|---|
-c/-config-file <config_file/-> | Create config_file with default settings or send to standard out |
-I/-install-service | Install jams-agentd as an auto-started service |
-K/-kill-daemon | Kill running daemon |
-P/-pam-file <pam_file> | Create pam configuration file for jams-agentd or send to standard out |
-Q/-query-status | Test if the daemon is currently executing |
-R/-remove-service | Remove the auto-started jams-agentd service |
-S/-service-file <service_file/-> | Create service start-up script or send to standard out |
-U/-update-config <config_file> | Update an existing config-file with new configuration settings |
-V/-version | Print the current version |