Tuxedo development instance in Linux

Source: Internet
Author: User
  1. Install configurations
    Upload the Installation File tux81.tar and decompress it.
    Tar-xvf tux81.tar
    There is a tuxedo8.1 directory under the current directory, and you need to configure the environment variable.
    Vi. bash_profile Add the following content
    Path = $ path: $ home/bin
    # Apache
    Export apache_home =/usr/local/Apache

    # Oracle
    Export oracle_base =/home/ora/ora9
    Export ORACLE_HOME =/home/ora/ora9/Oracle
    Export oracle_sid = linuxdb
    Export oracle_term = xterm
    # Xerces-C
    Export xercescroot = $ home/APP/xerces-c-src_2_7_0

    # App
    Export app_home = $ home/APP
    Export app_bin = $ app_home/src/bin

    # Tuxedo
    Export tuxdir =/home/dev/APP/tuxedo8.1
    Tuxconfig = $ app_bin/tuxconfig
    Export tuxconfig
    Wsnaddr = // 192.168.1.113: 5438; export wsnaddr

    # Path
    Path = $ path:/usr/bin:/usr/sbin:/usr/local/bin :.
    Path = $ path: $ ORACLE_HOME/bin: $ tuxdir/bin: $ apache_home/bin
    Export path

    # LD_LIBRARY_PATH
    LD_LIBRARY_PATH = $ xercescroot/lib: $ tuxdir/lib:/usr/local/lib: $ ORACLE_HOME/rdbms/demo
    LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ tuxdir/lib
    Export LD_LIBRARY_PATH

    # Lang
    Nls_lang = american_america.zhs16gbk; export nls_lang
    Export lang = C
    Export lc_all = "zh_cn.gb18030"

    Save and exit. Source. bash_profile makes the environment variable take effect.
    The preceding directories can be modified based on their own directories. Because I have used apache, xerecs, Oracle, FastCGI, and so on, these paths are included. If these paths are not used, delete the corresponding path configuration.
    The following are some of my problems and solutions:

    Question 1:
    The following error occurs when you run the tmadmin command:
    NLS: 4: cannot open message catalog tmadmin_cat, set 1, num 184; check tuxdir =/home/dev/APP/tuxedo8.1, lang = zh_cn.gb18030
    Certainly, this error is caused by the character set. I use a simplified Chinese Linux
    Add the following environment variable VI. bash_profile:
    Export lang = C
    Save and exit. Source. bash_profile makes the environment variable take effect.

    Question 2:
    Run tmadmin again. The error disappears, but the following error occurs:
    Tmadmin-copyright (c) 1996-1999 BEA Systems, Inc.
    Portions * copyright 1986-1997 RSA Data Security, Inc.
    All rights reserved.
    Distributed under license by BEA Systems, Inc.
    Tuxedo is a registered trademark.
    Tmadmin_cat: 188: Error while obtaining the bulletin board Parameters
    Analyze the above information, because no tuxconfig Point file is compiled, that is, the announcement board File
    After some configuration above, you can use tuxedo. Subsequent configuration announcement files and development programs are developed content.

  2. Configure the announcement board File
    The core content of the tuxedo service is configured in another configuration text file, which is generally named ubbconfig (you can name it as needed), and then run the tmlodcfg-y ubbconfig command, compile it into a binary file. The environment variable tuxconfig points to the file name and runs on the host. Therefore, before compiling the ubbconfig configuration file, ensure that the configuration no. tuxconfig environment variable is correct. Otherwise, an error is reported.

    Here is a simple announcement board configuration file
    # (C) 2003 BEA Systems, Inc. All rights reserved.
    # Ident "@ (#) samples/atmi/simpapp/ubbsimple $ revision: 1.5 $"
    # Skeleton ubbconfig file for the tuxedo simple application.
    # Replace the <bracketed> items with the appropriate values.
    * Resources
    # Example:
    Ipckey 123456
    Domainid server_240
    Master Chenli
    Maxaccessers 1000
    Maxservers 1000
    Maxservices 2500
    Maxgtt 5
    Model SHM
    Ldbal n
    Blocktime 10
    * Machines
    Default:
    Appdir = "/home/dev/APP/src/bin"
    Tuxconfig = "/home/dev/APP/src/bin/tuxconfig"
    Tuxdir = "/home/dev/APP/tuxedo8.1"
    Tlogsize = 500
    Maxwsclients = 50

    # Example:
    # Appdir = "/home/ME/simpapp"
    # Tuxconfig = "/home/ME/simpapp/tuxconfig"
    # Tuxdir = "/usr/tuxedo"
    # <Machine-Name>
    Chenli_linux lmid = Chenli
    # Example:
    # Beatux lmid = Chenli
    * Groups
    Group1
    Lmid = Chenli kgno = 1 openinfo = none
    Group2
    Lmid = Chenli kgno = 2 openinfo = none
    Group3
    Lmid = Chenli kgno = 3 openinfo = none
    Group4
    Lmid = Chenli kgno = 4 openinfo = none

    Groupwsl
    Lmid = Chenli kgno = 6 openinfo = none

    * Servers
    Default:
    Clopt = "-a" restart = y Grace = 86400
    #===================================Group1 servers define ====================== ================ #
    General_service srvgrp = group1 srvid = 200 min = 1 max = 2 replyq = y rqaddr = "general_service" maxgen = 2

    # WSL srvgrp = group1 srvid = 700 min = 1 max = 1 replyq = y maxgen = 2 restart = y clopt = "-a-t ---N // 192.168.1.201: 3195-H // 192.168.1.201: 3195-M 5-M 20-x 3-T 120-I 30"
    WSL srvgrp = groupwsl srvid = 2 maxgen = 2 clopt = "-a ---N // 192.168.1.113: 3195-M 2-M 6-x 10"

    * Services
    General_service

    Note that in this line, chenli_linux must use the host name obtained by hostname.
    Chenli_linux lmid = Chenli

    Bytes ---------------------------------------------------------------------------------------------------------------------
    General_service srvgrp = group1 srvid = 200 min = 1 max = 2 replyq = y rqaddr = "general_service" maxgen = 2
    If restart = y when the server program general_service ends abnormally, tuxedo restarts the server according to the maxgen and Grace parameters.
    Bytes ---------------------------------------------------------------------------------------------------------------------

    WSL srvgrp = groupwsl srvid = 2 maxgen = 2 clopt = "-a ---N // 192.168.1.113: 3195-M 2-M 6-x 10 "is set to provide non-local client program calls, indicating that the service will listen for requests on the IP address 192.168.1.113 and port 3195 at the current level, and perform Response Processing.

    * Services
    General_service
    A service is configured to provide the called service. A service program may provide multiple services.

    Question 1:
    The following error occurs in tmloadcf-y UBB:
    NLS: 4: cannot open message catalog ubuntux_cat, set 1, num 883; check tuxdir =/home/dev/APP/tuxedo8.1, lang = zh_cn.gb18030
    It is obviously related to the setting of environment variables.
    Export lang = C
    Export lc_all = C
    Re-Execute tmloadcf-y UBB. There is no error and the problem is solved.

  3. Program Development
    Before developing a program, you also need to introduce a key thing: License.
    Tuxedo has two sets of License (SDK: Development license, rdk: Actual Application license ). when you compile a program, you must use the SDK-type license. This license allows a few users to connect. the two licenses can be used for official use, but the number of users is different (if there are many users, the sdklicense and tuxedo cannot afford it ).
    If there is no valid SDK license, the following error message is returned when you execute buildserver and buildclient:
    Ubuntux_cat: 4382: Error: you do not have a valid SDK license
    Obtain a valid tuxedo SDK license and copy it to the $ tuxdir/udataobj directory. Then, you can use buildserver and buildclient for program development.

    Question 1:
    In the tuxedo client, if tpinit fails to be called,-1 and tperrno = 12 are returned.
    When you use buildclient to compile the client program, if the-W option is added, you must set the wsaddr environment variable. If the-W option is not used, local services are requested by default.
    If the-W option is used when compiling the client program, and the wsaddr environment variable is not correctly set, tpinit fails and returns-1, tperrno = 12;
    In UBB, you must set the WSL option for the group in which you want to access the service, for example:
    WSL srvgrp = group1 srvid = 2 maxgen = 2 clopt = "-a ---N // 192.168.1.201: 3195-M 2-M 6-x 10"
    At the same time, set maxwsclients = 5 on the * Machine node. maxwsclients is the maximum number of WSL clients.
    When the client is running, you can access the service by export wsnaddr = // 192.168.1.201: 3195.
    If the-W option is not used when compiling the client program, the local service is accessed by default and the wsaddr environment variable does not need to be set.

    Question 2:
    WSL startup failed
    There are many causes of WSL startup failure, such as: maxwsclients is not configured in UBB, And the WSL port conflicts with others. You need to check the ulog to determine the specific cause.

    Question 3:
    Tpcall sometimes returns-1 inexplicably
    After tpcall, the memory (the memory applied by the above tpalloc and other functions) should be released no matter whether the memory is successful or not ). Then you can use tpterm.

    Question 4:
    When starting the service, the following information is displayed:
    Ubuntux_cat: 819: info: process id = 1956 assume started (PIPE ).
    In this case, you need to check whether the program has exited abnormally when the tpsvrinit function is in the program.

    Question 5:
    When the tmboot-y service is started, the following error message is displayed:
    Mboot: Warn: No BBL available on site SRD.
    Will not attempt to boot server processes on that site.
    Remove the tlogdevice = "/home/SRD/srdapp/bin/tlog" definition in machines.

    Question 6:
    When starting the tuxedo service, the following error message is returned:
    Libtux_cat: 328: Error: no space in bulletin board for server table
    The value of maxwsclients and maxaccessers in UBB is too small. Modify the values of these two parameters.

    Question 7:
    When executing tmloadcf, the following error is reported:
    Ubuntux_cat: 1615: Error: identifier or number must be followed by white space or punctuation
    It indicates that a keyword must be followed by a space or press Enter. You can add a space at the corresponding error location based on the error message.

    Question 8:
    When running the tmboot-y command to start the service, the following error is reported:
    Tpelimit-a system limit has been reached
    Ubuntux_cat: 1685: Error: Application initialization failure
    No space in bulletin board for service table
    The above information shows that some resources configured by TUXEDO are limited. You can modify the parameters maxaccessers, maxservers, maxservices, and maxgtt in the ubbconfig configuration file to apply for more resources, increase the preceding parameters so that no error message is displayed. The specific increase depends on your system configuration and requirements.

  4. Debug the tuxedo service using GDB
    When compiling a program, you can use GDB to debug the tuxedo service by adding the-G option.
    Assume that your service program name is program. First start the service with tmboot-y, and then query the process ID of the service program.
    PS-Ef | grep Program
    After obtaining the process PID, assume that the process ID is 5313, and then execute the following command to enter the gdb debugging Service Program Status
    GDB -- pid = 5313
    Note that R and run should not be used when debugging the service program, because the program is already running.
    Use C to continue running. The breakpoint is usually first played in the service function and then debugged downward.
    The debugging method in the background is the same as that in the general GDB Method for debugging applications.

    I will continue to improve it later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.