tuxedo笔记

一、常用命令

1.使用buildclient构造client端程序

步骤:

1. client端程序包含atmi.h头文件;

2. 正确设置TUXDIR环境变量;

3. 使用buildclient工具编译程序;

buildclient的语法如下:

buildclient [-v] [-C] -o executable -f first-file \ [-f first-file]... [-l last-file]...

选项含义:

-C:编译COBOL代码;

-o:可执行文件的名字;

-f option:在链接tuxedo库之前处理该文件;

-l option:在链接tuxedo库之后处理该文件;

-v:打印实际的编译命令行。

buildclient在运行中使用下面的环境变量:

CFLAGS:自动在该变量中增加"-I${TUXDIR}/include";

CC:使用该变量指向的编译器。

2.使用tmloadcf

tmloadcf用于将tuxedo文本配置文件转化为运行时需要的二进制文件。

二进制文件的文件名由环境变量TUXCONFIG指定,该文件名必须是绝对路径的。

tmloadcf的语法如下:

tmloadcf [option] text-file;

选项有如下几个:

-c:计算该配置需要的IPC资源而不生成目标文件;

-n:进行语法检查而不生成目标文件;

-b:限制目标文件的大小;

-y:不提示直接覆盖现有的目标文件;

3.使用tmunloadcf

tmunloadcf将tuxedo二进制配置文件以ASCII形式输出。

4.使用tmboot

tmboot启动tuxedo应用服务,创建必要的IPC资源。

有如下选项,无选项时启动所有配置的服务:

-A:只启动所有机器的管理server(BBL、DBBL);

-g grpname:只启动指定group的server;

-i srvid:只启动指定的server ID的所有server;

-S:启动所有应用server;

-s servername:启动指定的server;

-c:只计算最小的IPC资源需求。

5.使用tmshutdown

tmshutdown停止tuxedo服务,必要是删除相关的IPC资源。

有如下选项:

-A、-g、-i、-S、-s:与tmboot相同;

-R:在多机环境下停止除BB外的服务;

强行停止服务可追加-k KILL命令

6.使用buildserver构造server端程序

语法如下:

buildserver [-o executable]... [-v] \ [-s service2, service3:func] \ [-f source/object]...\ [-l object] ... \ [-r resource manager]

选项含义:

-o:生成的可执行程序名;

-v:打印实际的编译命令行;

-s:指定提供的service和对应的处理函数;

-f:在链接tuxedo库之前处理该文件;

-l:在链接tuxedo库之后处理该文件;

-r:要链接相关资源库(在$TUXDIR/udataobj/目录下)。

7.使用tmadmin

启动管理命令(注意执行完其管理命令eg. psr、psc之后要quit一次不然还在tmadmin下面)

psr查看启动进程

psc查看服务

8.使用tmconfig

tmconfig命令,用于动态修改Tuxedo应用系统的配置。它的使用方法如下:

注意:以下环境在Unix服务器中通过,但是在windows中遇到了一些问题

(1) $ tmconfig

Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS

 5)SERVICES  6) NETWORK 7) ROUTING q) QUIT 9) WSL

 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: 4

Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE

   6) CLEAR BUFFER 7) QUIT [1]: 3

Enter editor to add/modify fields [n]? n

Perform operation [y]? y

Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS

 5)SERVICES  6) NETWORK 7) ROUTING q) QUIT 9) WSL

 10) NETGROUPS 11) NETMAPS 12) INTERFACES [4]: 4

Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE

   6) CLEAR BUFFER 7) QUIT [3]: 5

Enter editor to add/modify fields [n]? y

(2)修改TA_SERVERNAME   /opt/app/tuxapp/tuxmisc/app/paysrv

注意:其他不需要修改的项全部删除

(3)再次执行

Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE

   6) CLEAR BUFFER 7) QUIT [1]: 3

Enter editor to add/modify fields [n]? n

Perform operation [y]? y

将指定路径下的服务的配置load

(4)再次进入修改文件编辑窗口,现在指定服务的配置文件就已经被load进来了,修改指定的项目保存即可

注意:在修改动态配置的时候,需要先将要修改的服务停掉,修改过后再启动 

二、windows环境下配置tuxedo

1、在黑屏cmd模式下运行tuxedo

(1)、安装tuxedo9.0(目前我用的是9.0版本的)

(2)、注意需要license文件lic.txt(在官网上下载)放在tuxedo9.0根目录下的udataobj目录下面

(3)、到tuxedo9.0根目录下面进入tuxedo\tuxedo9.0\samples\atmi\simpapp目录,查看README.nt文件,根据说明一步一步的进行操作

操作过程中注意事项:ubbsimple文件中的主机名要大写,并且不能有中线等特殊符号,查看主机名用hostname命令

三、tperrno对照表

当一个ATMI调用发生错误时,全局变量tperrno被设置,它指示发生错误的原因。可选值如下:

 

代码

解释

1

TPEABORT

Transaction can not commit

2

TPEBADDESC

Bad descriptor for tpgetrply(3c)

3

TPEBLOCK

Blocking condition found and no-block specified

4

TPEINVAL

Invalid arguments given

5

TPELIMIT

Too many handles outstanding

6

TPENOENT

No entry found or no room on the Bulletin Board

7

TPEOS

Operating system error

8

TPEPERM

Bad permissions or failed authentication

9

TPEPROTO

Protocol error

10

TPESVCERR

Server error while handling request

11

TPESVCFAIL

Application level service failure

12

TPESYSTEM

Internal BEA TUXEDO error (userlog(3c)) message written)

13

TPETIME

Time-out occurred and TPNOTIME was not specified

14

TPETRAN

Caller in transaction mode and transaction aborted

15

TPGOTSIG

Signal received and TPSIGRSTRT not specified

16

TPERMERR

Resource Manager failure

17

TPEITYPE

Type and/or subtype do not match services

18

TPEOTYPE

Type and/or subtype do not match buffers or unknown

19

TPERELEASE

Caller has made a 3.0 library call

20

TPEHAZARD

Hazard exists that transaction heuristically completed

21

TPEHEURISTIC

Transaction heuristically completed

22

TPEEVENT

Event occurred

23

TPEMATCH

Service name cannot be advertised due to matching conflict

 四、问题集

1、问题:

ULOG: 105143.test1!tmadmin.12238.1.-2: LIBTUX_CAT:577: ERROR: Unable to register because the slot is already owned by another process

$ tmadmin

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:199: WARN: Cannot become administrator.Limited set of commands available.

原因:重复打开tmadmin管理,在重复打开的tmadmin中个别命令不能使用,通过help命令可以看到当前可以使用的命令。

-------------------------------------

2、问题:

174304.test1!WSH.20044.1.0: gtrid x0 x47fb1049 x16e: LIBTUX_CAT:1288: ERROR: File transfer creat failed, file=/var/tmp/TUXAAAa200441, errno=不允许 174304.test1!WSH.20044.1.0: gtrid x0 x47fb1049 x16e: WSNAT_CAT:1042: ERROR: tpcall() call failed, tperrno = 7

原因:

1288 ERROR: File transfer creat failed, file=filename, errno=errno_val

DESCRIPTION

The UNIX kernel call creat () failed on filename. This temporary file was being created to transfer a large message between two TUXEDO System processes on the same machine.

ACTION

Check temporary directory's permissions. Check disk space and inode counts for the temporary file system.

-------------------------------------

3、问题:

105516.test0!TMUSREVT.17177.1.0: gtrid x0 x48105214 xe: CMDTUX_CAT:3129: ERROR: tpenqueue() to qname PAYQUE failed for event EVT_PLC_EFFT tperrno=24

原因:PAYQUE队列没有建立,用qmadmin创建队列。

-------------------------------------

4、问题:

103331.test1!dydealtasksrv.21551.1.0: ERROR: msgsnd err:(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier) errno=22,qid=208507,buf=-9223372032559197904,bytes=293,flag=2048 103331.test1!dydealtasksrv.21551.1.0: LIBTUX_CAT:1286: ERROR: tpreturn could not send reply TPEOS - operating system error

原因:队列没有找到,可能是前台在后台返回前断开了服务连接,所以tpreturn时找不到

接收消息队列。或是其他原因导致队列被删除如 ipcrm -q qid

---------------------------------

5、问题:

101503.lf2qjf2!TUXAGENT.17788: LIBTUX_CAT:536: ERROR: Unable to create request queue 101503.lf2qjf2!TUXAGENT.17788: LIBTUX_CAT:248: ERROR: System init function failed, Uunixerr = : msgget: No space left on device

