如何使用wsadmin在WAS中停止Web服务器?

时间:2017-06-13 15:16:13

标签: webserver websphere wsadmin

请在此处查看截图: https://developer.ibm.com/answers/questions/381046/how-to-restart-was-web-server.html

代码1

print AdminConfig.list('WebServer')

================================================================================
/usr/was8/profiles/dmgr/bin/wsadmin.sh -lang jython -conntype SOAP -host localhost -port 8879 -user pubc0ucdw -password **** -f /apps/ubc0/rcl0/agent/var/work/UBC0_Manage_Server/./temp4999862412045425495.py
WASX7209I: Connected to process "dmgr" on node uauswad02Manager using SOAP connector;  The type of process is: DeploymentManager
webserver(cells/uauswad02Cell/nodes/uauswad02IHS/servers/webserver|server.xml#WebServer_1334774039656)

代码2

set cell_name uauswad02Cell
set node_name uauswad02IHS
set web_server_name webserver

set ws [$AdminControl queryNames WebSphere:type=WebServer,cell=$cell_name,*]
$AdminControl invoke $ws stop { $cell_name $node_name $web_server_name} 

================================================================================
/usr/was8/profiles/dmgr/bin/wsadmin.sh -lang jacl -conntype SOAP -host localhost -port 8879 -user pubc0ucdw -password **** -f /apps/ubc0/rcl0/agent/var/work/UBC0_EAI_WebShpere/./temp7173819320641687429.jacl
WASX7209I: Connected to process "dmgr" on node uauswad02Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7017E: Exception received while running file "/apps/ubc0/rcl0/agent/var/work/UBC0_EAI_WebShpere/./temp7173819320641687429.jacl"; exception information: javax.management.MBeanException
com.ibm.ws.management.webserver.ConfigurationException: Server not found --- Server not found

1 个答案:

答案 0 :(得分:0)

更改此行:

$AdminControl invoke $ws stop [list $cell_name $node_name $web_server_name]