This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebSphere Server is not in Running State :Jython WebSphere Scripting

 
Kray Var
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find teh below code.

svr = AdminControl.completeObjectName("type=Server,*").split("\n")
print "len -- >",len(svr)
for s in svr:
print "servers are ",s

When i execute the above code ,the output doesnt show the server for which I am trying to find the running status.The output shows only server1 server though my server is running and I am able to open the apps.

But when I list the servers using the below code I find all the servers and the one which i am intersted in

servers = AdminConfig.list('Server', node).split("\n")
for server in servers:
servername = AdminConfig.showAttribute(server, 'name')
print "server name is -- ",servername

Why is this happening .
We normally start the server by the startserver.sh files and hnce tryng to automate that.The server for which I am tryng to find the status , is Running and hence I am able to open the Apps .

Any help on this ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic