|Summary:||recursive scp push may hang|
|Product:||Ant||Reporter:||thomas gentsch <tge>|
|Component:||Optional Tasks||Assignee:||Ant Notifications List <notifications>|
Description thomas gentsch 2007-11-19 01:29:59 UTC
I have tried to transfer a directory structure consisting of a few files and directories and after some items the transfer hangs. I have debugged this and identified the SSH/SCP protocol phase where it got stuck. I changed the code locally as in the attached patch, then it worked: --- ./ScpToMessage.java-orig 2006-12-13 13:16:19.000000000 +0100 +++ ./ScpToMessage.java 2007-11-15 15:39:14.000000000 +0100 @@ -209,6 +209,7 @@ waitForAck(in); sendDirectory(directory, in, out); out.write("E\n".getBytes()); + out.flush(); waitForAck(in); }
Comment 1 Anthony Bargnesi 2007-12-29 16:40:00 UTC
I have quite easily run into this bug in the same scenario that thomas did. A bug like this is disastrous because if you do not have verbose turned on you will not see any file transfers at all, you will just see "Connecting to 'host'". By building ant-jsch.jar in the manner thomas outlined, I was able to fix this.
Comment 2 Andreas Hartmann 2008-01-23 04:26:12 UTC
I had the same problem, and Thomas' patch fixed it for me.
Comment 3 Peter Reilly 2008-01-23 06:08:13 UTC
Thanks for the update. I have checked the code, and the current svn trunk and 1.7.1 branch has the fix. Ant 1.7.1 should be ready soon....