Server Not Found Exception in wsadmin

938 views Asked by At

I have a jython script to create a server, deploy and application and then start the server.

But I am geeting the following exception while running it.

WASX7017E: Exception received while running file "myfile.py"; exception information: javax.management.MBeanException[[ com.ibm.websphere.management.exception.AdminException: Server, SERVERNAME, not found.

Here is the entire code... http://snipt.org/BMaf4

Update: He is the entire log http://snipt.org/BNZ1

Can't figure out where I am going wrong.

But When I am issuing a start all servers in wsadminlib.. the server gets started

2

There are 2 answers

0
Debajyoti Das On BEST ANSWER

After the server configurations...

#Sync the Nodes
Sync1 = AdminControl.completeObjectName( "type=NodeSync,node="+ NODE_NAME +",*")
print "Getting Sync Info.. " + "\n" + Sync1
AdminControl.invoke(Sync1, 'sync')
print NODE_NAME + " Sync Completed.. "

We have to sync the nodes first before trying to start the server.

0
Anton N On

The problem might be in the way how you deploying and/or configuring your application.

# Your script sample
# Deploy the WAR
APP_PATH= APP_HOME + '/MYAPP/CycleWAR/war/MYAPPCycle.war'
ARGS_LIST='.....'

AdminApp.install(APP_PATH, ARGS_LIST)

You need to add another parameter into your arguments list ARGS_LIST : args = "[-server " + SERVER_NAME + "]"

# Since 6.0.X version
# Server Deployment
args = "[-server " + serverName + "]"

# Cluster Deployment
# args = "[-cluster " + clusterName + "]"
AdminApp.install(applicationFilePath, args)