2009年11月7日星期六

V$PROCESS 参数过小导致tuxedo服务xa_open returned XAER_RMERR错误

问题现象:
tuxedo 启动多个服务,一部分服务启动成功,一部分启动失败。

关键词:
tpopen TPERMERR xa_open returned XAER_RMERR
ORA-12520: TNS:listener could not find available handler for requested
type of server

调查发现
tuxlog中 FOO_SOMSERICE01 启动成功, FOO_SOMESERVICE02 启动失败, 日志如下

161610.foobar!FOO_SOMESERVICE01.16772.1.0: 11-07-2009: Tuxedo Version
9.1, 64-bit
161610.foobar!FOO_SOMESERVICE01.16772.1.0: LIBTUX_CAT:262: INFO:
Standard main starting
161610.foobar!FOO_SOMESERVICE02.16775.1.0: 11-07-2009: Tuxedo Version
9.1, 64-bit
161610.foobar!FOO_SOMESERVICE02.16775.1.0: LIBTUX_CAT:262: INFO:
Standard main starting
161610.foobar!FOO_SOMESERVICE02.16778.1.0: 11-07-2009: Tuxedo Version
9.1, 64-bit
161610.foobar!FOO_SOMESERVICE02.16778.1.0: LIBTUX_CAT:262: INFO:
Standard main starting
161610.foobar!FOO_SOMESERVICE02.16778.1.0: LIBTUX_CAT:466: ERROR:
tpopen TPERMERR xa_open returned XAER_RMERR
161610.foobar!FOO_SOMESERVICE02.16778.1.0: tpopen failed
161610.foobar!FOO_SOMESERVICE02.16778.1.0: LIBTUX_CAT:250: ERROR:
tpsvrinit() failed
161610.foobar!tmboot.16684.1.-2: 11-07-2009: Tuxedo Version 9.1, 64-bit
161610.foobar!tmboot.16684.1.-2: CMDTUX_CAT:825: ERROR: Process
FOO_SOMESERVICE02 at TUXNODENAME failed with /T tperrno (TPERMERR -
resource manager error)

调查 ~/bin下面的xa_NULLmmddyyyy.trc 格式的当期文件发现:

161610.16778.0:
ORA-12520: TNS:listener could not find available handler for requested
type of server

161610.16778.0:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12520.

ORACLE XA: Version 10.2.0.1.0. RM name = 'Oracle_XA'.

由此确定,应该是oracle 用户设置的 V$PROCESS参数过小的原因导致 无法连接更多。

select count(1) from V$PROCESS;

结论:

用以下语句修改数据库的processes值
alter system set processes=500 scope=spfile

(由于processes是静态参数,scope只能为spfile,在v$sgastate条件为'procesees'中可以看到会每个process会点4个字节),
重新启动数据库使新改的processes生效

2009年11月5日星期四

Sun Studio C++ - -lCrun -lCstd option with cc and ld issues

Question: sun studio, tuxedo 的server编译 和c++有关库时出现如下引用的错误
经查和两个编译器标志有关,根据sun c++ user guide 可以得到如下结论:

1. Never use "ld" to make shared library.
2. Have the shared library dependet on run time lib and standard lib.

CC -G -o libmylib.so -Kpic mysource.cpp -lCrun -lCstd
cc -o myprg source.c -L. -lmylib

