when I increase timeout e.g. to 300 Tomcat isn't shutting down either.
when I do it manually on the server this amount of time is sufficient.
Can somebody tell me if
<write>./shutdown.sh</write>
is the correct syntax to execute the shell script?
<read timeout="300">Stop tomcat</read>
is the correct syntax to read some response from the server if the
shutting down is done?
"Ramasubbu, Hari" schrieb:
>
> <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.wa
> itFo
> 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>
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|