【问题标题】:wsadmin script timing out when executing against DMGR via SOAP通过 SOAP 对 DMGR 执行时 wsadmin 脚本超时
【发布时间】:2016-06-30 03:06:08
【问题描述】:

自 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 文档的模糊性。是否有增加超时等待时间的选项,或者将其关闭,或者是否有更好的连接类型?

同样在 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


【解决方案1】:

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

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

【讨论】:

  • 我更正了拼写,但仍然有超时。但是,我可以在命令行参数中添加选项-javaoption "-Dcom.ibm.SOAP.requestTimeout=0",还是必须在配置文件中?
【解决方案2】:

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

【讨论】:

  • 我更正了拼写,但仍然有超时。但是,我可以在命令行参数中添加选项-javaoption "-Dcom.ibm.SOAP.requestTimeout=0",还是必须在配置文件中?
【解决方案3】:

你去 - 我有同样的问题。我想暂时覆盖超时道具。这就像一个冠军。确保您完全按照以下步骤操作。我犯了一些错误,道具没有通过,我想通了,它可以工作。

从/properties 复制soap.client.props 文件并为其命名,例如mysoap.client.props。 编辑 mysoap.client.props 并根据需要更新 com.ibm.SOAP.requestTimeout 的值 创建一个新的 Java 属性文件 soap_override.props 并输入以下行: com.ibm.SOAP.ConfigURL=file:/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

【讨论】:

    猜你喜欢
    • 2019-05-12
    • 2011-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多