0
votes

I Had server.bat file to run server.py file through wsadmin. It's an existed file/code and didnt have much knowledge in either python and WAS server.

I used to run by - %BIN-DIR% wsadmin -lang jython username %USER% password %pass% %ENV% %PROP_FILE%> %SYS_LOG_FILE%

%BIN-DIR% refers the IBM/AppServer/Profile/Dev_dmgr_node/bin

When i run with a missed parameter, the server.py had a check condition so it displays "Parameters missing". But when i gave all the required parameter, the .bat just run and close diplaying nothing, even the PRINT i added in the first line for debugging purpose(which shows on missing parameter).

Could any one suggest why the file is not showing anything while running through wsadmin, im suppose to debug the server.py without any tool. If anyone suggest about below it is very great to me, *what are the parameters required and where i can change the i/p parameter if it is user defined *how Websphere Application server executes i/p .PY file * why/how i shouldn't able to debugg

Note: The main theme of the server.py file is to take the sver/node details of application through Console using the DMGR access.

1

1 Answers

0
votes

what does the file look like? (server.py)? and server.bat? for example I do this in a bat file:

set WAS_HOME=D:\IBM\WEBSPHERE\APPSERVER CD D:\TEMP\SCRIPTS\DEVTEST D: %WAS_HOME%\bin\wsdamin.bat -username wasadmin -password mypasswordofcourse -f checkbus.py

and my checkbus.py is the one you can download from IBM. it looks like this:

execfile('wsadminlib.py')

serverStatus()

print ('MESSAGING ENGINES:')
busname = 'intjmsbusin'
scope = 'cluster'
nodename = None
servername = None
clusternum = '000'

for clustername in ['CLUSTER2']:
    if isMeStarted(busname, scope, nodename, servername, clustername, clusternum) == True:
        print "\t%-18s %-15s" % (clustername,'running')
    else:
        print "\t%-18s %-15s" % (clustername,'stopped')

busname = 'intjmsbusout'

for clustername in ['CLUSTER1']:
    if isMeStarted(busname, scope, nodename, servername, clustername, clusternum) == True:
        print "\t%-18s %-15s" % (clustername,'running')
    else:
        print "\t%-18s %-15s" % (clustername,'stopped')