|
|
This chapter describes how to ensure that your application is ready to be booted, how to boot it, and how to shut it down. There are also procedures that help you resolve some problems you may run into when you first begin to start and shut down your WLE or BEA TUXEDO applications.
Topics covered in this chapter are:
Before you start an application, make sure you have completed all of the tasks in the prerequisite checklist, described in the following section.
Complete the following tasks before booting your application:
Starting Applications
Prerequisite Checklist
Task |
Procedure |
---|---|
Set and export variables TUXDIR
, TUXCONFIG
, PATH
,
and LD_LIBRARY_PATH
so that they are in your environment as the system is booted. For example:
TUXDIR=<pathname to installed WLE or Replace text within angle brackets (< >) with values for your installation. Other environment variables can be specified in an ENVFILE
. (See ubbconfig(5).)
On AIX, LIBPATH
must be set instead of LD_LIBRARY_PATH
. On HP UX, SHLIB_PATH
must be set instead of LD_LIBRARY_PATH
. On Windows NT, no variable for shared libraries is required.
For WLE Java, verify that the following environment variables were defined by the WLE Java installation procedure:
Set Environment Variables
BEA TUXEDO directory>
TUXCONFIG=<pathname where TUXCONFIG should go> PATH=$PATH:$TUXDIR/bin
LD_LIBRARY_PATH=<pathname to shared libraries>
export TUXDIR TUXCONFIG PATH LD_LIBRARY_PATH
Then use the new environment variables when you add to your system's PATH, as shown in the following platform-specific examples.
For example, on Windows NT systems:
set JAVA_HOME=c:\jdk1.2 set CLASSPATH=.;%TUXDIR%\udataobj\java\jdk\wle.jar;%TUXDIR%\locale\java\wle set PATH=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\jre\bin\classic; For example, on Solaris systems:
JAVA_HOME=/usr/kits/jdk1.2 CLASSPATH=.:$TUXDIR/udataobj/java/jdk/wle.jar:$TUXDIR/locale/java/wle PATH=$JAVA_HOME/bin:$TUXDIR/bin:$PATH LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/sparc/native_threads: THREADS_FLAG=native export JAVA_HOME CLASSPATH PATH LD_LIBRARY_PATH THREADS_FLAG During the deployment step, you must also define the environment variables TUXCONFIG
and APPDIR
. These variables are described in subsequent sections of this chapter.
TUXCONFIG
is a binary version of the text configuration file. The tmloadcf(1) command converts the configuration file to binary form and writes it to the location given in the TUXCONFIG
variable.
Enter the command as follows:
$ tmloadcf [-n] [-y] [-c] [-b blocks] {ubbconfig_file | - } You may want to consider the following options before you create TUXCONFIG
:
The -c and -n options do not load the TUXCONFIG
file.
UNIX IPC resources are platform specific. If you use the -c
option, check the platform data sheet for your platform in Appendix A of the BEA TUXEDO Installation Guide to judge whether you need to make some changes. If you do want to change IPC resources, check the administration guide for your platform.
If the -n option indicates syntax errors in the configuration file, correct the errors before you proceed.
For ubbconfig_file
, substitute the fully qualified name of your configuration file.
When you are ready to create the TUXCONFIG
file, you may want to consider the following options:
The -b
option takes an argument that limits the number of blocks used to store the TUXCONFIG
file. Use it if you are installing TUXCONFIG
on a raw disk device that has not been initialized. The option is not recommended if TUXCONFIG
will be stored in a regular UNIX system file.
You must be logged in on the MASTER
machine and have the effective user ID of the owner of the configuration file.
If you have set up the UBBCONFIG
file for storing server group or JDBC database passwords in encrypted form, when you run tmloadcf
to load this UBBCONFIG
file, you are prompted to create the passwords. tmloadcf
then stores the passwords in encrypted form in the TUXCONFIG
file.
To force encryption of a password for a server group, for example, you would write a continuous string of five or more asterisks into the OPENINFO
string in the UBBCONFIG
file at the place where the password is to go. For example,
OPENINFO="Oracle_XA: Oracle_XA+Acc=P/Scott/*****+SesTm=30+LogDit=/tmp" When tmloadcf encounters a continuous string of five or more asterisks, it will prompt the user to enter a password, for example:
>tmloadcf -y e:\wle5\samples\atmi\bankapp\xx The values for the DBPASSWORD
and PROPS
atttibutes for JDBC connection pools can also be encrypted in the same manner. Refer to Encrypting DBPASSWORD and PROPS in Chapter 3, "Creating a Configuration File".
Note:
If you use the tmunloadcf
command to convert the binary version of the configuration file back into a UBBCONFIG
file, an encrypted password is written into the UBBCONFIG
file with @@
as delimiters. When a password is stored in the UBBCONFIG
file in encrypted form, tmloadcf
does not prompt the user to create a password. The following is a sample OPENINFO
statement generated by tmunloadcf
:
OPENINFO="Oracle_XA: Oracle_XA+Acc=P/Scott/@@A0986F7733D4@@+SesTm=30+LogDit=/tmp" TUXCONFIG
is automatically propagated by the WLE or BEA TUXEDO system to all machines in your configuration when you run tmboot
(1), but there are other files that need to be present on all machines. Table 4-2 is a list of files and directories needed for a networked application.
%TUXDIR%\lib;%TUXDIR%\bin;%PATH%
$JAVA_HOME/jre/lib/sparc/classic:$JAVA_HOME/jre/lib/sparc:$TUXDIR/lib Create TUXCONFIG
Creating Encrypted Passwords
Password for OPENINFO (SRVGRP=BANKB1): Propagate the Software
To enable distributed transaction processing, several parameters in the MACHINES
section of the configuration file are used to define a global transaction log (TLOG
). You must create the device list entry for the TLOGDEVICE
on each machine where a TLOG
is needed. It can be done before or after TUXCONFIG
has been loaded, but must be done before the system is booted.
Follow these steps to create an entry in the Universal Device List (UDL) for the TLOG
device. Refer to the section Step 2: Create a UDL Entry for details.
Create a TLOG Device
The -c
option brings tmadmin
up in configuration mode.
crdl -z config -b blocks
where:
-z config specifies the full path name for the device where the UDL should be created (that is, where the TLOG will reside).The value of config should match the value of the TLOGDEVICE parameter in the MACHINES section. If config is not specified, it defaults to the value of the variable FSCONFIG (which points to the application's databases).
-b blocks specifies the number of blocks to be allocated on the device.
If the TLOGDEVICE is mirrored between two machines, step 3 is not required on the paired machine. To be recoverable, the TLOG should preferably be on a device that can be mirrored. Because the TLOG is too small (typically,100 pages) to warrant having a whole disk partition to itself, the expectation is that the TLOG will be stored on the same raw disk slice as the application's databases. FSCONFIG is the environment variable used by the system. Therefore, the tmadmin crdl command defaults to FSCONFIG .
To have a networked application, a listener process must be running on each machine.
This step is required if you are running the application on more than one machine, as established by the MODEL MP parameter in the RESOURCES section of the application's UBBCONFIG file.
Note: You must define TUXDIR, TUXCONFIG, APPDIR , and other relevant environment variables before starting tlisten .
The port on which the process is listening must be the same as the port specified for NLSADDR in the NETWORK section of the configuration file. On each machine, use the tlisten (1) command, as follows:
tlisten [ -d device ] -l nlsaddr [-u {uid-# | uid-name}] [ -z bits\ ] [ -Z bits ]
The options to this command are as follows:
TCP/IP addresses may be in the //#.#.#.#:port format or the //machine-name:port format.
tmloadcf (1) prints an error if nlsaddr is missing from any entry but the entry for the MASTER LMID , for which it prints a warning. However, if nlsaddr is missing from the MASTER LMID entry, tmadmin (1) is not able to run in administrator mode on remote machines; it will be limited to read-only operations. This also means that the backup site is unable to reboot the master site after failure.
Once the preliminaries have been successfully completed, you are ready to bring up the application, as described in the following section:
The user who created the TUXCONFIG file is considered the administrator of the application. Only this user can execute tmboot (1).
The application is normally booted from the machine designated as the MASTER in the RESOURCES section of the configuration file, or the BACKUP MASTER acting as the MASTER . The -b option allows some deviation from this rule.
For tmboot (1) to find executables, the WLE or BEA TUXEDO system processes, such as the BBL, must be located in $TUXDIR/bin . Application servers should be in APPDIR, as specified in the configuration file.
When booting application servers, tmboot (1) uses the CLOPT , SEQUENCE , SRVGRP , SRVID , and MIN parameters from the configuration file.
Application servers are booted in the order specified by their SEQUENCE parameter, if SEQUENCE is used. If SEQUENCE is not specified, servers are booted in the order in which they appear in the configuration file.
The command line should look something like the following (this is a greatly simplified example):
$ tmboot [-g grpname] [-o sequence] [-s server] [-S] [-A] [-y]
Table 4-3 describes the tmboot options shown above.
Option |
Meaning |
---|---|
Boot all TMS and application servers in groups using this grpname
parameter.
|
|
Boot all servers in the order shown in their SEQUENCE
parameter.
|
|
There are many more options than are shown in the example. For a complete listing of the tmboot options, see the tmboot
(1) reference page in the BEA TUXEDO Reference Manual.
The following scenario shows the order of processing when booting a two-machine configuration. This is not a procedure that you have to initiate; it is what the software does if you enter the following command:
prompt> tmboot -y Default Boot Sequence for a Small Application
The boot sequence recommended for larger applications is shown here. This sequence boots entire machines in a single step, rather than taking all the steps used to boot two machines in the default sequence. The optimized sequence can be explained as follows:
This method is faster because the number of system messages is far smaller. In large applications (more than 50 machines), this method generally reduces boot time by 50%.
In a configuration with a slow network, boot time can be improved by first booting the machines that have higher speed connections to the MASTER machine.
The tmshutdown (1) command is used to shut down an application.
The tmshutdown (1) command is the inverse of the tmboot (1) command. It shuts down part or all of the WLE or BEA TUXEDO application.
When the entire application is shut down, tmshutdown (1) removes the IPC resources associated with the WLE or BEA TUXEDO system.
The options used by tmboot (1) for partial booting (-A , -g , -I , -S , -s , -l , -M , -B ) are supported in tmshutdown (1). Note that the -B option, which allows tmboot to be used from a non-MASTER machine, is not supported for tmshutdown ; the tmshutdown command must be entered from the MASTER (or BACKUP MASTER ) machine.
If servers are to be migrated, the -R option must be used. This option shuts down the servers without removing the Bulletin Board entries.
If a node is partitioned, tmshutdown (1) with the -P lmid option can be run on the partitioned machine to shut down the servers on that machine.
tmshutdown (1) will not shut down the administrative server BBL on a machine that has clients attached. The -c option can be used to override this feature. This option is required when a machine must be brought down immediately and the administrator has been unable to contact the clients.
The -w delay option can be used to force a hard shutdown after delay seconds. This option suspends all servers immediately so that additional work cannot be queued. The value of delay should allow time for requests already queued to be serviced. After delay seconds, a SIGKILL signal is sent to the servers. This option enables the administrator to shut down servers that are looping or blocked in application code.
Always check the details of a command such as tmshutdown (1) in the BEA TUXEDO Reference Manual to make sure you have the most recent information on available options.
The user creating the TUXCONFIG file is considered to be the administrator of the application. Only this user can execute tmshutdown (1).
The application can be shut down only from the machine designated as MASTER in the configuration file. When the BACKUP MASTER is acting as the MASTER , it is considered to be the MASTER for shutdown purposes.
The only exception to this rule is a partitioned machine. By using the -p option, the administrator can run the command from the partitioned machine to shut down the application at that site.
Application servers are shut down in the reverse order specified by their SEQUENCE parameter, or by reverse order of their appearance in the configuration file. If some servers have SEQUENCE numbers and others do not, the unnumbered servers are the first to be shut down, followed by the application servers with SEQUENCE numbers (in reverse order). Finally, administrative servers are shut down.
When an application is shut down, all the IPC resources allocated by the WLE or BEA TUXEDO system are removed. Note that tmshutdown does not remove IPC resources allocated by the DBMS.
There are several problems that you may encounter when first working with the WLE system. This section lists and discusses some of the common startup and shutdown problems.
When starting your first WLE application you might encounter evidence of a problem in the form of a message to ULOG , a message to your screen, or both, as follows:
If the transaction log (TLOG
) fails to get created, a message is sent to the user log (ULOG
).
The message includes the message catalog name, the unique message number within the catalog, and the reason for the failure. For example, one such message is:
CMDTUX 142 ERROR: Identifier for TLOGNAME must be <= len characters in length TLOGNAME
cannot be more than 30 characters long.
You can avoid problems of this kind if you check the syntax of the TLOG
parameters in the MACHINES
section of the UBBCONFIG
file (see ubbconfig
(5)).
The TLOG
also might not get created for the following reasons:
TLOG Not Created
A server may not start correctly if either
Server Not Built Correctly
You should try to detect an error in this area before you attempt to boot a WLE application. buildobjserver
is used to compile application code, combining the interfaces to be offered by a server into the executable module. If the code fails to compile, the causes can be that an incorrect compiler was specified, the needed libraries were not found, needed interface modules were not found, there is a problem in the code, and so forth. Pay close attention to the error messages and consult Creating C++ Server Applications and Creating Java Server Applications.
Problems in this area can often be attributed to an incorrect CLOPT
parameter for the server (CLOPT
is an abbreviation for "command-line options"). The CLOPT
parameter is assigned in the SERVERS
section of the UBBCONFIG
file. It carries command-line options that apply to a server when the server is booted. The options are defined on the servopts
(5) reference page. Refer to this page and the ubbconfig
(5) reference page for help on debugging the problem.
Another cause for a server coming up with the wrong services could be an incorrect specification of services when the server is built. While services are usually in a module of code that has a mnemonic name, there is no requirement that this be the case. Service a
, for example, may actually be performed by function x
, which could lead to an error.
The OPENINFO
string is specified in the GROUPS
section of the UBBCONFIG
file. It contains information needed by servers in the group when they try to open an application database. There is a very specific form for the information that is agreed to by vendors of XA-compliant database management systems. The information is stored in the WLE or BEA TUXEDO system file $TUXDIR/udataobj/RM.
Note:
After changing the OPENINFO
string, BEA recommends that you reboot the servers that use this resource manager (RM).
To clear a problem:
buildobjserver failure
server comes up with wrong services (BEA TUXEDO Systems)
Incorrect OPENINFO String
If this does not resolve the problem, go to step 2.
If the problem persists, go to step 3.
In a networked application, there are several reasons why the system may not be able to propagate the TUXCONFIG file. The generic message is as follows:
cannot propagate TUXCONFIG file
The following are possible reasons for the failure:
Table 4-4 shows a possible solution for each propagation problem.
The two most common problems encountered when shutting down applications are shown with solutions in Table 4-5.
Common Shutdown Problems
|
Copyright © 1999 BEA Systems, Inc. All rights reserved.
|