Q:总是tpinit出错,有什么需要特别注意的吗
A: zongyn,你说的没有问题,封装是可以的。你说的tpinit出错,应该跟配置有关系。你把ulog信息发上来,看后就知道错误在哪里?
一般tpinit错误,在于网络不通,另外就是你的client程序是否是WS方式编译的,如果是必须使用buildclient参数-w参数,另外设置WSNADDR环境变量。
你还是把ulog信息发上来看看。一般是不能连接WSH等信息。
Return Values Upon failure, tpinit() leaves the calling process in its original context, returns -1,
and sets tperrno to indicate the error condition. Also, tpurcode() is set to the value
returned by the AUTHSVR(5) server.
Errors Upon failure, tpinit() sets tperrno to one of the following values:
[TPEINVAL]
Invalid arguments were specified. tpinfo is non-NULL and does not point
to a typed buffer of type TPINIT.
[TPENOENT]
The client cannot join the application because of space limitations.
[TPEPERM]
The client cannot join the application because it does not have permission to
do so or because it has not supplied the correct application password.
Permission may be denied based on an invalid application password, failure
to pass application-specific authentication, or use of restricted names.
tpurcode() may be set by an application-specific authentication server to
explain why the client cannot join the application.
[TPEPROTO]
tpinit() has been called improperly. For example: (a) the caller is a server;
(b) the TPMULTICONTEXTS flag has been specified in single-context mode; or
(c) the TPMULTICONTEXTS flag has not been specified in multicontext mode.
[TPESYSTEM]
A BEA Tuxedo system error has occurred. The exact nature of the error is
written to a log file.
[TPEOS]
An operating system error has occurred.
Tpinit failed该如何处理?
log 文件如下
224552.NY!?proc.1468.860.0: 06-10-2002: Tuxedo Version 8.0 32-bit Windows.
224552.NY!?proc.1468.860.0: LIBWSC_CAT:1055: ERROR: Unable to establish WSL connection
224552.NY!?proc.1468.860.0: LIBWSC_CAT:1027: ERROR: Unable to connect to WSH
224552.NY!?proc.1468.860.0: LIBWSC_CAT:1020: ERROR: Unable to obtain authentication level
这个错误初学者很常见,而且摸不着头脑!呵呵。以前已经讨论N变了。再post again!
你看这个错误:Unable to establish WSL connection 和
LIBWSC_CAT:1027: ERROR: Unable to connect to WSH
应该是你的WSL不能连接到WSH。一个错误原因是你的WSNADDR配置的ip存在问题,导致不能找到WSH,另外一个就是网络不通,导致client不能连接到WSH的机器上。还有一个就是你的程序编译有问题:例如:你没有使用-w参数编译client,但是却是使用WSNADDR寻找服务,导致出现这样的错误。
--转自