ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramasubbu, Hari" <Hari.Ramasu...@ap.bdi.gte.com>
Subject RE: run shell script to shutdown tomcat within telnet task
Date Fri, 02 Aug 2002 16:15:58 GMT

 <telnet userid="xxx" password="xxx" server="some IP adress"
timeout="120">

--timeout =120-- is the problem,increase it.
-----Original Message-----
From: Paula Winkler [mailto:paula.winkler@mueller.de]
Sent: Friday, August 02, 2002 6:27 AM
To: ant-user@jakarta.apache.org
Subject: run shell script to shutdown tomcat within telnet task


Hi there,

What I am trying to do is running a shell script within a telnet task in
order to shut down a Tomcat server.

How would I execute a script properly?


The following gives me no failure, but Tomcat is not shutting down...

<target name="tomcatshutdown" depends="properties" >

  <telnet userid="xxx" password="xxx" server="some IP adress"
timeout="120">
    <read string="Have a lot of fun..."/>
    <write>./opt/tomcat/bin/shutdown.sh</write>
    <read/>
  </telnet>

</target>


Also: I wanted to read out one line "Stop tomcat" before quitting telnet
task, so that I knew it was successfull, but that was not working
either.
(<read string="Stop tomcat"/>)

Then it gives me this but when I do it manually without ant this line
comes (with others, like using classpath etc.):



tomcatshutdown:
   [telnet] Welcome to SuSE Linux 7.3 (i386) - Kernel 2.4.10-4GB (5).
   [telnet]
   [telnet] server login:
   [telnet] xxx
   [telnet]  Password:
   [telnet]
   [telnet] Last login: Fri Aug  2 12:09:10 from 
   [telnet] Have a lot of fun...
   [telnet] ./opt/tomcat/bin/shutdown.sh

BUILD FAILED
file:/home/paula/work/projekte/mde/gui/build.xml:28: Response timed-out
waiting for "Stop tomcat"
        at
org.apache.tools.ant.taskdefs.optional.net.TelnetTask$AntTelnetClient.waitFo
rString(TelnetTask.java:344)
        at
org.apache.tools.ant.taskdefs.optional.net.TelnetTask$TelnetRead.execute(Tel
netTask.java:286)
        at
org.apache.tools.ant.taskdefs.optional.net.TelnetTask.execute(TelnetTask.jav
a:156)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

I appreciate any help!

By
paula

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message