通过 SOAP 对 DMGR 执行时 wsadmin 脚本超时

问题描述 投票:0回答:4

我正在尝试通过 wsadmin 控制台在单个 JVM 上启动和停止应用程序,因为 IBM BPM PS Adv 的 Web UI 已启动。不允许进行这种操作。所以,我有以下脚本:

https://gist.github.com/predatorian3/b8661c949617727630152cbe04f78d7e

当我从 Cell Host 对 DMGR 运行它时,我收到以下错误。

[wasadmin@server01 ~]$ cat /usr/local/bin/Run_wsadmin.sh
#!/bin/bash
#
#
#

/opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -lang jython -user serviceAccount -password password $*

[wasadmin@cessoapscrt00 ~]$ time Run_wsadmin.sh -f /opt/IBM/wsadmin/wsadmin_Restart_Application.py WPS00 CRT00WPS01 redirectResource_war
WASX7209I: Connected to process "dmgr" on node CRTDMGR using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[WPS00, CRT00WPS01, redirectResource_war]"
WASX7017E: Exception received while running file "/opt/IBM/wsadmin/wsadmin_Restart_Application.py"; exception information: com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]


real    3m21.275s
user    0m17.411s
sys     0m0.796s

因此,我没有指定连接类型,而是使用默认连接类型,即 SOAP。然而,在阅读其他连接类型后,它们似乎都没有更好,但我将其归因于 IBM 文档的模糊性。是否可以选择增加超时等待时间或将其关闭,或者是否有更好的连接类型?

也直接在 wsadmin 控制台上运行它,似乎它在收集应用程序管理器字符串时挂起。

[wasadmin@server01 ~]$ Run_wsadmin.sh
WASX7209I: Connected to process "dmgr" on node CRTDMGR using SOAP connector;  The type of process is: DeploymentManager WASX7031I: For help, enter: "print Help.help()"
wsadmin>appManager = AdminControl.queryNames('cell=CRTCELL,node=WPS00,type=ApplicatoinManager,process=CRT00WPS01,*')
WASX7015E: Exception running command: "appManager = AdminControl.queryNames('cell=CRTCELL,node=WPS00,type=ApplicationManager,process=CRT00WPS01,*')"; exception information:
 com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]

wsadmin>
soap websphere business-process-management wsadmin
4个回答
0
投票

您可以在 {profile}/properties/soap.client.props

中增加超时值
com.ibm.SOAP.requestTimeout=180

0
投票

如果想关闭超时,修改com.ibm.SOAP.requestTimeout=0 或者,如果您想要更长的超时时间,可以将值 180 修改为其他值。 另外关于您的查询命令,我注意到您的 MBean 类型有一个拼写错误,您有 type=ApplicatoinManager,它应该是 type=ApplicationManager


0
投票

你去吧——我也遇到了同样的问题。我想暂时覆盖超时道具。这就像冠军一样。确保您完全按照以下步骤操作。我犯了一些错误,道具没有通过,我发现并且它有效。

从/properties 复制soap.client.props 文件并为其指定一个新名称,例如mysoap.client.props。 编辑 mysoap.client.props 并根据需要更新 com.ibm.SOAP.requestTimeout 的值 创建一个新的 Java 属性文件soap_override.props 并输入以下行: com.ibm.SOAP.ConfigURL=文件:/mysoap.client.props 使用 -p 选项将soap_override.props传递到wsadmin:wsadmin -psoap_override.props...

参考: https://www.ibm.com/developerworks/community/blogs/timdp/entry/avoiding_wsadmin_request_timeouts_the_neat_way32?lang=en


0
投票

我觉得我的问题不是连接,而是超时。我尝试将 com.ibm.SOAP.requestTimeout 的配置更改为 0,然后它一直保持连接,没有任何断开的迹象。

© www.soinside.com 2019 - 2024. All rights reserved.