Two Laptop Bag
The moose likes Ant, Maven and Other Build Tools and the fly likes Stopping WAS using Ant tasks Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Stopping WAS using Ant tasks" Watch "Stopping WAS using Ant tasks" New topic
Author

Stopping WAS using Ant tasks

Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
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
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1348
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
Cesar Orosco Pacora
Greenhorn

Joined: Dec 30, 2009
Posts: 1
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.






Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Thanks Cesar and Welcome to Javaranch!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stopping WAS using Ant tasks
 
Similar Threads
WsAnt task -- Please specify a different location with -tracefile option.
Ant SshExec task throwing JschException : Auth fail
Ant error on trying to run an taskdef
[WEBSPHERE][MIGRATION] migrate-user-groups-ac error!
WAS 7 Please specify a different location with -tracefile option.