简体   繁体   中英

How to use wsadmin to stop web server in WAS?

Please see the screenshot here: https://developer.ibm.com/answers/questions/381046/how-to-restart-was-web-server.html

Code 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)

Code 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

更改此行:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM