commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Resolved] (NET-572) Delay of around 5-6 seconds during SFTP Client file transfer using "storeFile" method of SFTP Client
Date Wed, 08 Feb 2017 00:21:41 GMT


Sebb resolved NET-572.
    Resolution: Cannot Reproduce

If this is still occurring with 3.5 please re-open with a suitable test case

> Delay of around 5-6 seconds during SFTP Client file transfer using "storeFile" method
of SFTP Client
> ----------------------------------------------------------------------------------------------------
>                 Key: NET-572
>                 URL:
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>         Environment: Solaris 10
>            Reporter: Sudipta Panda
> For transffering files over SFTP channel the below code snippet is being used - 
> ---------------------------------------------------------------------------------------------
>       File lLocalFile = new File(pLocalFilename);
>       FileInputStream ip = new FileInputStream(lLocalFile);
>       boolean lResult = ftp.storeFile(pRemoteFilename, ip);
>       ip.close(); 
> ---------------------------------------------------------------------------------------------
> As per the code, The new SFTP channel is being established and then after around 2-3
mins, when trying to transfer a file from local to remote we can observed that the "storeFile"
method is taking around 5-6 seconds to respond, and after that the lResult output is being
received as "0" from the storeFile() method and the file transfer is getting failed. 
> There is a timer for checking the FTP channels/FTP clients by "NOOP" operation command
in every 1 second.
> But by closing and re-establishing the SFTP connection, then within a second the same
file is getting transferred successfully. But again the same problem happened on the same
connection after just 2-3 mins.
> There is another thread in the code part where from the same remote the code is reading
and transferring file to local system by polling every 1 seconds successfully using SFTP connection.
the code part for reading files - 
> File lLocalFile = new File(pLocalFilename);
>         FileOutputStream op = null;
>         try {
>         	op = new FileOutputStream(lLocalFile);
>         	return ftp.retrieveFile(pRemoteFilename, op);
>         } finally {
>             if (op != null) {
>                 op.close();			
> 	    }
>         }
> Please can you help us to identify what is the problem for the SFTP connection that not
allowing the File to be transferred from Local to Remote and the storefile method takes 5-6
seconds to responding. But just establishing the new connection, the file transferred but
again the same problem happens for the same channel connection.

This message was sent by Atlassian JIRA

View raw message