• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Stopping WAS using Ant tasks

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am hoping someone can point me in the right direction. I am attempting to stop the WAS using ANT. I am using the ws ant tasks provided in the wsanttasks.jar. When I run the script, I get this output:

stopServers:
[echo] stopping server...
[stopServer] Executing '/opt/WebSphere/AppServer/java/jre/bin/java' with arguments:
[stopServer] '-Djavax.net.ssl.trustStore=/opt/WebSphere/AppServer/etc/DummyClientTrustFile.jks'
[stopServer] '-Djavax.net.ssl.keyStore=/opt/WebSphere/AppServer/etc/DummyClientKeyFile.jks'
[stopServer] '-Djavax.net.ssl.trustStorePassword=WebAS'
[stopServer] '-Djavax.net.ssl.keyStorePassword=WebAS'
[stopServer] '-Dws.output.encoding=console'
[stopServer] '-Dcom.ibm.CORBA.ConfigURL=file:/opt/WebSphere/AppServer//properties/sas.client.props'
[stopServer] '-Dcom.ibm.SOAP.ConfigURL=file:/opt/WebSphere/AppServer//properties/soap.client.props'
[stopServer] '-Dwebsphere.lib.dir=/opt/WebSphere/AppServer/lib'
[stopServer] '-Dws.ext.dirs=/opt/WebSphere/AppServer/java/lib:/opt/WebSphere/AppServer//classes:/opt/WebSphere/AppServer//lib:/opt/W
ebSphere/AppServer//lib/ext:/opt/WebSphere/AppServer//web/help:/opt/WebSphere/AppServer//deploytool/itp/plugins/com.ibm.etools.ejbde
ploy/runtime'
[stopServer] '-Dwas.install.root=/opt/WebSphere/AppServer'
[stopServer] '-Dwas.node.name=ETDev2'
[stopServer] '-Dwas.cell.name=ETDEV1Network'
[stopServer] '-Dwas.repository.root=/opt/WebSphere/AppServer//config'
[stopServer] '-Xmx256M'
[stopServer] '-classpath'
[stopServer] '/opt/WebSphere/AppServer/properties:/opt/WebSphere/AppServer/lib/bootstrap.jar:/opt/WebSphere/AppServer/lib/j2ee.jar:/
opt/WebSphere/AppServer/lib/lmproxy.jar:/opt/WebSphere/AppServer/lib/urlprotocols.jar'
[stopServer] 'com.ibm.ws.bootstrap.WSLauncher'
[stopServer] 'com.ibm.ws.management.tools.WsServerStop'
[stopServer] '/opt/WebSphere/AppServer//config'
[stopServer] 'ETDEV1Network'
[stopServer] 'ETDev2'
[stopServer] 'PROJECTtNAME'
[stopServer] '-trace'
[stopServer] '-timeout'
[stopServer] '120'
[stopServer] '-logfile'
[stopServer] '/export/home/rray/project_stop_server_log'
[stopServer] '-replacelog'
[stopServer] '-username'
[stopServer] 'meadmin'
[stopServer] '-password'
[stopServer] 'me1234'
[stopServer] '-conntype'
[stopServer] 'RMI'
[stopServer] '-port'
[stopServer] '9090'
[stopServer]
[stopServer] The ' characters around the executable and arguments are
[stopServer] not part of the command.
[stopServer] ADMU0115I: Trace mode is on.
[stopServer] ADMU0116I: Tool information is being logged in file
[stopServer] /export/home/rray/project_stop_server_log
[stopServer] ADMU3101I: Using explicit host and port localhost:9090 for server: PROJECTNAME
[stopServer] com.ibm.rmi.ras.Utility.newWriter: could not write to orbtrc.01042005.1352.23.txt : java.io.FileNotFoundException: /opt
/WebSphere/AppServer/bin/orbtrc.01042005.1352.23.txt (Permission denied)
[stopServer] ADMU0509I: The server "ETIMS" cannot be reached. It appears to be stopped.
[stopServer] ADMU0211I: Error details may be seen in the file:
[stopServer] /export/home/rray/project_stop_server_log



BUILD FAILED
/export/home/rray/wasServerDeploy.xml:129: Java returned: -10
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:80)
at com.ibm.websphere.ant.tasks.ServerControl.execute(ServerControl.java:211)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)

Total time: 5 seconds

When I go look as WAS using the ws_admin console, I see the server is still running.

Thanks in advance,

Russ
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you're (one of) the expert(s) on WAS and ant around here.

Did you investigate these errors?

[stopServer] com.ibm.rmi.ras.Utility.newWriter: could not write to orbtrc.01042005.1352.23.txt : java.io.FileNotFoundException: /opt
/WebSphere/AppServer/bin/orbtrc.01042005.1352.23.txt (Permission denied)
[stopServer] ADMU0509I: The server "ETIMS" cannot be reached. It appears to be stopped.
[stopServer] ADMU0211I: Error details may be seen in the file:
[stopServer] /export/home/rray/project_stop_server_log
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stopping WAS using Ant Tasks with Security Enabled.

I hope this will help someone.

I'd WebSphere with security enabled, the most examples that I found for stop an App with Ant over Websphere doesn't work. After long time I found this solution.

<target name="stopApp">
<wsStopApp wasHome="${ws.home.dir}" application="${remoteAppName}" server="${remoteServerName}"
conntype="SOAP" host="${remoteHostName}" port="8880" user="${remoteUserId}"
properties="C:/properties.txt"
password="${remotePassword}" node="${nodeName}" />
</target>

My properties.txt file.

com.ibm.SOAP.ConfigURL=file:C:/WAS/AppServer/profiles/AppSrv01/properties/soap.client.props
was.install.root=C:\WAS\AppServer
com.ibm.ws.scripting.validationOutput=C:/WAS/AppServer/profiles/AppSrv01/logs/wsadmin.valout

Replace with the correct values.






 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Cesar and Welcome to Javaranch!
 
Crusading Chameleon likes the size of this ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic