Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


15.9.1 Setting automatic startup and termination of the JP1/AJS3 service

The JP1/AJS3 service can be started automatically when the system starts, and can be terminated automatically when the system terminates.

Organization of this subsection

(1) Setting automatic startup and termination of the JP1/AJS3 service (JP1/AJS3 - Manager)

The following describes how to set automatic startup and termination of the JP1/AJS3 service (JP1/AJS3 - Manager).

Cautionary note:

For AIX, after performing the following procedure, you need to perform the procedure titled Setting the automatic start and stop script in the Release Notes.

(a) Setting automatic startup of the JP1/AJS3 service (JP1/AJS3 - Manager)

To ensure that the JP1/AJS3 service is started automatically when the system starts:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file (automatic start shell script), delete the shaded part shown below.

    [Figure]

    When you delete the shaded part, take note of the following.

    Cautionary note:

    Before you set automatic startup of the JP1/AJS3 services in an environment in which upgrade from JP1/AJS2 - Manager and migration to a standard configuration are complete, you must copy the jajs_start.model file to the jajs_start file. If the jajs_start file has been customized, you must check the customization status before copying the file. Then customize the file again after copying it.

    Be careful if you finished an upgrade installation but did not specify the settings for enhancing the embedded database management function. In such a case, do not uncomment the entry : # WAIT_READY=YES in the standard configuration. If you uncomment this entry, JP1/AJS3 - Manager fails to start. For details about the settings for enhancing the embedded database management function, see 13.5.1 Settings for enhancing the embedded database management function.

    When the OS is other than Solaris 11, the setting operation is complete with this step.

    When the OS is Solaris 11, you must set the JP1_HCCNETSOCK environment variable by following the subsequent steps.

  3. In the automatic start shell script, find the following line:

    unset LC_MESSAGES
  4. Insert the following entries before the line:

    JP1_HCCNETSOCK=JP1_AJS
    export JP1_HCCNETSOCK
  5. To use the host as a container host machine, in the automatic start shell script, delete the following shaded parts:

    [Figure]

This completes the setting for automatic startup of the JP1/AJS3 service.

(b) Setting automatic startup of the JP1/AJS3 service (JP1/AJS3 - Manager) to change the settings for the function that waits for connection to the RDB

The following describes how to change the maximum wait time for connection to the RDB and how to change the setting for the function that waits for connection to the RDB.

Note that both the embedded database and the function are enabled by default if JP1/AJS3 is installed as an upgrade from JP1/AJS2 07-10 or an earlier version.

To change the maximum wait time for connection to the RDB:

  1. Execute the following command:

    jajs_config -k "[{JP1_DEFAULT|logical-host}\JP1AJSMANAGER\scheduler-service]" "RDBCONNECTWAITTIME"=maximum-wait-time-for-connection-to-the-RDB

    The specification of the {JP1_DEFAULT|logical-host} part depends on whether the host is a physical host or a logical host. For a physical host, specify JP1_DEFAULT. For a logical host, specify the logical host name.

    For example, if you change the maximum wait time for the AJSROOT1 scheduler service on the physical host, you might be able to execute the following command:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]"
     "RDBCONNECTWAITTIME"=dword:00000001

    For details about the RDBCONNECTWAITTIME environment setting parameter, see 20.4.2(51) RDBCONNECTWAITTIME.

    Important

    To use the function that waits for connection to the RDB in a cluster environment, perform the above task on both the primary and secondary nodes. Make sure that you specify the same value on both nodes.

Before the function that waits for connection to the RDB can be used, automatic startup of JP1/AJS3 at system startup must be enabled. To enable automatic startup, in the /etc/opt/jp1ajs2/jajs_start file, delete the shaded part shown below:

[Figure]

The following notes also apply:

  • On a physical host

    If JP1/AJS3 - Manager was installed as an upgrade installation but the settings for enhancing the embedded database management function were not specified:

    In a standard configuration, if you use the functionality that waits for connection to the RDB with WAIT_READY=YES (the system waits for jajs_spmd startup) enabled when the system is restarted, the scheduler service will fail to start. If you want to use the function, add the comment symbol to disable the specification as follows: : # WAIT_READY=YES

    If JP1/AJS3 - Manager was installed as a new installation, or if JP1/AJS3 - Manager was installed as an upgrade installation and the settings for enhancing the embedded database management function were specified after the upgrade installation:

    No problem is caused if the WAIT_READY=YES specification is enabled.

    For details about the settings for enhancing the embedded database management function, see 13.5.1 Settings for enhancing the embedded database management function.

  • On a logical host

    No problem is caused if the WAIT_READY=YES specification is enabled.

