ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23992] New: - sshexec gives cryptic message with very short timeout
Date Wed, 22 Oct 2003 07:20:25 GMT
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: dev@ant.apache.org
        ReportedBy: Edwin_STEELE@rta.nsw.gov.au


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message