commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Núñez <josel...@compuarte.net.mx>
Subject vfs sftp fails restablishing the connection after sftp server restart service
Date Sat, 28 Oct 2006 19:10:40 GMT
I am developing an application for monitoring a local folder, when a file
was changed or added this is transfered to another box via sftp or ftp

Monitoring routines of vfs works fine, ftp also, sftp while the other box is
alive has not problem, but if the other box is down when monitor trigger the
event after remote box is restablished all subsecuent transfers abort with
error.

If instead of sftp we did the same process with ftp, vfs restablish the
connection succesfuly


Any idea?


 
SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts,"no"
);
            SftpFileSystemConfigBuilder.getInstance().setTimeout(opts,1000);
            manager = VFS.getManager();

		quearchivo = fileobject.getURL().toString();

		fileobject = manager.resolveFile(fileobjectStringURL,opts);

		if (fileobject.exists()){  <--- Here throws error
		...



...	
	Caused by: com.jcraft.jsch.JSchException: session is down
        at com.jcraft.jsch.Session.openChannel(Session.java:641)
        at
org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSyste
m.java:121)



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message