This completes changing of the settings. The new settings are applied the next time that JP1/AJS3 starts.

Cautionary notes:

If the scheduler service fails to start at system startup, and the KAVS0999-W (a wait started) and KAVS0998-E (a wait failed) messages have been output, check the following points:

  • Whether the embedded database has been set up

    If the embedded database specified in the scheduler service is not running, regardless of how long JP1/AJS3 waits, connection to the database will not succeed.

    Confirm that the scheduler service is up and running without problem during setup.

  • Whether the embedded database definition has been changed

    If the startup method is changed after the embedded database has been set up, the embedded database might be unable to start when the system starts. If this problem occurs, restore the initial values that were set during setup.

  • Whether the embedded database terminated abnormally when it terminated previously

    If the embedded database terminates abnormally during the execution of a job, it might take time for the embedded database to start the next time. If startup of the embedded database takes time, the embedded database might not start within the default maximum wait time. Accordingly, make sure that you do not force the embedded database to terminate.

  • Whether the comment symbol (: #) on the WAIT_READY=YES line in the jajs_start file has been deleted

    If the comment symbol (: #) has been deleted, add it to disable the WAIT_READY=YES specification.

If you know how long startup of the embedded database is delayed, you can also increase the maximum wait time for connection to the database.

(c) Setting automatic termination of the JP1/AJS3 service (JP1/AJS3 - Manager)

To ensure that the JP1/AJS3 service is terminated automatically when the system terminates:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file (automatic termination shell script), delete the shaded part shown below.

    [Figure]

    When you delete the shaded part, take note of the following.

    Cautionary note:

    • If you are using event jobs, enable the WAIT_READY=YES setting.

    • If you delete the comment marker in :# WAIT_READY=YES, (WAIT_READY=YES is enabled), the system stops after confirming that the JP1/AJS3 services have stopped. If you do not delete the comment marker in :# WAIT_READY=YES, (WAIT_READY=YES is disabled), the system stops without waiting for the JP1/AJS3 services to stop. Therefore, the embedded database process or the JP1/Base service might stop before the JP1/AJS3 services stop. If you are not using event jobs, enable or disable the WAIT_READY=YES setting based on the operation to be performed. The following table describes the JP1/AJS3 operation and effect for each setting of the comment.

      Table 15‒72: Operation and the effect of the automatic stop setting for a JP1/AJS3 service (JP1/AJS3 - Manager) according to whether WAIT_READY=YES is enabled or disabled

      Whether WAIT_READY=YES is enabled or disabled

      Operation on stopping

      Effect of the setting

      Result of the effect

      Disabled (the comment marker in:# WAIT_READY=YES is not deleted)

      The system stops without waiting for the JP1/AJS3 service to stop.

      The embedded database process or the JP1/Base service might stop before the JP1/AJS3 service stops, and an error message such as KAVS0932-E or KAVS0863-E is output to syslog or the integrated trace log

      Because restarting of the JP1/AJS3 service is not affected, no action is required.

      If you use an ISAM file as the execution environment settings file for QUEUE jobs and submit jobs, and the system stops early, the ISAM file might become invalid. The next time the service starts, a message (KAVU5501-E) is output, and QUEUE jobs and submit jobs will fail to start.

      See 2.11 Troubleshooting problems related to invalid ISAM files in the manual JP1/Automatic Job Management System 3 Troubleshooting and check the state of the ISAM file. If the ISAM file is invalid, re-create it.

      Enabled (the comment marker in :# WAIT_READY=YES is deleted)

      The system stops after confirming that the JP1/AJS3 service has stopped.

      The system waits until the JP1/AJS3 service has stopped.

      No action is needed.

  3. To use the host as a container host machine, in the automatic stop shell script, delete the following shaded parts:

    [Figure]

This completes the setting for automatic termination of the JP1/AJS3 service.

(2) Setting automatic startup and termination of the JP1/AJS3 service (JP1/AJS3 - Agent)

The following describes how to set automatic startup and termination of the JP1/AJS3 service (JP1/AJS3 - Agent).

Cautionary note:

For AIX, after performing the following procedure, you need to perform the procedure titled Setting the automatic start and stop script in the Release Notes.

(a) Setting automatic startup of the JP1/AJS3 service (JP1/AJS3 - Agent)

To ensure that the JP1/AJS3 service is started automatically when the system starts:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file (automatic start shell script), delete the shaded part shown below.

    [Figure]

    When you delete the shaded part, take note of the following.

    Cautionary note:

    Note that if you delete the comment symbol from the : # WAIT_READY=YES specification, the system will wait until the JP1/AJS3 service starts. That is, system startup will require a longer time. If system startup has precedence, do not delete the comment symbol.

    When the OS is other than Solaris 11, the setting operation is complete with this step.

    When the OS is Solaris 11, you must set the JP1_HCCNETSOCK environment variable by following the subsequent steps.

  3. In the automatic start shell script, find the following line:

    unset LC_MESSAGES
  4. Insert the following entries before the line:

    JP1_HCCNETSOCK=JP1_AJS
    export JP1_HCCNETSOCK
  5. To use the host as a container host machine, in the automatic start shell script, delete the following shaded parts:

    [Figure]

This completes the setting for automatic startup of the JP1/AJS3 service.

(b) Setting automatic termination of the JP1/AJS3 service (JP1/AJS3 - Agent)

To ensure that the JP1/AJS3 service is terminated automatically when the system terminates:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file, delete the shaded parts shown below.

    [Figure]

    When you delete the shaded part, take note of the following.

    Cautionary notes:

    • If you are using event jobs, enable the WAIT_READY=YES setting.

    • If you delete the comment marker in :# WAIT_READY=YES (WAIT_READY=YES is enabled), the system stops after confirming that the JP1/AJS3 services have stopped. If you do not delete the comment marker in :# WAIT_READY=YES (WAIT_READY=YES is disabled), the system stops without waiting for the JP1/AJS3 services to stop.

      If you are not using event jobs, enable or disable the WAIT_READY=YES setting based on the operation to be performed.

  3. To use the host as a container host machine, in the file, delete the following shaded parts:

    [Figure]

This completes the setting for automatic termination of the JP1/AJS3 service.

(3) Setting automatic startup and termination of the queueless agent service and queueless file transfer service

The queueless agent service or queueless file transfer service can be started when the system starts or can be terminated when the system terminates if the automatic start or termination script is set to perform this.

Note that the queueless file transfer service is available in JP1/AJS3 - Manager but is not available in JP1/AJS3 - Agent. The setting for the service is required in JP1/AJS3 - Manager only.

(a) Setting automatic startup and termination of the queueless agent service

The following describes how to set automatic startup and termination of the queueless agent service.

■ Setting automatic startup of the queueless agent service

To ensure that the queueless agent service is started automatically when the system starts, you must set the automatic start script.

To set automatic startup of the queueless agent service in the automatic start script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. To use the host as a container host machine, in the file, delete the following shaded parts:

    [Figure]

  4. Close the file.

■ Setting automatic termination of the queueless agent service

To set automatic termination of the queueless agent service in the automatic termination script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(b) Setting automatic startup and termination of the queueless file transfer service

The following describes how to set automatic startup and termination of the queueless file transfer service.

■ Setting automatic startup of the queueless file transfer service

To ensure that the queueless file transfer service is started automatically when the system starts, you must set the automatic start script so that this is done.

To set automatic startup of the queueless file transfer service in the automatic start script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

■ Setting automatic termination of the queueless file transfer service

To set automatic termination of the queueless file transfer service in the automatic termination script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(4) Setting automatic startup and termination of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service

The following describes how to set automatic startup and termination of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service.

(a) Setting automatic startup of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service

To ensure that the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service is started automatically when the system starts, you must set the automatic start script.

To set automatic startup of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service in the automatic start script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. To use the JP1/AJS3 Check Agent service on a container host machine, in the file, delete the following shaded parts:

    [Figure]

  4. Close the file.

(b) Setting automatic termination of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service

To set automatic termination of the JP1/AJS3 Check Manager service or the JP1/AJS3 Check Agent service in the automatic termination script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(5) Setting automatic startup and termination of the JP1/AJS3 Autonomous Agent service or the JP1/AJS3 Autonomous Agent Messenger service

The following describes how to set automatic startup and termination of the JP1/AJS3 Autonomous Agent service or the JP1/AJS3 Autonomous Agent Messenger service.

(a) Setting automatic startup of the JP1/AJS3 Autonomous Agent service or the JP1/AJS3 Autonomous Agent Messenger service

To start the JP1/AJS3 Autonomous Agent service or JP1/AJS3 Autonomous Agent Messenger service automatically when the system starts, set the automatic start script. The following describes how to set the automatic start script:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. To use the host as a container host machine, in the file, delete the following shaded parts:

    [Figure]

  4. Close the file.

(b) Setting automatic termination of the JP1/AJS3 Autonomous Agent service or the JP1/AJS3 Autonomous Agent Messenger service

The following describes how to set the automatic termination script for the JP1/AJS3 Autonomous Agent service or JP1/AJS3 Autonomous Agent Messenger service:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_stop
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(6) Setting automatic startup and termination of the JP1/AJS3 HTTP Server service or the JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console)

The following describes how to set automatic startup and termination of the JP1/AJS3 HTTP Server service or the JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console).

(a) Setting automatic startup of the JP1/AJS3 HTTP Server service or the JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console)

To start the JP1/AJS3 HTTP Server service or JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console) automatically when the system starts, set the automatic start script. The following describes how to set the automatic start script:

  1. Open the following file with a text editor such as vi:

    /etc/rc.d/init.d/jp1ajs3web
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(b) Setting automatic termination of the JP1/AJS3 HTTP Server service or the JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console)

