Starting Up and Shutting Down

This chapter describes how to start up and shut down Tmax system in various environments.

1. Starting Up Tmax

After configuring the configuration file, the administrator can start up the Tmax system. Once Tmax is running, it is rarely shut down except for when an external fatal error, such as a hardware or OS failure, occurs. However, the administrator will need to shut down and restart the system when the configuration file must be modified or recreated, or when the system was unexpectedly terminated due to external reasons.

The basic configuration of the Tmax system must be complete before attempting to start up the system. Run through the following checklist prior to starting up the system.

  • Does the Tmax configuration binary file exist?

  • Do Tmax executables (TMM, CLL, CLH, and TMS, etc.) exist in the directory specified in the TMAXDIR item of the NODE section?

  • Can the server programs, registered within the SERVER section of the configuration file, be found in the directory specified in the APPDIR item of the NODE section?

  • Is racd running on each node to enable centralized management?

In general, a Tmax system is made up of multiple nodes in a single domain. This type of system usually requires a centralized management system. If racd (remote access control demon) is installed on each node in advance, it is possible to manage the entire Tmax system from a single node. A single command can be issued through racd to compile the configuration file, start or shut down the Tmax system, or dynamically modify the configuration file.

In order to load racd, TMAX_RAC_PORT must be defined through an environment variable. The system can start up without referencing the environment variables in the Tmax configuration file by specifying the port number of the racd, which is used for centralized management, and starting up racd by executing "racd – k".

1.1. racd

The racd command centralizes the management of nodes in a distributed, multi-node environment. racd is a daemon process that runs on each node, allowing a single node to manage a Tmax system composed of multiple nodes within a domain. Note that the node managing the Tmax system is not required to run racd.

racd enables a node in a domain to manage all nodes either via tmadmin or a configuration file, which can then be applied to all nodes in the domain using cfl.

Key features of racd include:

  • When tmdown or tmboot is executed through racd, it waits for 60 seconds by default for the operation to complete. For CLH and TDL requests, it waits indefinitely.

  • If a timeout or an error occurs while racd executes a command, the cfl, tmboot, tmdown, and racdr utilities log the related information.

  • Any SIGPIPE signal from cfl executed through racd is ignored.

If IPv6 is used, the following must be specified in a configuration file.

SYSTEM_IPV6=Y

To use the [-k] option for racd, the following must be specified in an environment variable.

TMAX_RAC_IPV6=Y

The following shows how to use the command.

  • Usage

    $ racd [-d] [-f binary Tmax configuration file name] [-h] [-k] [-i filename] [-l label]
           [-P umask] [-V] [-t wait_time]
    Option Description

    [-d]

    Enables debug mode when executing racd.

    [-f binary Tmax configuration file name]

    Specifies the binary Tmax configuration file to be used. The binary configuration file is the result of executing a cfl command and is referenced by tmboot and tmdown. The path to the file can also be specified. If a path is not specified, <tmconfig> in the $TMAXDIR/config directory will be used.

    [-h]

    Displays command help.

    [-k]

    Option to use a binary Tmax configuration file. If this option is specified, the configuration file will not be used. A racd is usually executed with this option (passive listen mode).

    If this option is used when IPv6 is used, 'TMAX_RAC_IPV6=Y' must be set because the configuration file will not be used.

    [-i filename]

    Used to define multiple logical nodes in a single physical machine.

    If the NODETYPE of a logical node is SHM_RACD, a racd must be executed for each logical node and each node must have a unique RACPORT. A TMAX_RAC_PORT environment variable must be set before executing a racd. When there are too many logical nodes, the name of the file that defines TMAXHOME, TMAXDIR, and TMAX_RAC_PORT can be specified, because it is difficult to set the variable for each node. For more information, see the examples in the following sections.

    [-l label]

    A delimiter used for information registered in a configuration file. When information of two or more systems is registered in a single file, the delimiter separates the information of each system.

    [-P umask]

    Allows a user to create a file with desired permissions for a process started by a racd.

    [-V]

    Shows the version of an executable file.

    [-t wait_time]

    Option to control the waiting time from start to completion when executing tmdown or tmboot through racd. If a negative value is specified, racd waits indefintely. A value of 0 is not allowed. If a positive value (≥1) is specified, racd waits for that amount of time.

  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following sets a desired umask by specifying the -P option to a racd.

      <tmax.racd>

      [tmaxs1]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/tmax32
      TMAX_RAC_PORT = 3333
      [NODE1]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/proj1
      TMAX_RAC_PORT = 4335
      [NODE2]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/proj2
      TMAX_RAC_PORT = 4337
      1. Create a configuration file.

        *DOMAIN
        tmax1      SHMKEY = @SHMEMKY@, MINCLH = 1, MAXCLH = 3,
                   TPORTNO = @TPORTNO@, BLOCKTIME = 30, RACPORT = 3255
        
        *NODE
        @HOSTNAME@ TMAXDIR = "@TMAXDIR@",
                   APPDIR = "@TMAXDIR@/appbin",
                   PATHDIR = "@TMAXDIR@/path",
        
        @RMTNAME@  TMAXDIR = "@RMTDIR@",
                   APPDIR = "@RMTDIR@/appbin",
                   PATHDIR = "@RMTDIR@/path",
        
        *SVRGROUP
        svg1       NODENAME = "@HOSTNAME@", COUSIN = "svg2"
        svg2       NODENAME = "@RMTNAME@"
        
        *SERVER
        svr2       SVGNAME = svg1, CLOPT = "-o $(SVR).out -e $(SVR).err"
        
        *SERVICE
        TOUPPER    SVRNAME = svr2
      2. Start racd in a remote node.

        $ export TMAX_RAC_PORT = 3255
        $ racd –k –P 055
      3. Start all Tmax instances in a HOST node (tmboot).

      4. Check the permission for the <svr2.out> file in the ULOGDIR of the RMT node.

    • The following executes racd in NODE 1.

      $ racd -k -i tmax.racd -l NODE1
    • The following uses only information from another command, such as tmboot, without referencing a configuration file.

      $ racd -k
  1. For more information about tmboot and tmdown, refer to tmboot and tmdown respectively.

  2. For more information about logical node settings, refer to NODE Section in Tmax Administration Guide.

1.2. tmboot

The tmboot command starts a Tmax system (or a portion of it) using a Tmax configuration file. When this command is executed without an option or only with a [-f] option, all Tmax management processes and all server processes registered in the SERVER section of a Tmax configuration file are executed.

Tmax management processes are executed in all nodes registered in a NODE section. The execution order is TMM, CLL, and finally CLH. If an OPENINFO is registered in the SVRGROUP section in a server group, TMS processes are executed by referring to TMSNANE and MINTMS for each server group. Tmax management processes are executed in the bin directory under a TMAXDIR directory defined by each node.

After Tmax management processes are created, all application server processes in a SERVER section are executed. The application server processes are executed in the order they were registered in a section. The tmboot command initializes the server processes with tpsvrinit() and then executes them after they are initialized. The number of application server processes executed by a tmboot command is defined by a MIN value. If MIN is not specified, the default value will be 1.

The tmboot command uses CLOPT, MIN, and MAX values for servers in a SERVER section. These values are the boot parameters used by a tmboot when starting a server process. Other items are runtime parameters used by a system after a server starts. For more information about how to set parameters, refer to the SERVER section in a source configuration file.

All application server processes are executed from a APPDIR directory defined for a running node.

The following shows how to use the command:

  • Usage

    $tmboot [-A] [-b] [-c] [-f binary Tmax configuration file name]
            [-g servergroup_name [-a] [-i][-s] [-S]][-h] [-V] [-n node_name]
            [-o clopt_string] [-q rq_svg_name] [-s server_name [-k count] [-a]]
            [-S server_name [-a]] [-t tms_name [-g svg_name] [-k all]] [-B trb_node]
            [-T] [-w] [-d boot_time] [-W] [-D] [-e clh | cas | tlm | tsm] [-R]
            [-G tms_svg_name]
    Option Description

    [-A]

    Starts all application server processes defined in the SERVER section of the Tmax configuration file.

    [-b]

    Arbitrarily starts the server process specified as a backup.

    [-c]

    Starts an additional CLH process. The number of CLH processes cannot exceed the MAXCLH value, which is defined in the Tmax configuration file.

    [-f binary Tmax configuration file name]

    Specifies the binary Tmax configuration file (the result of compiling a source file with a cfl) with a path.

    If the [-f] option is not specified, <tmconfig> in the config directory under the TMAXDIR is used by default.

    [-g servergroup_name [-a]

    [-i] [-s] [-S]]

    Starts a server process in a specified server group. The server group name is registered in the SVRGROUP section of a Tmax configuration file.

    If the [-a] option is also used, a TMM process, not a TMBOOT process, will start a server.

    If the [-i] option is not used, a server booting process will be stopped if a server reaches the maximum number of times it can be restarted. However, if an [-i] option is used, even if a server reaches the maximum number of times it can be restarted., a following server will be started and the entire process will proceed. If all servers reach the maximum number of times it can be restarted., the following message will be displayed.

    (I) BOOT3022 all servers in group (svgname) reached max [BOOT0039]

    If used with the [-s] or [-S] option, a process with the specified server name within the specified server group is targeted only.

    [-h]

    Shows the command help.

    [-V]

    Shows the version of an executable file.

    [-n node_name]

    Starts server processes in the specified node. The node name must be previously registered in the NODE section of the Tmax configuration file.

    [-o clopt_string]

    Appends a string to the value of CLOPT after \--. If a CLOPT value is already set for the server section in shared memory, the existing value after -- is removed, and the new string is appended. If the string contains spaces, enclose it in double quotation marks ("").

    [-q rq_svg_name]

    Starts a RQS.

    [-s server_name [-k count] [-a]]

    Starts a specified server processes. The server processes must be previously registered in the SERVER section of a Tmax configuration file.

    The total number of server processes cannot exceed the MAX value defined in the SERVER section. If server processes are already running, only up to the remaining capacity (MAX minus the current number of processes) can be added, even if the specified value is larger.

    If the [-k] option is not specified, only one server process is executed. When used with the -a option, the server is executed by the TMM process instead of the TMBOOT process.

    [-S server_name [-a]]

    Starts the specified server processes up to the configured MIN value. If the MIN value exceeds the remaining capacity, only as many processes as possible are started without exceeding the 'MAX' limit.

    When used with the -a option, the server is started by the TMM process instead of the TMBOOT process.

    When used with the [-g] option, only the specified server group is targeted. Without using the [-g] option, all server groups with the same server name are started.

    [-t tms_name [-g svg_name] [-k all]]

    Starts an additional TMS process. This is allowed only if the total number of TMS processes does not exceed the MAXTMS value specified in the Tmax configuration file. If the same TMS_name exists in multiple server groups, all TMS processes with that name are started.

    When used with the [-g svg_name] option, only the TMS processes in the specified server group are started. This behavior is the same as the [-G] option.

    When used with the [-k all] option, transaction recovery is enabled. Recovery is executed when all groups are terminated and then restarted, and it is performed by each TMS group. Use this option to start and terminate all TMS processes with the specified name.

    [-B trb_node]

    Starts the TRB node.

    [-T]

    Starts Tmax system processes (TMM, CLL, CLH, and TMS) only.

    [-w]

    Starts processes sequentially. If no option is used for the tmboot command, all registered server processes start at the same time. Some server processes may not start normally because certain OSs cannot create sufficient resources.

    • LOCK usage condition when server processes connect to TMM (LOCK | NOLOCK)

    • WAIT condition when server processes start (NO-WAIT | FINITE-WAIT)

      • Behaves the same as "-d -1000000 (1sec)".

      • When the [–d] option is used, this option will be ignored.

    [-d boot_time]

    Starting multiple server processes simultaneously can cause a problem because a CLH can overload with registration requests. To solve this problem, this option allows a registration interval to be adjusted by specifying the period spent to start server processes. (Default value: LOCK and NO-WAIT, unit: usec)

    • LOCK usage condition when server processes connect to TMM (LOCK | NOLOCK)

    • WAIT condition when server processes start (NO-WAIT | FINITE-WAIT)

      • -d val < 0 : LOCK, |VAL| FINITE-WAIT *

      • -d val = 0 : NO-LOCK, NO-WAIT

      • -d val > 0 : NO-LOCK, |VAL| FINITE-WAIT

      • If the val for the [–d] option is not 0, an absolute value (|VAL|) is used in usec.

    • For FINITE-WAIT, the |VAL| value specifies the maximum WAIT time of each process, not the total WAIT time of all processes.

    • When a server process sends the signal, WAIT is released. This means that it attempts to start the next process immediately after receiving the signal, without waiting until the specified |VAL| time. If VAL is a negative number, LOCK is used. Using this option ignores the [-w] option.

    [-W]

    Causes tmboot to wait for each server process to complete initialization before starting the next one.

    [-D]

    Similar to the -d option, but continues waiting until the specified |VAL| time has elapsed, even if a signal arrives during finite wait.

    [-e clh | cas | tlm | tsm]

    Starts CLH, CAS, and/or TLM Tmax engine processes. This option is used when an error occurred while using a tmboot command or when an engine process is terminated by a kill command. The tmdown command does not support this option.

    • clh : Starts a CLH.

    • cas : Starts a CAS.

    • tlm : Starts a TLM.

    • tsm : Starts a TSM.

    [-R]

    Starts a Tmax system in a remote node via a remote shell (rsh or remsh).

    With this option, processes started by tmboot do not inherit tmboot’s standard input or output.

    • Usage

      (remote)
       rsh $HOSTNAME tmboot.sh
       - tmboot.sh
       TMAXDIR=/data3/starbj81/tmax64; export TMAXDIR
       PATH=$PATH:$TMAXDIR/bin; export PATH
       export LD_LIBRARY_PATH=$LIBPATH:$TMAXDIR/ (BIT)
       export LIBPATH=$LIBPATH:$TMAXDIR/ (BIT)
       exec tmboot -R
       echo "tmboot success"
       exit 0

    [-G tms_svg_name [-k all]]

    Starts one TMS server in the specified server group.

    When used with the [-k all] option, transaction recovery is enabled. Recovery is executed when all groups are terminated and then restarted, and it is performed by each TMS group. Use this option to start and terminate all TMS processes with the specified name.

  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following starts all Tmax processes and application server processes by referring to the <tmconfig> file in the config directory under the TMAXDIR directory:

      $ tmboot
    • The following starts all TMS processes created with tms_name:

      $ tmboot -t tms_name -k all
    • In the following, a configuration option of a server group is used. When several server groups use the same tms_name, the name of a server group that includes the corresponding TMS can be specified with the [-g] option. If the name is not specified, the TMS in the first server group with the specified name is started.

      $ tmboot -t tms_name -k all -g svgname
    • The following starts all application server processes defined in the SERVER section by referencing the <tmconfig> file:

      $ tmboot -A
    • The following starts application server processes in the cosmo node registered in the NODE section by referencing the <exconfig> configuration file in the /user1/tmax/con directory:

      $ tmboot -n cosmo -f /user1/tmax/con/exconfig
    • The following starts 5 svr1 processes by referencing the <tmconfig2> configuration file.

      $ tmboot -s svr1 -k 5 -f tmconfig2