buildserver -o foobar_2BitImgLize -f "foobar_2BitImgLize.o
DealWithType0.o DealWithType2.o ADealWith.o TifMake.o ImageSave.o
ComFunction.o NotifyKumi.o
/export/home/tuxedo/version/server/lib/libserver.so
/export/home/tuxedo/version/server/lib/libdb.so
/export/home/foobar/lib/libjpeg.so /export/home/foobar/lib/libini.so
/export/home/foobar/lib/libtiftools.so
/export/home/foobar/lib/libColorConvert.so
/export/home/foobar/lib/libJbig.so /export/home/foobar/lib/libzlib.so
/export/home/foobar/lib/libImageBase.so
/export/home/foobar/lib/libImageApply.so
/export/home/foobar/lib/libEpsMake.so
/export/home/foobar/lib/libbarcode.so
/export/home/foobar/lib/libOMCommon.so
/export/home/foobar/lib/libimagemanage.so" -s "foobar_2BitImgLize" -r
Oracle_XA
Undefined first referenced
symbol in file
__1cG__CrunKpure_error6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_
/export/home/foobar/lib/libEpsMake.so
__1cG__CrunIex_alloc6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_
/export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_
/export/home/foobar/lib/libEpsMake.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Jconstruct6Mpcrkc_v_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___Edata6kM_1_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpInDstdJallocator4Cb___Edata6kM_1_
/export/home/foobar/lib/libtiftools.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_2t6Mrkn0B__v_
/export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Edata6kM_pkc_
/export/home/foobar/lib/libEpsMake.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2T6M_v_
/export/home/foobar/lib/libEpsMake.so
__1cDstdGvector4Cbn0AJallocator4Cb___Ferase6Mn0CIiterator_2_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___2T6M_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdZ__RTTI__1nDstdJbad_alloc__ /export/home/foobar/lib/libjpeg.so
__1cDstdLchar_traits4Cc_Deof6F_i_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___G__copy6Mn0COconst_iterator_2n0CIiterator__3_
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdK__rw_basis4CpInDstdJallocator4Cb___2t6Mirkn0C__v_
/export/home/foobar/lib/libtiftools.so
__1cDstdJbad_alloc2t6M_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Jreference2v6kM_b_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunKvector_des6FpvLLpF1_v_v_ /export/home/foobar/lib/libImageApply.so
__1cDstdM__initialize4CL_6FrTA1_v_ /export/home/foobar/lib/libtiftools.so
__1cG__CrunKvector_con6FpvLLpF1_vp2_v_ /export/home/foobar/lib/libImageApply.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2d6kM2_l_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2s6kMl_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Dend6M_n0CIiterator__
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdL__construct4CcCc_6FpTArkTB_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdJallocator4Cc_2t6M_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdJallocator4Cb_2t6M_v_ /export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2t6M_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Iallocate6MLpc_2_
/export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2e6kMrk2_b_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunGex_get6F_pv_ /export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2i6Mi_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2I6M_r2_
/export/home/foobar/lib/libtiftools.so
__1c2n6FLpv_0_ /export/home/foobar/lib/libjpeg.so
__1cDstdJexceptionG__vtbl_ /export/home/foobar/lib/libjpeg.so
__1cDstdJbad_allocG__vtbl_ /export/home/foobar/lib/libjpeg.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Kdeallocate6MpcL_v_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___2G6Mrk1_3_
/export/home/foobar/lib/libjpeg.so
__1cG__CrunMex_rethrow_q6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Jreference2G6Mb_r2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___M__insert_aux6Mn0CIiterator_b_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2p6kM_n0CJreference__
/export/home/foobar/lib/libtiftools.so
__1cG__CrunSregister_exit_code6FpG_v_v_
/export/home/foobar/lib/libColorConvert.so
__1cG__CrunHex_skip6F_b_ /export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6Mrkn0C__v_
/export/home/foobar/lib/libEpsMake.so
__1cDstdbArandfoobar_access_iterator_tag2t6M_v_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunIex_clean6F_v_ /export/home/foobar/lib/libjpeg.so
__1cG__CrunKex_rethrow6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Oconst_iterator2t6Mrkn0CIiterator__v_
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___2t6Mirkn0C__v_
/export/home/foobar/lib/libjpeg.so
__1c2k6Fpv0_v_ /export/home/foobar/lib/libImageBase.so
__1cDstdDmax4CL_6FrkTA3_3_ /export/home/foobar/lib/libjpeg.so
__1c2N6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1c2n6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Fbegin6M_n0CIiterator__
/export/home/foobar/lib/libtiftools.so
__1c2K6Fpv_v_ /export/home/foobar/lib/libjpeg.so
__1c2k6Fpv_v_ /export/home/foobar/lib/libjpeg.so
ld: fatal: Symbol referencing errors. No output written to foobar_2BitImgLize
CMDTUX_CAT:1832: ERROR: can't execute cc -xarch=v9 -w -mt
-I$TUXDIR/include -o foobar_2BitImgLize BS-49ea.c -L${TUXDIR}/lib
foobar_2BitImgLize.o DealWithType0.o DealWithType2.o ADealWith.o
TifMake.o ImageSave.o ComFunction.o NotifyKumi.o
/export/home/tuxedo/version/server/lib/libserver.so
/export/home/tuxedo/version/server/lib/libdb.so
/export/home/foobar/lib/libjpeg.so /export/home/foobar/lib/libini.so
/export/home/foobar/lib/libtiftools.so
/export/home/foobar/lib/libColorConvert.so
/export/home/foobar/lib/libJbig.so /export/home/foobar/lib/libzlib.so
/export/home/foobar/lib/libImageBase.so
/export/home/foobar/lib/libImageApply.so
/export/home/foobar/lib/libEpsMake.so
/export/home/foobar/lib/libbarcode.so
/export/home/foobar/lib/libOMCommon.so
/export/home/foobar/lib/libimagemanage.so -ltux -lbuft
-L${ORACLE_HOME}/lib ${ORACLE_HOME}/precomp/lib/cobsqlintf.o -lclntsh
-lm -lnsl -lsocket -lgen -ldl -lfml -lfml32 -lengine -R/usr/lib/lwp
-lpthread -lposix4 -lsocket -lnsl -lm -lnsl -lsocket
*** Error code 1
make: Fatal error: Command failed for target `all'