5.2.3 Specifying a logical host
As a prerequisite for executing commands on a logical host, you must specify the logical host name. If you do not specify a logical host name, commands will be executed on physical hosts.
- Organization of this subsection
(1) Specifying a logical host
You can specify the logical host name either by setting the name in the JP1_HOSTNAME environment variable or by specifying a command option. The following table describes each method.
Method |
Description |
---|---|
Specify the logical host name in the JP1_HOSTNAME environment variable. If you specify a logical host name in both the command option and environment variable, the setting with the command option takes precedence. |
|
Command option |
Specify the command option in the following format: command -h logical-host-name. For details, see the description of each command. |
- Note
-
In Windows, do not set the JP1_HOSTNAME environment variable as a system environment variable or as a user environment variable. If so, this could disable services or otherwise disrupt program operation. Set the JP1_HOSTNAME environment variable at the command prompt or in a batch file.
(2) Rules for specifying logical host names
Comply with the following rules when specifying logical host names:
-
Number of characters:1 to 196 bytes in Windows (63 bytes or less recommended)#1; 1 to 255 bytes in UNIX (63 bytes or less recommended)#1, #2
-
Usable characters: Alphanumeric characters and hyphens.
#1: These are the numbers of characters supported in JP1/Base. Your clustering software might not support these characters. Be sure to specify logical host names within the limitation of both JP1/Base and the cluster system you use. In actual operations, we recommend a host name of 63 bytes or less.
#2: For the UNIX-only forced termination command (jbs_killall.cluster), you must specify a logical host name of 32 bytes or less. You cannot specify a logical host name that is 33 bytes or more.
(3) Notes on logical host names
-
Note the following if you specify the same name for both the logical host name and the physical host name (as output by the hostname command). We strongly recommend that the logical host name you specify in a cluster system be different from the physical host name.
-
Start JP1 on the logical host only.
Start JP1 on the logical host only and do not start JP1 on the physical host.
-
Modify the settings for the event service environment.
Comment out the line server * default, which is coded in the default event server index file (index). If this line remains in the file, the event database for the logical host is created on the local disk so that it cannot be taken over during a failover. You must complete the setup on both the primary and secondary server.
Note that, if you modify the event server index file (index), modify it while the event server instances on the physical hosts are stopped.
-
Apply the contents of jevlogical_setup.conf to the common definition.
To allow JP1/Base to recognize an event service on a logical host that has the same name as the event service on the physical host, apply the contents of the jevlogical_setup.conf file to the common definition information.
In Windows:
jbssetcnf jevlogical_setup.conf#
In UNIX:
/opt/jp1base/bin/jbssetcnf jevlogical_setup.conf#
#: Use a full path if the JP1/Base bin folder is not specified in the PATH environment variable.
To undo these changes:
In Windows:
1. Create a definition file with the following contents.
You can choose any name for the definition file.
[JP1_DEFAULT\JP1BASE\]
"JEVSERVICE_LOGICAL"=dword:00000000
2. Execute the following command to reflect the settings in the created definition file in the common definition information:
jbssetcnf definition-file-name
In UNIX:
1. Create a definition file with the following contents.
You can choose any name for the definition file.
[JP1_DEFAULT\JP1BASE\]
"JEVSERVICE_LOGICAL"=dword:00000000
2. Execute the following command to reflect the settings in the created definition file in the common definition information:
/opt/jp1base/bin/jbssetcnf definition-file-name
-
Restart the Hitachi Network Objectplaza Trace Library (HNTRLib2).
To modify the host name while the system is running, you must restart the Hitachi Network Objectplaza Trace Library (HNTRLib2). To restart HNTRLib2, perform the following procedure:
In Windows:
1. Manually stop HNTRLib2 in the Services dialog box in the Control Panel.
2. Change the host name.
3. Manually start HNTRLib2 in the Services dialog box in the Control Panel.
In UNIX:
1. Use the hntr2kill command to stop HNTRLib2.
2. Change the host name.
3. Execute the following command to start HNTRLib2.
hntr2mon -d &
Trace information is not logged until you restart HNTRLib2. Stop all applications that are using HNTRLib2 before stopping HNTRLib2. Conversely, start HNTRLib2 before starting any application that uses HNTRLib2. For details on the hntr2kill command, see hntr2kill (UNIX only) in 15. Commands.
-
-
If you are using DNS, use a host name that is not in FQDN format as the logical host name. For example, specify jp1v7 as the logical host name from jp1v7.soft.hitachi.co.jp. Make sure that names can be resolved by using this host name.
-
In Windows, do not set the JP1_HOSTNAME environment variable as a system environment variable or as a user environment variable. If so, this could disable services or otherwise disrupt program operation. Set JP1_HOSTNAME at the command prompt or in a batch file.
-
When using the UNIX forced termination command (jbs_killall.cluster), make sure the first 32 bytes of the logical host name uniquely identify the host within the cluster system. This command determines the host by using the first 32 bytes and forcibly terminates the associated process. You cannot kill a process for a logical host name that is 33 bytes or more.