The following describes how to set the automatic termination script for the JP1/AJS3 HTTP Server service or JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console):

  1. Open the following file with a text editor such as vi:

    /etc/rc.d/init.d/jp1ajs3web
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.

(c) Setting the language type when the JP1/AJS3 HTTP Server service and JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console) are started

To set the language type when the JP1/AJS3 HTTP Server service and JP1/AJS3 Web Application Server service (JP1/AJS3 - Web Console) are started:

  1. Open the following file with a text editor such as vi:

    /etc/rc.d/init.d/jp1ajs3web
  2. In the file, change the shaded character shown below to any of the values indicated in the table:

    [Figure]

    Table 15‒73: Value that can be set for LANG

    Language

    Value that can be set for LANG

    Japanese

    • ja_JP.UTF-8

    • ja_JP.utf8

    • ja_JP.SJIS#

    • ja_JP.sjis#

    English

    C

    #:

    Can be used only in SUSE Linux.

  3. Close the file.

(7) Outputting the JP1/AJS3 process status when JP1/AJS3 is started automatically

The JP1/AJS3 process status can be output when JP1/AJS3 services are started automatically. To enable output of the process status, you must set the automatic start script.

Cautionary note:

Be careful if you installed JP1/AJS3 - Manager as an upgrade installation but did not specify the settings for enhancing the embedded database management function. In such a case, do not uncomment the entry : # WAIT_READY=YES in step 3 of the procedure described below. If you uncomment this entry, JP1/AJS3 - Manager fails to start. If JP1/AJS3 - Manager fails to start, the automatic start script for outputting the processing status also fails to start.

