Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide


7.8 Notes on using flexible jobs

The following provides notes on using flexible jobs for each agent host OS:

Notes common to all OSs:
  • OSs that can be used for relay, broadcast, and destination agents

    Only Windows or Linux hosts can be specified as relay, broadcast, and destination agents that are used to execute flexible jobs. If you define a flexible job in an OS other than Windows or Linux, you must specify a relay agent.

  • Forced termination of a flexible job

    If you forcibly terminate a flexible job, the job itself is terminated but the programs running on the destination agent are not forcibly terminated.

  • Notes on physical and logical hosts

    You can execute flexible jobs on physical hosts only. If you specify the name of a logical host as the name of the destination agent, the flexible job will be executed on the physical host.

  • Notes on user mapping

    User mapping must be possible on both the relay and destination agents. If you choose to use a relay agent, set either the host name of the relay agent or * (asterisk) for Server host in the user mapping definition on the destination agent.

  • Notes on the FXJOB_MONITOR_TIMEOUT environment setting parameter

    - The status of flexible jobs changes to Ended abnormally when the time specified in the FXJOB_MONITOR_TIMEOUT environment setting parameter elapses. The default value of this parameter is 60 minutes. If you have flexible jobs that require 60 or more minutes for execution, explicitly set a proper value for the FXJOB_MONITOR_TIMEOUT environment setting parameter.

    - If an error occurs during execution of a flexible job, it might take the time specified for the FXJOB_MONITOR_TIMEOUT environment setting parameter (default: 60 minutes) before the job status changes to Ended abnormally.

  • Note applicable if a communication error occurs

    If a communication error occurs, the status of a flexible job changes to Ended abnormally. In this case, however, the user program might still be running normally on the destination agent. If the status of a flexible job changes to Ended abnormally, take action according to the execution result of the user program.

  • Note on commands that do not support data input from the standard input file

    You cannot execute commands that do not support data input from the standard input file. These commands include the Windows timeout command.

  • Note on stopping services

    Do not stop the JP1/AJS3 Autonomous Agent service or JP1/AJS3 Autonomous AgentMessenger service on relay and destination agents while a flexible job is being executed. If you do so, the status of the flexible job will change to Ended abnormally. In this case, the job might remain in Now running status until the time specified for the FXJOB_MONITOR_TIMEOUT environment setting parameter elapses (default: 60 minutes).

  • Note on the working path for flexible job execution

    You cannot change the working path for flexible job execution. The working path for flexible job execution is as follows:

    - In Windows, if the JP1/AJS3 installation folder is the default installation folder or is in a folder protected by the system:

    %ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2\tmp\AJSFX_WORK_00000001

    - In Windows, if the JP1/AJS3 installation folder is other than the above:

    JP1/AJS3-installation-folder\tmp\AJSFX_WORK_00000001

    - In UNIX:

    /var/opt/jp1ajs2/tmp/AJSFX_WORK_00000001

  • Note on re-executing a flexible job

    If you re-execute or retry a flexible job when a load balancer is used, the execution hosts to which the job will be distributed are re-determined.

    If you re-execute a flexible job when broadcast execution is used, the job is re-executed on all destination agents.

  • About use with a remote jobnet

    Using a flexible job with a remote jobnet is not recommended. If you use a flexible job with a remote jobnet, both the execution request of the flexible job and the definition of the remote jobnet are forwarded as shown below. This might make it difficult to identify the cause of any problem that occurs.

  1. The definition of a remote jobnet on a manager host is forwarded to another manager host.

  2. The destination manager host requests a relay agent to execute a flexible job.

  3. The relay agent requests a load balancer to execute a program.

  4. The load balancer requests the destination agent to execute the program.

  • Precaution applying if a passing information setting job is specified as the succeeding job of a flexible job

    The maximum size of a standard output file that a passing information setting job succeeding a flexible job can inherit is 4,096 bytes. If the size of the output data exceeds 4,096 bytes, only the first 4,096 bytes are available (data beyond this is ignored). The 4,096-byte limitation is applied on both the relay agent and the destination agent. Therefore, if the relay agent and the destination agent use different character encodings, the output data must not exceed 4,096 bytes in either character encoding. Note that if a multibyte character is split at the 4,096th byte, the multibyte character is replaced by a question mark (?).

  • Do not include a command that shuts down the OS in a flexible job

    Do not execute a flexible job that includes a command for shutting down the operating system of the local host, relay agent, or destination agent. Because Windows does not wait for JP1/AJS3 to stop before it shuts down, there might be damage to the JP1/AJS3 data files if Windows shuts down while JP1/AJS3 is running. If you want to shut down the OS from a job, use a Local Power Control job in conjunction with the JP1/Power Monitor.

    To shut down the system manually, use the power control command (aompwcon command) of JP1/Power Monitor. If you want to shut down the system manually but do not have JP1/Power Monitor installed, stop the JP1/AJS3 service manually before shutting down the OS.

  • About checking of the job status on destination agents when broadcast execution is used

    If a flexible job is executed by broadcast execution, you cannot use JP1/AJS3 - View to check the execution status of the job on the destination agents. To manage the job status on the destination agents, use a standard job rather than a flexible job.

  • About execution results of broadcast execution

    When a flexible job is executed by broadcast execution in sync mode, the destination agents output the execution results to their respective standard error outputs. If you use JP1/AJS3 - View to check the execution result of the flexible job, the contents of those standard error outputs are merged, which might result in a large amount of data. Therefore, to prevent large data amounts, the size of each standard error output is limited to a maximum of 384 bytes. If the data that is output to a standard error output exceeds 384 bytes, only the first 384 bytes are output.

  • About the IP addresses used for broadcast execution

    To perform broadcast execution of a flexible job, the broadcast agent and each broadcast-execution destination agent must have IP addresses that can mutually communicate.

  • Notes on the job execution time when the broadcast execution function is used

    If broadcast execution is performed while some broadcast-destination agents cannot communicate for a length of time exceeding the value set by the environment setting parameter FXBC_MANAGEDAGT_REMOVEDTIME, the job might take a long time to end normally (even if the job was executed properly and has finished) because of the following reason.

    It takes time to judge whether a connection from a broadcast agent to a broadcast-destination agent has timed out. However, processing continues by deleting the broadcast-destination agents that are unable to communicate and treating these agents as if they do not exist.

  • Use the connection source restriction function

    If you use the connection source restriction function, connections from the manager host to the relay agent can be restricted by the agent connection permission configuration file on the relay agent. However, connections from the manager host or the relay agent to the destination agent cannot be restricted by the connection source restriction function.

    For details about connection source restrictions, see 2.3.9 Restricting hosts that can access JP1/AJS3 in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.

  • Note on length of a host name

    To use a flexible job, make sure that the following hosts have a host name that is not longer than 128 bytes:

    - Manager host

    - Relay agent

    - Broadcast agent

    - Destination agent

