Menu

#1 Error writing large files using SFTP

open
nobody
None
5
2014-08-19
2007-11-08
Marcelo
No

I am using the version 0.2.9
When I try to write a file in SSH Tectia Server 4.3 the process fail. It always fails when I am writing large files. Using debug it fails in the class TransportProtocolOutputStream on the method sendMessage(SshMessage msg) when call the line:
out.write(message.toByteArray());

It enters to:
} catch (IOException ioe) {
if (transport.getState().getValue() !=
TransportProtocolState.DISCONNECTED) {
throw new TransportProtocolException("IO Error on
socket: " + ioe.getMessage());
}
}

The IOException said that the socked is closed:
java.net.SocketException: Socket closed

The SFTP works fine when I am reading files using SFTP and when I write small files sizes.

The error trace:
com.sshtools.j2ssh.transport.TransportProtocolException: The transport protocol is disconnected
at com.sshtools.j2ssh.transport.TransportProtocolCommon.sendMessage(TransportProtocolCommon.java:453)
at com.sshtools.j2ssh.connection.ConnectionProtocol.sendChannelData(ConnectionProtocol.java:276)
at com.sshtools.j2ssh.connection.Channel.sendChannelData(Channel.java:225)
at com.sshtools.j2ssh.subsystem.SubsystemChannel.sendMessage(SubsystemChannel.java:71)
at com.sshtools.j2ssh.sftp.SftpSubsystemClient.writeFile(SftpSubsystemClient.java:638)
at com.sshtools.j2ssh.sftp.SftpFileOutputStream.write(SftpFileOutputStream.java:83)
at com.sshtools.j2ssh.SftpClient.transferFile(SftpClient.java:418)
at com.sshtools.j2ssh.SftpClient.put(SftpClient.java:753)
at com.sshtools.j2ssh.SftpClient.putOwn(SftpClient.java:638)

Marcelo

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.