2016-06-30 180 views
0

由于IBM BPM PS Adv的Web UI,我试图通过wsadmin控制台在单个JVM上启动和停止应用程序。不允许进行这种操作。所以,我有以下脚本:wsadmin脚本在通过SOAP对DMGR执行时超时

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

,当我运行它免受来自细胞宿主的DMGR,我收到以下错误。

[[email protected] ~]$ cat /usr/local/bin/Run_wsadmin.sh 
#!/bin/bash 
# 
# 
# 

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

[[email protected] ~]$ 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控制台上运行它,它似乎挂起收集应用程序管理器字符串。

[[email protected] ~]$ 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> 
+0

是否确定单元,节点,服务器名称是正确的?那个节点和服务器正在运行? – Gas

+0

是的,当我搜索他们确实出现的过程时。该脚本一直在运行,直到安装了某个应用程序。 – Pred

回答

0

可以在{}轮廓增加超时值/properties/soap.client.props

com.ibm.SOAP.requestTimeout=180 
+0

我更正了我的拼写,但仍然超时。但是,我可以在命令行参数中添加选项“-javaoption”-Dcom.ibm.SOAP.requestTimeout = 0“'还是必须在配置文件中? – Pred

0

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

+0

我改正了我的拼写,但仍然超时。但是,我可以在命令行参数中添加选项“-javaoption”-Dcom.ibm.SOAP.requestTimeout = 0“'还是必须在配置文件中? – Pred

0

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

复制/属性中的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 通soap_override.props到的wsadmin使用-p选项:-p的wsadmin ... soap_override.props

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