原因:达到OS系统最大消息上限。使用ipcs -q|wc -l 查看当时建立得消息队列。

使用kmtune|grep msgmni 查看系统消息上限。

-----------------------------------------------------------------

6、问题:

111756.test1!BBL.23626.1.0: 12-11-2008: Tuxedo Version 8.1, 64-bit, Patch Level (none)
111756.test1!BBL.23626.1.0: LIBTUX_CAT:1000: ERROR: System clock has been reset to prior time. Reset again to time after Thu Dec 11 11:17:56 2008
.
111756.test1!BBL.23626.1.0: LIBTUX_CAT:248: ERROR: System init function failed, Uunixerr =
111756.test1!BBL.23626.1.0: CMDTUX_CAT:26: INFO: The BBL is exiting system
111756.test1!tmboot.23625.1.-2: 12-11-2008: Tuxedo Version 8.1, 64-bit
111756.test1!tmboot.23625.1.-2: CMDTUX_CAT:825: ERROR: Process BBL at ANNT_TEST failed with /T tperrno (TPESYSTEM - internal system error)
111756.test1!tmboot.23625.1.-2: WARN: No BBL available on site ANNT_TEST.
Will not attempt to boot server processes on that site.

原因:系统修改OS时间导致,重新创建TLOG 日志后此问题解决。

crdl crlog
如果BBL启动失败是因为事务Transaction Table不能在BB中再分配空间时,处理方法如下:
a. 备份相应的事务日志 TLOG : cp TLOG TLOG_Tuxedo_bbl_backup
b. 删除事务日志TLOG: rm TLOG
c. 使用tmadmin登录到tuxedo系统中重新建一个日志设备,方法如下:
$tmadmin
>crdl -b 1000 -z//tuxedo/new_tuxedo_bbl/TLOG
>crlog -m new_tuxedo_bbl
>q
$tmboot -y

其中:
crdl命令创建TLogdevice
-b 为日志设备大小 1000 block(注意这里的大小必须比配置文件中的TLOGSIZE要大)
-z //tuxedo/new_tuxedo_bbl/TLOG 可以在ubb配置文件中*MACHINES段的TLOGDEVICE保持一致
crlog命令创建Tlog
-m new_tuxedo_bbl: new_tuxedo_bbl是虚拟主机名
如果BBL启动还是失败,看看IPCKEY值配置是否与某个其他用户相同,且那个用户服务在运行.
完毕,祝你启动tuxedo BBL成功

------------------------------------------

7、问题:

ERROR: File transfer creat failed, file=/var/tmp/TUXAAAa248801, errno=Permission denied
122459.test1!Grant.24880.1.0: LIBTUX_CAT:1286: ERROR: tpreturn could not send reply TPEOS - operating system error

原因:服务器多用户tuxedo环境时,创建的tmp里的文件已经存在,重启解决此问题。

 

8、在启动tuxedo服务的时候,报如下错误信息:   LIBTUX_CAT:328: ERROR: No space in Bulletin Board for Server Table
解决方法:ubb中的MAXWSCLIENTS,MAXACCESSERS参数值太小,适当修改这个两个参数值就可以了.

9、在执行tmloadcf的时候,报如下错误:
CMDTUX_CAT:1615: ERROR: Identifier or number must be followed by white space or punctuation
解决方法:说明某个关键字后面需要有空格或者回车,根据错误信息在相应出错的位置添加空格就可以了。

 

10、执行tmboot -y启动服务的时候,报如下错误:
    TPELIMIT - a system limit has been reached
    CMDTUX_CAT:1685: ERROR: Application initialization failure
      No space in Bulletin Board for Service Table
解决方法:上面的信息可以看出,是tuxedo配置的一些资源有限制,可以修改ubbconfig配置文件中的参数 MAXACCESSERS,MAXSERVERS,MAXSERVICES,MAXGTT来申请更多的资源,将上面的参数适当增大知道不出现错误信息为止,具体增加多少根据自己的系统配置和需求决定。

 

11tmloadcf –y ubb的时候如下报错: CMDTUX_CAT:190: ERROR: SRVID xxx is not unique among server group xxxGRP

解决方法:tuxedo原来每个组里面的进程号与MIN\MAX的设置有关,其自动增加,所以组里面的服务ID应该保留足够的间隙

猜你喜欢

转载自blog.csdn.net/yc705201947/article/details/80057298