jajs_setup_cluster
- Organization of this page
Format
- For JP1/AJS3 - Manager:
jajs_setup_cluster [-h logical-host-name] -F scheduler-service-name {-d shared-directory-name [-n scheduler-service-ID-number] [-m {cold|warm|hot}] {-P embedded-database-port-number -I embedded-database-setup-ID [-M {s|m|l}] [-E {byte | sjis}] [-B] | -S} | [-S | -C embedded-database-settings-file-name]} [-R]
- For JP1/AJS3 - Agent:
jajs_setup_cluster [-h logical-host-name] [-d shared-directory-name]
Format 1 (for setting up JP1/AJS3 - Manager on the primary node)
jajs_setup_cluster [-h logical-host-name] -F scheduler-service-name -d shared-directory-name [-n scheduler-service-ID-number] [-m {cold|warm|hot}] {-P embedded-database-port-number -I embedded-database-setup-ID | [-M {s|m|l}] [-E {byte | sjis}] [-B] | [-S]}
Format 2 (for setting up JP1/AJS3 - Manager on the secondary node)
jajs_setup_cluster [-h logical-host-name] -F scheduler-service-name [-S | -C embedded-database-settings-file-name]
Format 3 (for setting up JP1/AJS3 - Agent on the primary node)
jajs_setup_cluster [-h logical-host-name] -d shared-directory-name
Format 4 (for setting up JP1/AJS3 - Agent on the secondary node)
jajs_setup_cluster [-h logical-host-name]
Format 5 (for setting up JP1/AJS3 - Manager on the primary and secondary nodes at the remote site)
jajs_setup_cluster [-h logical-host-name] -F scheduler-service-name -R
Description
The jajs_setup_cluster command sets up a JP1/AJS3 operating environment appropriate for the logical host. The command must be executed on both the primary and secondary nodes during setup of a cluster system environment.
Before you execute the jajs_setup_cluster command, make sure that the JP1/Base physical and logical environments have been set up.
This command creates a logical host environment by copying the environment of the physical hosts. Scheduler services are created by copying the settings of the default scheduler service on the physical hosts. If no scheduler service has been defined as the default, the command creates the scheduler service on the logical host by copying the setup of the scheduler service that has the smallest identifier number (set in the AJSSERVICEID environment setting parameter) among all the existing scheduler services on the physical host.
With the -R option specified, a scheduler service is added to the JP1/AJS3 logical host when setup of JP1/AJS3 - Manager on the primary and secondary nodes at the remote site has finished.
Execution privileges
In Windows: Administrators privileges
In UNIX: Superuser privileges
Arguments
-h logical-host-name
Specify the name of the logical host to be set up (a logical host name set in JP1/Base).
You can specify a character string of 1 to 32 bytes.
The environment will be created under the logical host name specified in this option.
The value of this option overrides the value of the JP1_HOSTNAME environment variable. If you omit this option, the value of JP1_HOSTNAME is assumed as the logical host name.
The command terminates abnormally in the following cases:
-
When you omit this option and the JP1_HOSTNAME environment variable has not been set
-
When a physical host name JP1_DEFAULT is specified as the logical host name of the logical host you are setting up
-
When you are setting up the primary node and the JP1/AJS3 logical host is not reachable using the IP address resolved from the logical host name
-F scheduler-service-name
- When setting up the primary node for JP1/AJS3 - Manager:
-
Specify the name of the scheduler service you want to create.
If you specify the name of an existing scheduler service, the command terminates abnormally.
- When setting up the secondary node for JP1/AJS3 - Manager:
-
Specify the scheduler service name that you specified on the primary node.
If you specify the scheduler service name other than the above, the command terminates abnormally.
- When setting up the remote site to enable disaster recovery operation up for JP1/AJS3 - Manager:
-
Specify the scheduler service name that you specified on the primary node of the main site.
If you specify the scheduler service name other than the above, the command terminates abnormally.
You can specify a character string of 1 to 30 bytes.
For the characters you can specify in a scheduler service name, see the note about scheduler services under Table 20-2 Environment setting parameters (scheduler service environment setup) in 20.4 Setting up the scheduler service environment in the JP1/Automatic Job Management System 3 Configuration Guide.
You cannot omit this option when you perform setup for JP1/AJS3 - Manager.
-d shared-directory-name
Specify the full path name of the mount-point directory for the shared disk used to contain information that the secondary node can inherit from the primary node. You must specify an existing directory. If you specify a non-existent directory, the command terminates abnormally. Do not specify a disk on a network drive.
You can specify a character string of 1 to 122 bytes.
The command terminates abnormally if you specify the root directory (/) in UNIX or characters other than the drive letter (for example, C:) in the first two bytes of the character string in Windows.
You must specify this option when setting up the primary node. If you omit this option, the node is set up as the secondary node.
In the specified directory, the command creates the JP1AJS2 (in Windows) or jp1ajs2 (in UNIX) subdirectory, in which the environment definition files and execution environment for the logical host are created. However, if the subdirectory already exists, the command terminates abnormally. Before you use the jajs_setup_cluster command to set up the primary node, always mount the shared disk, and confirm that the subdirectory does not exist.
You cannot specify this option with the -C and -R options.
-n scheduler-service-ID-number
Use a decimal number to specify the number that identifies the scheduler service.
You can specify a value from 1 to 20.
You can specify this option only when setting up (with the -d option specified) the primary node in JP1/AJS3 - Manager.
Make sure that the ID number you specify is not used by the physical host or any logical host of the local host. If you specify an ID number that has already been used, the command terminates abnormally.
If you omit this option, the smallest available ID number is assumed. If the total number of scheduler services has already reached the maximum, assignment of the scheduler service ID number fails and the command terminates abnormally.
-m {cold|warm|hot}
Specify the scheduler service startup mode.
-
cold
The scheduler service is started in cold-start mode.
-
warm
The scheduler service is started in warm-start mode.
-
hot
The scheduler service is started in hot-start mode.
You can specify this option only when setting up (with the -d option specified) the primary node in JP1/AJS3 - Manager.
If this option is omitted, the command assumes the value of the STARTMODE environment setting parameter for the scheduler service specified in the DEFAULTSERVICENAME environment setting parameter on the physical host.
-P embedded-database-port-number
Specify the port number of the embedded database used on the logical host if you also want to set up the embedded database during setup of the logical host.
You can specify a value from 5001 to 65535.
You cannot specify a port number that has already been used by another program. Make sure that the port number you specify is not used by another program. If the port number specified in this option is also used by another application, a problem with either the application or the embedded database occurs. If a problem occurs, change the port number of either the application or the embedded database.
You cannot omit this option if you want to set up the embedded database at the same time that setup (with the -d option specified) of the primary node in JP1/AJS3 - Manager is performed.
You cannot specify this option with the -C, -R, and -S options.
-I embedded-database-setup-ID
Specify _JFn (n: 1 to 9 or A to Z) as a four-character setup ID of the embedded database to be used on the logical host if you also set up the embedded database during setup of the logical host. Make sure that the setup ID you specify has not yet been registered in the system. If you specify a setup ID that has already been registered, the command terminates abnormally. You can use the ajsembdbidlist command to check the setup IDs that have already been registered. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup.
You cannot omit this option if you also set up the embedded database during setup of the primary node for JP1/AJS3 - Manager.
You cannot specify this option with the -C, -R, and -S options.
-M {s|m|l}
Specify the database model of the embedded database to be configured.
For details about the database model and disk requirements, see 23.2 Estimating the database area in the JP1/Automatic Job Management System 3 Configuration Guide.
If you configure the embedded database with l specified in this option, the auto-increment function of the embedded database is disabled. If you want to use this function, perform an advanced setup.
You cannot specify this option with the -C, -R, and -S options.
-E {byte|sjis}
Specifies for the database of the specified scheduler service whether the same number of characters can be specified for items such as a unit name in both Shift-JIS and UTF-8 environments. If you omit this option, the system assumes byte.
This option can be specified in UNIX, and cannot be specified in Windows.
You cannot specify this option with the-C, -R, or -S option.
-
byte
The database is set up so that the number of characters specifiable in a UTF-8 environment becomes the number of characters specified after conversion in UTF-8. If this option is specified, the number of characters specifiable for items such as a unit name in a Shift-JIS environment and a UTF-8 environment will not be the same.
If you execute the command with this option specified, byte is specified for the DEFLENTYPE environment setting parameter.
-
sjis
The database is set up so that the number of characters specifiable in a UTF-8 environment is converted to the number of characters specifiable in a Shift-JIS environment. If this option is specified, the number of characters that can be used in the definition items for a unit in the UTF-8 environment is the same as that in the Shift-JIS environment.
This setting applies to the following items:
-
Unit name in the detailed unit definition
-
Comment in the detailed unit definition
-
Exclusive jobnet in the schedule settings
If you execute the command with this option specified, sjis is specified for the DEFLENTYPE environment setting parameter and UTF-8 is specified for the AJSCHARCODE environment setting parameter.
-
-B
Specify this option to enable the backup enhancement function when an embedded database is used. If you omit this option, the backup enhancement function is not enabled.
You cannot specify this option with the -C, -R, and -S options.
-C embedded-database-settings-file-name
Specify the embedded database settings file.
The number of characters you can specify is from 1 to 255 (bytes).
When creating a cluster environment on a secondary node, copy the following embedded database settings file located on the primary node to the secondary node.
- In Windows:
-
embedded-database-practical-directory\conf\ajsdbst\ajsembdb-setup-identifier.conf
- In UNIX:
-
embedded-database-practical-director/conf/ajsdbst/ajsembdb-setup-identifier.conf
If you specify the -M option when creating the primary node you must specify this option. If you specify this option when creating an environment on the primary node, the KAVS0116-E message is output, and the command ends abnormally. If the contents of the embedded database settings file are invalid, the KAVS2130-E message is output, and the command ends abnormally.
You cannot specify this option for embedded databases configured in JP1/AJS3 version 09-50 or earlier.
This option cannot be specified together with options other than the -h and -F options.
Before performing an advanced setup for the embedded database on the executing host, create the following directories on the standby host just as they are specified on the executing host:
-
Unload log file creation directory
-
Embedded database work area directory
-
Embedded database installation directory
Note that during setup of the executing host, if you specify a directory on the local disk as the unload log file creation directory, you must also create an unload log file creation directory on the standby host.
-S
Specify this option to set up an embedded database separately by performing an advanced setup instead of setting up the embedded database by using the regular method. After you execute the jajs_setup_cluster command with this option specified, complete configuration of the embedded database.
If you execute the jajs_config, jajs_setup, or jajs_setup_cluster command before completing configuration, the command outputs the KAVS1516-E error message and terminates abnormally.
For details about setting up the embedded database by performing an advanced setup, see 23.5 Advanced setup for the embedded database (in a cluster configuration) in the JP1/Automatic Job Management System 3 Configuration Guide.
You can specify this option only when you perform setup for JP1/AJS3 - Manager.
You cannot specify this option with the -C, -M, -R, -P and -I options.
-R
Specify this option to set up a logical host at the remote site in a disaster recovery environment.
You cannot specify this option with any other options except -h and -F.
Notes
-
Before you execute this command, stop all JP1/AJS3 services.
-
Do not execute this command more than once in quick succession.
-
Do not terminate this command forcibly.
-
This command copies the jp1ajs_spmd.conf file from the physical host to a logical host. For this reason, if you edit the jp1ajs_spmd.conf file on the physical host to set the startup of a process or to set the suppression of the startup process, the settings are passed to the logical host. In such cases, a process unnecessary for the logical host might start, or a process required for the logical host might not start. If the file was edited on the physical host, edit the file on the logical host so that only necessary processes are started.
For details about suppressing the startup process, see 13.1.6 Limiting JP1/AJS3 - Manager resources to those used for job operation in the JP1/Automatic Job Management System 3 Administration Guide.
-
If Windows Firewall is used, a pop-up message might be displayed during setup processing. If a pop-up message is displayed, registration in the Windows Firewall exceptions list is required. Take action by referring to the notes on the ajsembdbinstl command.
-
The command might terminate abnormally, outputting the following message: Database maintenance failed (func code=xx, error code=yy). If this message is output, take appropriate action according to the following table.
Value of xx
Action
1
Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbbuild command. Then re-execute the command.
2
Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbsetup command. Then re-execute the command.
3
Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbunset command. Then re-execute the command.
4
Correct the problem according to the error message output before this message, and then re-execute the command.
5
Check 2.7.8(1) Action to be taken if an error occurs during embedded database maintenance in the manual JP1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem.
6
Check 2.7.8(2) Action to be taken if an error occurs during installation of the embedded database in the manual JP1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem.
7
Check 2.7.8(3) Action to be taken if an error occurs during uninstallation of the embedded database in the manual JP1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem.
-
If an error occurs during command execution on the primary node, correct the cause of the error, and then delete the logical host information as described in Action to be taken if an error occurs on the primary node below. Then re-execute the command.
-
If an error occurs during command execution on the secondary node, correct the cause of the error, and then re-execute the command (without deleting logical host information).
-
Do not delete the scheduler service specified in the -F option when you set up JP1/AJS3 - Manager on the primary node. If you delete that scheduler service, setup on the secondary node will fail. If you need to delete the scheduler service, delete the information on the primary node as described in Action to be taken if an error occurs on the primary node below. Then perform the setup again, starting from the primary node.
-
If the scheduler service on the physical host has an operation profile, the operation profile will be copied to the logical host when you execute this command. Delete the copied operation profile as needed.
-
This command copies the executable-command settings file from the physical host to the logical host. After the file is copied, the logical host inherits the settings for commands that can be executed from the physical host. If commands can be executed on the physical host from JP1/AJS3 - View, edit the executable-command settings file on the logical host to allow the execution of necessary commands only. For details about how to specify settings in the executable-command settings file, see 11.3.18 Allowing execution of JP1/AJS3 commands in the JP1/Automatic Job Management System 3 Operator's Guide.
-
To change the directory used by the scheduler service, perform the following.
-
To change the database directory, change the value of the AJSDBDIRECTORY environment setting parameter.
-
To change the temporary directory, change the value of the AJSTMPDIR environment setting parameter.
-
To change the job information directory, change the value of the JOBINFDIR environment setting parameter.
-
To change the backup information directory, change the value of the AJSBKUROOT environment setting parameter.
For details about these parameters, see 20.4.2 Details of the environment setting parameters for scheduler services in the JP1/Automatic Job Management System 3 Configuration Guide.
-
Action to be taken if an error occurs on the primary node
If an error occurs during execution of the jajs_setup_cluster command on the primary node, remove the cause of the error, and then delete logical host information. Then re-execute the command.
If setup of the logical host fails and the jajs_setup_cluster command outputs error message KAVS1126-E, you must delete the embedded database on the logical host. You do not need to do so, however, if you specified the -S option to skip setup of the embedded database, and logical host setup fails without error message KAVS1126-E appearing.
If an error occurs or a command is terminated forcibly during setup of the embedded database, the embedded database must be deleted from the logical host. Use the ajsembdbuninstl command to delete the embedded database on the logical host. For details on the ajsembdbuninstl command, see ajsembdbuninstl in 2. Commands Used during Setup. Note that you must delete the embedded database from the logical host before deleting the logical host.
The procedure for deleting logical host information is described below.
- To delete logical host information:
-
-
Delete the shared files and directories on the shared disk.
Delete the JP1/AJS3 shared disk information.
In Windows: shared-disk\JP1AJS2
In UNIX: shared-disk/jp1ajs2
-
Delete the JP1/AJS3 common definition information on the logical host.
To do this, execute the commands shown below. For details on the jbsunsetcnf command, see the JP1/Base User's Guide.
jbsunsetcnf -i -h logical-host-name -c JP1AJS2
jbsunsetcnf -i -h logical-host-name -c JP1AJS2COMMON
jbsunsetcnf -i -h logical-host-name -c JP1NBQAGENT
jbsunsetcnf -i -h logical-host-name -c JP1NBQMANAGER#
jbsunsetcnf -i -h logical-host-name -c JP1NBQCLIENT
jbsunsetcnf -i -h logical-host-name -c JP1NBQNOTIFY
jbsunsetcnf -i -h logical-host-name -c JP1AOMMANAGER#
jbsunsetcnf -i -h logical-host-name -c JP1AOMAGENT
jbsunsetcnf -i -h logical-host-name -c JP1AJSMANAGER#
jbsunsetcnf -i -h logical-host-name -c JP1QLAGENT
#
Execute this command only when you delete logical host information from JP1/AJS3 - Manager.
If the data to be deleted does not exist during execution of the command, the following message might be output: KAVA0405-I The specified character-string-specified-for-the-c-option does not exist (logical-host-name). Processing stops.. If this message is output, ignore it.
-
Permissions for sub-directories in the shared directory created at setup of the primary node
- For Windows
-
Full Control is set for the Everyone group for all folders created in the shared-folder\jp1ajs2 path and listed in the table below. For all other folders, the permissions of the upper-level folder apply.
For folders above shared-folder\jp1ajs2, set Full Control for users who have SYSTEM and Administrators privileges, and set Read & Execute or a higher privilege for all other users who perform settings to pass these settings to the files and folders under the folder.
- Important
-
Do not change the permission for folders for which Everyone has Full Control. If you do so, the logical host will not start.
Table 2‒3: Folders for which Everyone has Full Control No.
Folder path
JP1/AJS3 - Manager
JP1/AJS3 - Agent
1
shared-folder\jp1ajs2\backup
Y
--
2
shared-folder\jp1ajs2\database
Y
--
3
shared-folder\jp1ajs2\jobinf
Y
--
4
shared-folder\jp1ajs2\log
Y
Y
5
shared-folder\jp1ajs2\sys
Y
Y
6
shared-folder\jp1ajs2\tmp
Y
Y
- Legend:
-
Y: Supported
--: Not supported
- For UNIX
-
Directories are created in the shared-directory/jp1ajs2 path and 777 permission is set for all directories listed in the table below. For all sub-directories not listed in the table, 755 permission is set.
When the AJS administrator sets up a primary node, read and write permissions of the JP1 administrator group are required for the upper-level directory of shared-directory/jp1ajs2.
- Important
-
Do not change the permission for directories for which 777 permission is set. If you do so, the logical host will not start.
Table 2‒4: Directories for which 777 permission is set No.
Directory path
JP1/AJS3 - Manager
JP1/AJS3 - Agent
1
shared-directory/jp1ajs2/backup/schedule
Y
--
2
shared-directory/jp1ajs2/database/schedule/scheduler-service-name
Y
--
3
shared-directory/jp1ajs2/jobinf
Y
--
4
shared-directory/jp1ajs2/jobinf/schedule/scheduler-service-name
Y
--
5
shared-directory/jp1ajs2/jobinf/delete
Y
--
6
shared-directory/jp1ajs2/log
Y
Y
7
shared-directory/jp1ajs2/log/JAJS_SETUP
Y
Y
8
shared-directory/jp1ajs2/log/jpqagent
Y
Y
9
shared-directory/jp1ajs2/log/jpqclient
Y
Y
10
shared-directory/jp1ajs2/log/jpqmanager
Y
--
11
shared-directory/jp1ajs2/log/jpqnotify
Y
Y
12
shared-directory/jp1ajs2/log/schedule
Y
--
13
shared-directory/jp1ajs2/log/schedule/scheduler-service-name
Y
--
14
shared-directory/jp1ajs2/tmp
Y
Y
15
shared-directory/jp1ajs2/tmp/schedule
Y
--
16
shared-directory/jp1ajs2/tmp/schedule/scheduler-service-name
Y
--
- Legend:
-
Y: Supported
--: Not supported
Return values
0 to 9 |
Normal end |
10 to 49 |
End with warning. The command terminated but requires manual operations. |
50 or greater |
Abnormal end |
Additional information
When setup is performed by specifying the -P and -I options, the embedded database is set up with the following settings:
-
Database mode: small scale
-
System log: Not used
-
Duplex of system file: Disabled
-
Unload log file: Not used
-
Data area directory:
- For Windows
-
shared-folder\jp1ajs2\embdb\value-specified-in-the-I-option\dbarea
- For UNIX
-
shared-directory/jp1ajs2/embdb/value-specified-in-the-I-option/dbarea
-
Work area directory:
- For Windows
-
JP1/AJS3-installation-folder\embdb\value-specified-in-the-I-option\dbarea
- For UNIX
-
/opt/jp1ajs2/embdb/value-specified-in-the-I-option/dbarea
-
Embedded database practical directory:
- For Windows
-
JP1/AJS3-installation-folder\embdb\value-specified-in-the-I-option
- For UNIX
-
/opt/jp1ajs2/embdb/value-specified-in-the-I-option
-
Database area auto-increment function: Enabled
-
System log auto-increment function: Enabled
For the settings other than the above, the default settings are used.
Example 1
In this example, the command also sets up the embedded database under the following conditions during setup of the primary host for JP1/AJS3 - Manager:
-
logical host: lhost1
-
scheduler service: AJS3SCHEDULE001
-
shared directory name: F:\shdsk\lhost1
-
embedded database port number: 22201
-
embedded database setup ID: _JF1
jajs_setup_cluster -h lhost1 -F AJS3SCHEDULE001 -d "F:\shdsk\lhost1" -P 22201 -I _JF1
Example 2
In this example, the command sets up the primary host for JP1/AJS3 - Manager under the following conditions, but does not set up the embedded database:
-
logical host: lhost2
-
scheduler service: AJS3SCHEDULE002
-
shared directory name: F:\shdsk\lhost2
-
scheduler service ID number: 3
-
scheduler service startup mode: hot start
jajs_setup_cluster -h lhost2 -F AJS3SCHEDULE002 -d "F:\shdsk\lhost2" -n 3 -m hot -S
Example 3
In this example, the command also sets up the embedded database under the following conditions during setup of the secondary host for JP1/AJS3 - Manager:
-
logical host: lhost1
-
scheduler service: AJS3SCHEDULE001
jajs_setup_cluster -h lhost1 -F AJS3SCHEDULE001
Example 4
In this example, the command sets up the secondary host for JP1/AJS3 - Manager under the following conditions, but does not set up the embedded database:
-
logical host: lhost2
-
scheduler service: AJS3SCHEDULE002
jajs_setup_cluster -h lhost2 -F AJS3SCHEDULE002 -S
Example 5
In this example, the command sets up the primary host for JP1/AJS3 - Agent under the following conditions:
-
logical host: lhosta1
-
shared directory name: F:\shdsk\lhosta1
jajs_setup_cluster -h lhosta1 -d "F:\shdsk\lhosta1"
Example 6
In this example, the command sets up the secondary host for JP1/AJS3 - Agent under the following conditions:
-
logical host: lhosta1
jajs_setup_cluster -h lhosta1