Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Jython start server script

Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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\'.

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\
Drive already SUBSTed
WASX7023E: Error creating "SOAP" connection to host "localhost"; exception infor
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\
"; exception information: 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
Posts: 4173
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
Brian Hennessy
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
    Bookmark Topic Watch Topic
  • New Topic