WebSphere Server not working: Jython WebSphere Scripting?

Please find the code below

runningServer1 = AdminControl.completeObjectName("type=Server,node=nodename,process=processname,*")
print "server running --->",runningServer1
if len(runningServer1) == 0:

    print "Error: Server not running...",process_name

The conclusion is that

"Error: the server is not working ..."

although my server is running and I can run the application. And also the runServer1 variable is not printed, why can't I get an object for the server?

Learn more about my question I posted on the IBM forums below.

https://www.ibm.com/developerworks/forums/thread.jspa?threadID=374216

+3
source share
1 answer

bkail is on the right track. You must make sure the search bar is correct. Using:

print AdminControl.queryNames('type=Server,*')

in the wsadmin.sh interactive session to display all running servers in your cell. Then use:

'type=Server,name=JVM_NAME,*'

. JVM_NAME .

, AdminControl.completeObjectName. , , , , :

completeObjectName ObjectName, . . ObjectName. MBeans, , .

, IBM WAS_ROOT/scriptLibraries/servers/V70/AdminServerManagement.py( 814-815):

runningServer = AdminControl.queryNames("type=Server,node="+nodeName+",name="+serverName+",*")
if (len(runningServer) > 0 and AdminControl.getAttribute(runningServer, "state") == "STARTED"):
    ...

, AdminControl.queryNames . , len (runningServer). , IBM , AdminControl.getAttribute(runningServer, "state" ). "".

+1

All Articles