Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 92088 invoked from network); 30 Jan 2004 00:52:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Jan 2004 00:52:54 -0000 Received: (qmail 76959 invoked by uid 500); 30 Jan 2004 00:52:18 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 76911 invoked by uid 500); 30 Jan 2004 00:52:18 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 76850 invoked from network); 30 Jan 2004 00:52:17 -0000 Received: from unknown (HELO ext-nj2gw-2.online-age.net) (216.35.73.164) by daedalus.apache.org with SMTP; 30 Jan 2004 00:52:17 -0000 Received: from int-nj2gw-1.online-age.net (int-nj2gw-1 [3.159.236.65]) by ext-nj2gw-2.online-age.net (8.12.9/8.12.9/990426-RLH) with ESMTP id i0U0qNKO014338 for ; Thu, 29 Jan 2004 19:52:24 -0500 (EST) Received: from ncwlmx01nege.wilm.ge.com (localhost [127.0.0.1]) by int-nj2gw-1.online-age.net (8.12.9/8.12.8/990426-RLH) with ESMTP id i0U0qMJr000697 for ; Thu, 29 Jan 2004 19:52:23 -0500 (EST) Received: by ncwlmx01nege.wilm.ge.com with Internet Mail Service (5.5.2653.19) id ; Thu, 29 Jan 2004 19:52:14 -0500 Message-ID: <42C9EFEA1737D511BA420008C78641510CA4A6DA@ncwlmx01nege.wilm.ge.com> From: "Conelly, Luis (PS, GNF, Contractor)" To: Ant Users List Subject: RE: Telnet Task Issue [problem solved] Date: Thu, 29 Jan 2004 19:52:09 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3E6CB.4A5F8C52" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C3E6CB.4A5F8C52 Content-Type: text/plain; charset="iso-8859-1" Patrick & all This is what I did to get this done: 1. Following Patrick's advice, I ran the commands manually and capture the output 2. Set several properties with the values expected 3. Update the target with: ogin: ${user.id} assword: ${user.pwd} ${prompt} ${script} ${prompt} exit The [timeout] attribute it is pretty usefull to know which element is falling (read / write) Appreciate your advice & time. Regards Luis -----Original Message----- From: CONANT,PATRICK (HP-FtCollins,ex1) [mailto:patrick.conant@hp.com] Sent: Thursday, January 29, 2004 6:13 PM To: 'Ant Users List' Subject: RE: Telnet Task Issue Actually, no patch needed -- it looks like the additional logging is already available in CVS. --p. -----Original Message----- From: CONANT,PATRICK (HP-FtCollins,ex1) Sent: Thursday, January 29, 2004 5:09 PM To: 'Ant Users List' Subject: RE: Telnet Task Issue I'd recommend running the commands manually over a telnet session to the server. Capture the response from the server, and use that in your elements. In addition, you can add a timeout attribute to the read element to cause the build to fail if you don't get the output you expected. If you still have trouble, post the updated telnet task and all the nested read/write elements. I've noted that when the telnet task does timeout, it does not log what it has read so far. This makes debugging the telnet sessions difficult. I'll submit a patch for this soon. --p. -----Original Message----- From: Conelly, Luis (PS, GNF, Contractor) [mailto:Luis.Conelly@gnf.com] Sent: Thursday, January 29, 2004 4:28 PM To: Ant Users List Subject: RE: Telnet Task Issue Patrick & all, Thanks for the quick prompt. I tried to do what you mentioned [this is, change the element for "blahblahblah"]; however, the task gets hang forever. I do not know if this is due to my OS or what... I'll keep looking, but any help is greatly appreciated. Regards -Luis -----Original Message----- From: CONANT,PATRICK (HP-FtCollins,ex1) [mailto:patrick.conant@hp.com] Sent: Thursday, January 29, 2004 5:18 PM To: 'Ant Users List' Subject: RE: Telnet Task Issue You might try reading something back to prevent the telnet connection from being closed before the commands are received by the remote system. Try replacing your "" elements with "blahblahblah" where "blahblahblah" is what you expect to be sent from the telnet server to the client after each command is executed (e.g. a command prompt or the output of the previous command). --p. -----Original Message----- From: Conelly, Luis (PS, GNF, Contractor) [mailto:Luis.Conelly@gnf.com] Sent: Thursday, January 29, 2004 3:56 PM To: user@ant.apache.org Subject: Telnet Task Issue Hi all, I am having an issue with task. I am trying to execute a simple script via ant to a *nix server [Red Hat Linux release 7.2 (Enigma)] This is the snippet of the script: sh /scripts/k2kftp.sh exit And the output looks like: Buildfile: telnet_tools.xml callScript: [telnet] Red Hat Linux release 7.2 (Enigma) [telnet] Kernel 2.4.7-10 on an i686 [telnet] login: [telnet] xxxxxx [telnet] Password: [telnet] sh /scripts/k2kftp.sh [telnet] exit BUILD SUCCESSFUL Total time: 1 second However, the script does not get executed. I have tried to execute simpler [such as ls], but it doesn't get a thing. Does anybody has an idea about why is this happening? Regards -Luis Settings: Workstation OS: Win2K Pro Ant: 1.6beta2 JDK: 1.4.1_02 Server OS: Red Hat Linux release 7.2 (Enigma) --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ------_=_NextPart_001_01C3E6CB.4A5F8C52--