Notes applicable if the OS of the agent host is Windows:
  • About the UAC function

    If the Windows UAC function is enabled, all OS users, except the built-in user Administrator, will lose administrator permissions. Therefore, if the UAC function is enabled, you cannot use flexible jobs to execute any operations that require administrator permissions.

  • Avoiding a system resource shortage

    If you execute more than a specific number of jobs concurrently, you might encounter a shortage of a system resource (desktop heap) and an error might occur depending on the system environment. In this case, consider taking the following action:

    - Change the JP1/AJS3 service account to a user account. By setting the JP1/AJS3 service account to a user account that differs from the accounts of other services and the user account of the logon user, you can use the system without sharing the desktop heap.

    - You can decrease consumption of the desktop heap by setting the account of the OS user frequently used for flexible job execution to the same account as the JP1/AJS3 service account.

  • Using space characters in an application file name

    If an application file name with an extension associated with a file type contains a space character, check whether the file type is registered correctly in the File Types page in Explorer. Then, enclose the application file name with double quotation marks (").

  • Use file names of 254 bytes or less in flexible jobs

    A job might enter Failed to start or Ended abnormally status if any of the following file names specified in the job is 255 bytes or longer:

    - The executable file of the job

    - The environment variable file for the job

    - The end judgment file for the job

    Make sure that the above file names have no more than 254 characters.

  • Note on a job that requires a user profile

    Because no user profile is loaded when a flexible job is run, a task that requires a user profile cannot be performed by a flexible job.

Notes applying if the OS of the agent host is Linux:
  • Return codes that can be set by flexible jobs

    Flexible jobs can set return code values from 0 to 255. If a job fails to start, or if acquisition of standard output data or standard error output data fails, the return code is set to -1.

  • Preventing flexible jobs from entering Failed-to-start status

    Check whether the user who starts the JP1/AJS3 service and the OS user who executes flexible jobs have read and right permissions on the following files and directories. If those users do not have those permissions, the status of flexible jobs might change to Failed to start. To prevent this, make sure that the user who starts the JP1/AJS3 service has read and write permissions on the following files and directories:

    - Home directory of the OS user who executed the job

    - Log files used for job execution control#

#

For details about the log files used in job execution control, see 1.2.5 List of log files and directories in the manual JP1/Automatic Job Management System 3 Troubleshooting.

  • Resource limits when flexible jobs are executed

    In JP1/AJS3 for UNIX, the resource limits in effect at JP1/AJS3 startup apply when a job is executed. To apply resource limits, set them for the root user who starts JP1/AJS3. However, if you specify a limit in the flexible job to be executed, the value specified in the job takes effect. For details, see 20.5 Setting up the job execution environment in the JP1/Automatic Job Management System 3 Configuration Guide.

    The following is an example of changing file size limits:

  1. In the login profile for the root user (usually [/.profile] ($HOME/.profile)), include the setting below:

    For fsize, specify the required file size. If you do not want to impose a limit, specify unlimited.

    ulimit -f fsize

  2. Log in as the root user.

  3. From the root account, start the JP1/AJS3 service.

    The fsize value takes effect.

Cautionary note

The resource limits you define in the resource settings file for the OS (/etc/security/limits.conf) apply only to processes started by users using the login command over a telnet connection or similar. Because flexible jobs started by JP1/AJS3 take the form of processes started by a service, the settings in the file do not apply.

  • Notes on the LANG environment variable when a flexible job is executed

    Set the same type of character encoding for the following LANG environment variables:

    - The LANG environment variable when the JP1/AJS3 Autonomous Agent service starts

    - The LANG environment variable when the JP1/AJS3 Autonomous Agent Messenger service starts

    - The LANG environment variable for the login profile of the root user

  • Precautions applying when the JP1/AJS3 service starts automatically

    In a system where the JP1/AJS3 service starts automatically, the login profile of the root user is not loaded. For this reason, even if you change the resource limits in the login profile of the root user, different limits might apply when you log in manually and start the JP1/AJS3 service. In this case, set resource limits in the environment setting parameters of the job execution environment. For details about these parameters, see 20.5 Setting up the job execution environment in the JP1/Automatic Job Management System 3 Configuration Guide.

    You can also write resource limits into the automatic start script (/etc/opt/jp1ajs2/jajs_start) of JP1/AJS3. If you do so, test your settings thoroughly before using the system.

    Note that flexible jobs might be executed under a group ID that differs from the group ID set for the root user at login. For details, see 5.4.12 Group ID for job execution (UNIX only) in the manual JP1/Automatic Job Management System 3 Overview.

  • Executing a user program that requires a terminal as a job

    In the UNIX version of JP1/AJS3, if a user program that requires a terminal is executed as a job, the user program might not operate correctly (the flexible job might end abnormally).

  • Registering or changing an OS user

    While a flexible job is running, do not use the passwd command with administrator privileges to register or update the OS user associated with the job. Register or update the OS user information before you run the job.

Note applying if the OS of the manager host is Linux, and the relay agent is not specified or the relay agent host is Linux:
  • Note on login shells

    For the login shell of an OS user that is mapped to a JP1 user, bash or sh needs to be specified.