Java服务中调用命令 java调用tuxedo服务_重启

最近碰见了两个Tuxedo的问题,好久没有接触,有些生疏,记录于此。

案例1

一个Tuxedo Client,通过WSL方式调用Tuxedo Server,从应用现象看,调用不同,没有任何返回。

ULOG记录,

111920.v490h5!?proc.7625.1.0: LIBWSC_CAT:1037: ERROR: Network message receive failure
111920.v490h5!?proc.7625.1.0: LIBWSC_CAT:1059: ERROR: WSL returns error on connection request
111920.v490h5!?proc.7625.1.0: LIBWSC_CAT:1055: ERROR: Unable to establish WSL connection
111920.v490h5!?proc.7625.1.0: LIBWSC_CAT:1027: ERROR: Unable to connect to WSH
111920.v490h5!?proc.7625.1.0: LIBWSC_CAT:1020: ERROR: Unable to obtain authentication level

看下WSL配置,

-A -- -n //x.x.x.x:11141 -m 30 -x 5 :

对于Tuxedo Client调用Tuxedo Server来说,Client首先连接的是WSL监听进程,然后通过WSH进程,进行交互通信。

上述WSL配置,参数介绍如下,

-m,表示最少启动多少个WSH进程-M,表示最多启动多少个WSH进程,默认值为MAXWSCLIENTS/m,MAXWSCLIENTS是ubb中MACHINE节的配置,表示最多可以有多少个远程客户端同时连接

-x,表示每个WSH进程可同时处理多少个远程客户端

这几个参数可以不配置,会有相应默认值,

-m number
The minimum number of handlers that should be booted and always available. The default is 0.
-M number
The maximum number of handlers that can be booted. The default is the value of MAXWSCLIENTS for the machine being configured, divided by the multiplexing value (specified with -x)
-x number
The maximum number of clients that a WSH can multiplex at one time. The value must be greater than 0. The default is 10.

注意到上面配置,没有指定WSH使用的端口范围,如下所示,如果未指定-p和-P,则有相应默认值,

-p minwshport and –P maxwshport

The range for port numbers available for use by WSHs associated with this listener server. Port numbers must fall in the range between 0 and 65535. The default is 2048 for minwshport and 65535 for maxwshport.

可实际上,只开通了这台机器11141,以及11142端口的访问策略,其他端口均不通。

本想改为这样,但实际不支持-p和-P相同,

-A -- -n //x.x.x.x:11141 -p 11142 -P 11142 -m 2 -x 5

因此改为,

-A -- -n //x.x.x.x:11141 -p 11142 -P 11143 -m 2 -x 5

再次重启,提示了新的错误,

WSNAT_CAT:1079: ERROR: Error starting minimum number of handlers

注意配置-m表示最少启动多少个WSH进程,此处-p和-P实际只启动了两个端口,不可能支持最小30,将-m 30改为-m 2,再次重启,此时应用有能处理的请求,有不能处理的请求了,对于不能处理的请求,相应ULOG中记录了,

104542.t52a-zc-tux!WSH.16573.1.0: WSNAT_CAT:1030: INFO: Work Station Handler joining application
104542.t52a-zc-tux!WSH.16573.1.0: WSNAT_CAT:1221: ERROR: Could not establish listening address 0x00022b860add8207
WSNAT_CAT:1083: ERROR: Error assigning connection request, can't create any more handlers

怀疑原因是有些请求,访问到了11143端口,这个端口没有开策略,因此拒绝访问,有些请求,访问到了11142端口,可以访问,因此可以处理。

方法就是指定-p和-P,并且开启相应的端口策略。

案例2

两个Tuxedo应用域互访,中间有网关接口。以前一直可用,某天无法访问了,提示现象很怪,有的服务请求,报错TPNOENTRY,找不到服务错误,

000005.t52a-zc-tux!GWOSITP.22762.1.0: LIBGW_CAT:1023: ERROR: Service request from remote site failed:"TPENOEN
T - no entry found" gwerrno(100000)

有的服务请求,报错STPSVCFAIL,服务异常错误,

TPCALL XXX FAILED
ERROR CODE 11 -TPESVCFAIL - application level service failure

比对配置、单独重启出错的服务,试了各种方法,都不好使。

直至使用了“重启大法”,重启Tuxedo服务域所有的服务,tmboot -y,此时可以调通,真是万能大法。

但是有一点线索,就是重启之前,曾经尝试telnet服务域监听端口5555,不通,大重启后,此时telnet通了,因此怀疑,可能是网络连接已经断了,但从应用端未有感知,因此ULOG中没有任何记录,出现了这种诡异的现象,所以现在来看,有时候重启大法,真的有用,但是要知道原理,才会更加有用。