For more information about the cfl and tmdown commands, refer to cfl, tmdown.

Considerations when starting nodes in a multi-node configuration

In a multi-node environment, nodes attempt to connect to each other simultaneously. This can cause connection conflicts or timing issues, potentially resulting in connection failures or other errors.

As the number of nodes increases, the likelihood of such problems also increases. To avoid these issues, follow these guidelines:

  • Start nodes using 'racd' from the administrative node.

  • If starting nodes manually, start them one at a time with a certain interval between each.

tmconfig path reference in tmboot

When the tmboot command is used to start Tmax, the <tmconfig> binary configuration file in $TMAXDIR/config/ is copied to $TMAXDIR/path/ and the configuration file under $TMAXDIR/path is used. However, if $TMAXDIR/config/tmconfig is referenced to start a specific server with the -S or -s option and a Tmax engine is already started, a problem can arise under the following conditions.

  • Configuration File

    <Original file>

    *SVRGROUP
    svg1       NODENAME = "tmaxh4"
    *SERVER
    svr1       SVGNAME = svg1
    svr2       SVGNAME = svg1
    *SERVICE
    TOUPPER1   SVRNAME = svr1
    TOUPPER2   SVRNAME = svr2

    <Modified file during runtime>

    *SVRGROUP
    svg1       NODENAME = "tmaxh4"
    *SERVER
    svr1       SVGNAME = svg1
    svr3       SVGNAME = svg1
    svr2       SVGNAME = svg1
    *SERVICE
    TOUPPER1   SVRNAME = svr1
    TOUPPER3   SVRNAME = svr3
    TOUPPER2   SVRNAME = svr2

Execute the cfl command to re-compile the configuration file modified during runtime as follows:

$ cfl –i node1.m

Start the newly added server.

$ tmboot –S svr3

If executing tmboot -S after changing the configuration file during runtime, the following error may occur:

(E) BOOT3007 maxsvr (1) is over for svr(svr3:svr2): nodeno = 0, svri = 5, cur = 1, ksvr = 1 [BOOT0015]

When cfl is executed in a production environment, changes are applied only to $TMAXDIR/config/tmconfig, while shared memory continues to use the previous configuration defined in $TMAXDIR/path/tmconfig. As a result, if a new server process is started through tmboot -S, an already running server process may be restarted, which can cause errors. The cfl command is not permitted once a Tmax engine has been started. If cfl is executed in that state, the resulting errors can be difficult to diagnose.

Therefore, during Tmax engine operation, the <tmconfig> file referenced by tmboot when using the -S, -s, -g, -q, -t, or -A options is $TMAXDIR/path/tmconfig, not $TMAXDIR/config/tmconfig. (When the engine itself is started, $TMAXDIR/path/tmconfig is also referenced.)

$ cfl –i new_config.m –o tmchg
$ tmadmin : cfgadd –I tmchg
$ tmboot –S new_svr –f tmchg

When executing tmboot, if a specific binary configuration file is designated using the [-f] option, $TMAXDIR/config/tmconfig will be used to start the server. To dynamically add a server, a specific configuration file must be designated by using the [–f] option. The server is then started by using the changed binary configuration file placed in $TMAXDIR/config/.

2. Shutting Down Tmax

The Tmax binary configuration file is used to shut down Tmax system. During the shutdown process, shared memory, which was used by the system, is cleared, and all running Tmax processes (TMM, TMS, CLL, CLH, RQS) and application programs are terminated.

2.1. tmdown

The tmdown command shuts down the Tmax system entirely or partially. It references the Tmax configuration file to shut down the system, the binary Tmax configuration file (the source configuration file) must be compiled through the cfl command and the compiled output must be specified with the path by using the [-f] option.

If the [-f] option is not specified, the <tmconfig> file in the TMAXDIR/config directory will be used by default. If only the [-f] option is used, tmdown will end all Tmax management processes and all server processes registered in the SERVER section of the Tmax configuration file, and remove IPC resources related to the Tmax system. The system is terminated in the following order:

  1. Application server processes registered in the SERVER section are ended.

  2. Any active TMS process in each server group is terminated.

  3. Tmax management processes are terminated: first CLH, second CLL, and then TMM. However, if the MIN value of CLH is not 1, CLL may be terminated before CLH.

