wsadmin脚本在通过SOAP

时间:2016-06-30 03:06:08

标签: soap websphere bpm wsadmin

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

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。但是,在reading about the other Connection Types时,它们似乎都没有更好,但我将其归因于IBM Documentation的模糊性。是否可以选择增加超时等待时间,或将其关闭,还是有更好的连接类型?

另外直接在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>

3 个答案:

答案 0 :(得分:0)

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

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

答案 1 :(得分:0)

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

答案 2 :(得分: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 -p soap_override.props ...

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