To simplify the task of cluster administration, you can use the cladmin command to run the following asadmin
commands simultaneously on all application server instances in a cluster:
- start-instance
-
starts a server instance
and all the services associated with it
- stop-instance
-
stops the specified
server instance and all the services associated with it
- deploy
-
deploys the specified component
- undeploy
-
removes the component from
the named instance
- create-jdbc-resource
-
registers the
JDBC resource to the named instance
- create-jdbc-connection-pool
-
registers
the JDBC connection pool to the named instance
- configure-session-persistence
-
enables
configuration of parameters related to session persistence
- delete-jdbc-resource
-
removes the
JDBC resource from the named instance
- delete-jdbc-connection-pool
-
removes
the JDBC connection pool from the named instance
To ensure consistency in configuration of all application server instances
in a cluster, use the cladmin command for all the supported asadmin commands.
The following input files are required for the cladmin
command to function:
-
clinstance.conf
-
contains information about the application server instances that are
part of the cluster.
-
clpassword.conf
-
contains the asadmin password and is pre-populated
with the correct password during a standard installation.
By default the input files are located in the application server configuration
directory which is located in /etc/opt/SUNWappserver7.
You can modify the input files to support different configurations. The server
instances that are part of the cluster must be defined in the instance file
(default name is clinstance.conf).
Before editing the input files, keep in mind:
Before running the cladmin command you must:
-
have the asadmin command on the local machine.
-
use the clsetup command to setup a typical
cluster configuration.
-
use the same administrator password for all domains that are
part of the cluster.
-
start the administration servers of all instances that are
part of the cluster.
-
make sure you list all the instances that are part of the
cluster in the clinstance.conf file.
-
change the directory to install_dir/bin; where
install_dir is the server installation directory.
During standard installation, the clinstance.conf
file is created with entries for two instances. If you add more instances
to the cluster, or create more clusters, you must update the clinstance.conf file with the information for the new instances. The information
about the instances in each cluster must be identified in the instance file
(default name is clinstance.conf). The following are
the possible entries in the clinstance.conf file:
Table 1: Entries in the clinstance.conf file
Entry | Definition | Default Value(s) |
instance | name of the application server instance | server1, server2 |
user | Administration server user name | admin |
host | Host name | localhost |
port | Port number of the Administration Server | 4848 |
domain | Name of the Administrative
domain | domain1 |
instanceport | Port number of the
application server instance | 80, 81 |
The clpassword.conf file contains the administration
server password. During execution of the cladmin command,
the asadmin command requires the administration server
password specified in the clpassword.conf file. The format
for the clpassword.conf file is :
AS_ADMIN_PASSWORD=password
Where password is the administration server
password.
Permissions 0600 are preset on the clpassword.conf
file and it can be accessed only by the root user.
A log file, named cladmin.log, is available in the /var/tmp/cladmin.log directory. By default the cladmin command executes in verbose mode and logs information in the log
file. Log file entries start and end with timestamp tags. If the log file
exists prior to execution, the output is appended to the existing log file.
Scan the log after each execution to verify that it ran properly.
If you are running multiple clusters, a separate clinstance.conf file must be specified for each cluster. You can run the cladmin command on the instances in any cluster by specifying the
path of the input files for that particular cluster.