For details about the settings for enhancing the embedded database management function, see 13.5.1 Settings for enhancing the embedded database management function.

To specify the settings for outputting the JP1/AJS3 process status when JP1/AJS3 is started automatically:

  1. Open the following file with a text editor such as vi:

    /etc/opt/jp1ajs2/jajs_start
  2. In the file, delete the shaded part shown below.

    [Figure]

  3. In the file, uncomment the entry : # WAIT_READY=YES.

  4. Close the file.

(8) Setting the process behavior when memory becomes insufficient (AIX only)

In AIX, if memory becomes insufficient, the system might issue SIGKILL, causing the JP1/AJS3 process to terminate. To prevent termination, set early for the PSALLOC environment variable, and start JP1/AJS3.

Note that the NODISCLAIM environment variable must be set to true if the PSALLOC environment variable is set to early.

The following shows an example of setting the process behavior in the automatic script.

To set the process behavior in the automatic start script:

  1. In the automatic start script, find the following line:

    unset LC_MESSAGES
  2. Insert the following entries before the line:

    ------------------------- Start of entries to be inserted
    PSALLOC=early
    NODISCLAIM=true
    export PSALLOC NODISCLAIM
    ------------------------- End of entries to be inserted
    unset LC_MESSAGES
    cd /opt/jp1ajs2/bin
    Cautionary note:

    If you set automatic startup of the queueless agent service, queueless jobs are executed with early set for the PSALLOC environment variable.

    If you do not want to set early for the PSALLOC environment variable when queueless jobs are executed, change the applicable login scripts as shown in the following example:

    if [ "$JP1JobID" != "" ] ; then

    unset PSALLOC >/dev/null 2>/dev/null

    unset NODISCLAIM >/dev/null 2>/dev/null

    fi

    For details about how to change the applicable login script, see 13.4.2 Changing the login scripts.

(9) Setting automatic startup and termination of the JP1/AJS3 service that do not depend on the JP1_HOSTNAME environment variable

The JP1/AJS3 service can be automatically started or terminated without being depending on the JP1_HOSTNAME environment variable set in the environment.

To ensure that the JP1/AJS3 service is automatically started or terminated without being dependent on the JP1_HOSTNAME environment variable:

  1. Open the following file with a text editor such as vi:

    (a) For automatic startup of the JP1/AJS3 service

    /etc/opt/jp1ajs2/jajs_start

    (b) For automatic termination of the JP1/AJS3 service

    /etc/opt/jp1ajs2/jajs_stop

  2. In the file, delete the shaded part shown below.

    [Figure]

  3. Close the file.