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=23992>. 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=23992 sshexec gives cryptic message with very short timeout Summary: sshexec gives cryptic message with very short timeout Product: Ant Version: 1.6Beta Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: Documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When using the sshexec task with a very short timeout (like 10ms - see bug 23991 for a reason why someone might have such a short timeout), the sshexec task fails but gives a cryptic message with no indication that the timeout has been reached. e.g. [sshexec] Connecting to remotemachine:22 [sshexec] java.io.FileNotFoundException: C:\Documents and Settings\user\.ssh\known_hosts (The system cannot find the path specified) BUILD FAILED file:H:/Projects/Construction/deploy.xml:340: com.jcraft.jsch.JSchException: session is down This appears to be because taskdefs/optional/ssh/SSHExec.java, around line 180 has a line: session.setTimeout((int) maxwait); This means that by the time channel.connect() is called, the session's socket has been closed and the cryptic message is given rather than the more useful "Timeout period exceeded, connection dropped." message that would have been triggered further on. Perhaps a session.isConnected() call just before the channel.connect() in SSHExec.java and a suitable error message would catch the majority of these cases (it wouldn't help if it timed out during the channel.connect(), but still...). Perhaps a restriction on the minimum value for the timeout may help too. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]