Hi I have successfully written a jython script to stop a server on WAS studio 5.1.2 using the following wsadmin.bat -lang jythion -f 'C:\temp\myscript.py'.
However when I try to restart the same server using another jython script I get the following exception.
Z:\bin>wsadmin.bat -lang jython -f c:\temp\jythonscripts\test1.py Drive already SUBSTed WASX7023E: Error creating "SOAP" connection to host "localhost"; exception infor mation: com.ibm.websphere.management.exception.ConnectorNotAvailableException WASX7213I: This scripting client is not connected to a server process; please re fer to the log file C:\Program Files\IBM\WebSphere Studio\Application Developer\ v5.1.2\runtimes\base_v51\logs\wsadmin.traceout for additional information. WASX7017E: Exception received while running file "c:\temp\jythonscripts\test1.py "; exception information: com.ibm.ws.scripting.ScriptingException: WASX7254E: "s tartServer" action not supported when process type is "unknown"
Here is the jython module the parameters I pass in are server1,localhost the script runs okay when I want to run the stopserver method of the AdminControl class.
Has anyone come across this problem before ?
def stopserver(serverName, nodeName): global AdminConfig global AdminControl global AdminApp servermessage = 'Server started' AdminControl.startServer(serverName, nodeName) return servermessage
If I recall, wsadmin attempts to connect to the active server before running any commands so when the server is stopped, it has no connection to work with. I'm not sure the best way to get around this but I suggest specifying the parameters for the specific server and profile explicitly. There may be other command line arguments that prevent the script from trying to access the server directly that might work. [ December 13, 2005: Message edited by: Scott Selikoff ]
Thanks for the reply Scott I think you've hit the nail on the head. On webSphere Studio it needs an active server process running so when I stop the server it cannot connect to the 8880 soap port to execute the commands. i tried creating another server with different SOAP ports but that also starts up as server1 open for e-business not sure why this is possibly all servers created run under this process id server1???.
For what I intened the script to do will have to be tested on a WebSphere Application Server network deployment installation and run the wsadmin cmd from the deployment manager.
Thanks again for the quick response
Get me the mayor's office! I need to tell her about this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!