DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26632>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26632 rexec hangs ------- Additional Comments From [EMAIL PROTECTED] 2004-02-13 15:49 ------- think I've worked out what's going on here. Ant's rexec task tries to login using this code : /** * Process a 'typical' login. If it differs, use the read * and write tasks explicitely */ private void login() { if (addCarriageReturn) { rexec.sendString("\n", true); } rexec.waitForString("ogin:"); rexec.sendString(userid, true); rexec.waitForString("assword:"); rexec.sendString(password, false); } It is expecting the username and password prompts to be 'Login' & 'Password'. I am running REXECD/NT from denicomp.com on a win2k server as win2k doesn't ship with a RexecD service. Its rexec login is in this format Name (a.machine.com:auser): myusername Password (a.machine.com:auser): mypassword So this is what's causing the hang. To solve this I believe we need to explicitly use <read> & <writes> within our <rexec> task (as per the javadoc comments). One point I might make is that the rexecClient provided by commons-net logs on in the following independant manner _output_.write(username.getBytes()); _output_.write('\0'); _output_.write(password.getBytes()); _output_.write('\0'); _output_.write(command.getBytes()); _output_.write('\0'); _output_.flush(); I've used the example in net-commons : /net-commons/src/java/examples/rexec.java successfully with my rexecD on a win2k server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]