Assume that there is a service that has been dynamically registered in a backup server, and now the service is removed from shared memory because the server is entirely shut down. In this case, after failure recovery (all backup servers were terminated and servers on normal nodes are restarted.), naming services cannot be provided to clients that accessed the backup node. Therefore, dynamic services of backup servers should not be deleted from shared memory even after the server is shut down.

The following shows how to use the command.

  • Usage

    $tmdown [-A] [-f binary Tmax configuration file name] [-g servergroup_name] [-h] [-V][-i] [-b]
            [-n node_name] [-p server_num] [-q rq_svg_name]
            [-s server_name [-k count]] [-S server_name] [-t tms_name [-g svg_name]
            [-k all]] [-w wait_time] [-B trb_node] [-R] [-y] [-G tms_svg_name]
    Option Description

    [-A]

    Terminates all application server processes.

    [-f binary Tmax configuration file name]

    Specifies the binary Tmax configuration file with a path.

    If the [-f] option is not specified, the tmconfig file in the config directory under the TMAXDIR is used by default.

    [-g servergroup_name]

    Terminates server processes in the specified server group.

    When used with the [-s] or [-S] option, only the processes with the specified server name within the specified server group are terminated.

    When used with the [-t] option, one TMS server matching the specified tms_name in the specified server group is terminated.

    [-h]

    Shows the command help.

    [-V]

    Shows the version of an executable file.

    [-i]

    Causes tmdown to terminate all processes immediately.

    By default, tmdown shuts down the system after gracefully terminating all running processes. When using the [-i] (immediately) option, however, all running processes are forcibly terminated. Use this option with caution.

    [-b]

    Prevents the POD server from being automatically started by the ASQCOUNT setting before tmboot is explicitly invoked. Must be used with the [-S], [–g], and [–A] options.

    [-n node_name]

    Terminates all server processes on the specified node. The specified node name must be registered in the NODE section of the Tmax configuration file.

    [-p server_num]

    Terminates the specified server process.

    Unlike the [-s] option, the -p option terminates a server process using its process number (spr_no). The process number can be obtained with "tmadmin st -p".

    [-q rq_svg_name]

    Terminates RQS.

    [-s server_name [-k count]]

    Terminates a single server process with the specified name.

    The specified server process name must be registered in the SERVER section of the Tmax configuration file. When used with the [-k] option, the number of server processes to terminate can be specified. Even if the specified number exceeds the currently running processes, all running processes are terminated without error. Without the [-k] option, only one server process is terminated.

    [-S server_name]

    Terminates all server processes with the specified name. If more than one process matches, all matching processes are terminated.

    When used with the [-g] option, only processes in the specified server group are terminated. Without the [-g] option, all server groups with the specified name are targeted.

    [-t tms_name [-g svg_name] [-k all]]

    Terminates one TMS process in all server groups with the specified TMS process name. If the same TMS_name exists in multiple server groups, all TMS processes with that name are targeted.

    When used with the [-g svg_name] option, only the TMS processes in the specified server group are terminated. This behavior is the same as the [-G] option.

    When used with the [-k all] option, transaction recovery is enabled. Recovery is executed when all groups are terminated and then restarted, and it is performed by each TMS group. Use this option to start and terminate all TMS processes with the specified name.

    [-w wait_time]

    Causes tmdown to wait for the specified time before terminating processes.

    [-B trb_node]

    Terminates the TRB node.

    [-R]

    Enables rolling down.

    [-y]

    Causes tmdown to skip the user confirmation prompt (y|n) before shutting down the system.

    [-G tms_svg_name]

    Terminates one TMS server in the specified server group.

    When used with the [-k all] option, transaction recovery is enabled. Recovery is executed when all groups are terminated and then restarted, and it is performed by each TMS group. Use this option to start and terminate all TMS processes with the specified name.

  • Examples

    • The following shuts down an entire Tmax system by referencing the <tmconfig> file in the TMAXDIR/config directory. Tmax management processes and application processes are all terminated.

      $ tmdown
    • The following shuts down all TMS processes with the specified tsm_name.

      $ tmdown -t tms_name -k all
    • The following uses a server group configuration option. If multiple server groups have the same tms_name, use the [–g] option to specify the name of the server group to which the TMS belongs.

      If no server group name is specified, the first server group with the matching TSM name is terminated.

      $ tmdown -t tms_name -k all -g svgname
    • The following shuts down an entire Tmax system by referencing the <tmconfig2> file.

      $ tmdown -f tmconfig2
    • The following terminates all application server processes in svr1 by referencing the <tmconfig> file.

      $ tmdown -S svr1
    • The following forcibly terminates application server processes in svr1 by referencing the <tmconfig> file. Any server process not terminated immediately can be terminated by using the [-i] option.

      $ tmdown -S svr1 -i
    • The following forcibly terminates a server process with the specified <spr_no> by referencing the <tmconfig> file. If a server has multiple processes, only the process belonging to a server that is currently in a loop can be forcibly terminated.

      $ tmdown -p <spr_no> -i
    • The following terminates all application server processes in the 'cosmo' node registered in the NODE section by using the <exconfig> file in the '/user1/tmax/con' directory.

      $ tmdown -n cosmo -f /user1/tmax/con/exconfig
    • The following terminates only one active svr1 process by using the <tmconfig2> file.

      $ tmdown -s svr1 -f tmconfig2
Rolling Down

In previous versions of Tmax, when a Tmax system was abnormally terminated while processing client requests, requests being processed were completed but enqueued requests would fail, and an error message was reported. However, Tmax 5 provides the Rolling Down function, which allows a server to reply to all requests (including enqueued requests) before the server terminates.

  • Usage

    $ tmdown –R –n node_name
    Option Description

    –n node_name

    Specifies the name of a node to terminate.

  • Environment

    This command can be used in a system with a Tmax system installed.

  • Example

    Assume that NODE A and NODE B are part of a multi-node (or multi-domain) system and a total of 100 clients are currently accessing NODE A.

    • When terminating the Tmax system on NODE A:

      $ tmdown –R –n NODEA
      1. A CLL in NODE A blocks a listening port for a client.

      2. A Tmax system in NODE A finishes processing requests currently being handled by a server and then sends the results to the client.

      3. The Tmax system in NODE A sends enqueued requests to NODE B, which is set as TMAX_BACKUP_ADDR.

      4. The Tmax system in NODE A is shut down.

      5. A Tmax system in NODE B handles the requests received from NODE A and directly replies to the client.

      6. All clients connected to NODE A get the normal reply.

    • When terminating Tmax system of NODE B:

      $ tmdown –R –n NODEB
      1. A CLH in NODE A distributes 100 clients requests to NODE A and NODE B equally.

      2. Enter tmdown -R –n NODEB to terminate the Tmax system in NODE B.

      3. A CLL in NODE B blocks a listening port for a client.

      4. The Tmax system in NODE B finishes processing requests currently being handled.

      5. Because the client is connected to NODE A, the Tmax system in NODE B sends the processing results to CLH in NODE A. CLH in NODE A replies to each client.

      6. The Tmax system in NODE B sends enqueued requests to NODE A, which is specified as TMAX_BACKUP_ADDR.

      7. The Tmax system in NODE B is shut down.

      8. The Tmax system in NODE A processes the requests and replies to each client.

      9. All clients connected to NODE A get a normal reply. All 100 clients must get a normal reply.

        For NODE B to process client requests instead of NODE A, TMAX_BACKUP_ADDR and TMAX_BACKUP_PORT of the client connected to NODE A must be specified to that of NODE B. Otherwise, when the Tmax system in NODE A is shut down, the enqueued client requests fail and the TPESYSTEM error is reported.