Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.6k views
in Java FTP by (240 points)
I am using a trial version of edtFTPPRO. I have two files that my code converts to an array of bytes and then attempts to upload to the remote SFTP server. One file can be consistently uploaded without any problems. However, whenever I try to upload the other file, I end up with an exception "Unexpected server response".

The successful file is 376 bytes. The file that always fails is 41,309 bytes. From the error message, it's hard to tell what's going on or what to do next.

I have no problem uploading the file to the server using WS_FTP.

5 Answers

0 votes
by (240 points)
I enabled logging and here is what was generated

ERROR 2006-08-29 14:44:00,831 Transport protocol 1 com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon - The Transport Protocol thread failed
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at com.enterprisedt.net.j2ssh.transport.A.A(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.A.B(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
ERROR 2006-08-29 14:44:00,831 Transport protocol 1 com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon - The Transport Protocol thread failed
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at com.enterprisedt.net.j2ssh.transport.A.A(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.A.B(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
ERROR 2006-08-29 14:44:00,862 Transport protocol 1 com.enterprisedt.net.j2ssh.transport.TransportProtocolOutputStream - sendMessage() failed: Broken pipe (state=4)
ERROR 2006-08-29 14:44:00,862 Transport protocol 1 com.enterprisedt.net.j2ssh.transport.TransportProtocolOutputStream - sendMessage() failed: Broken pipe (state=4)
ERROR 2006-08-29 14:44:00,870 Thread-17 com.enterprisedt.net.j2ssh.SftpClient - Failed to close output stream in put()
java.io.IOException: The connection has been closed [Unnamed Channel]
at com.enterprisedt.net.j2ssh.connection.Channel.sendChannelData(Unknown Source)
at com.enterprisedt.net.j2ssh.subsystem.SubsystemChannel.sendMessage(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.closeHandle(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.closeFile(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpFile.close(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpFileOutputStream.close(Unknown Source)
at com.enterprisedt.net.j2ssh.SftpClient.put(Unknown Source)
at com.enterprisedt.net.ftp.ssh.SSHFTPClient.put(Unknown Source)
at com.dex.b2b.output.SFTPOutputTarget.sendSFTPFile(SFTPOutputTarget.java:48)
at com.dex.b2b.output.SFTPOutputTarget.deliverMiscFile(SFTPOutputTarget.java:114)
at com.dex.b2b.processors.OutboundProcessor.deliverMiscFilesSittingInOutboundDirectory(OutboundProcessor.java:204)
at com.dex.b2b.processors.OutboundProcessor.processOutput(OutboundProcessor.java:308)
at com.dex.b2b.service.B2BService.runTask(B2BService.java:218)
at com.dex.b2b.service.TaskThread.run(TaskThread.java:35)
ERROR 2006-08-29 14:44:00,870 Thread-17 com.enterprisedt.net.j2ssh.SftpClient - Failed to close output stream in put()
java.io.IOException: The connection has been closed [Unnamed Channel]
at com.enterprisedt.net.j2ssh.connection.Channel.sendChannelData(Unknown Source)
at com.enterprisedt.net.j2ssh.subsystem.SubsystemChannel.sendMessage(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.closeHandle(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.closeFile(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpFile.close(Unknown Source)
at com.enterprisedt.net.j2ssh.sftp.SftpFileOutputStream.close(Unknown Source)
at com.enterprisedt.net.j2ssh.SftpClient.put(Unknown Source)
at com.enterprisedt.net.ftp.ssh.SSHFTPClient.put(Unknown Source)
at com.dex.b2b.output.SFTPOutputTarget.sendSFTPFile(SFTPOutputTarget.java:48)
at com.dex.b2b.output.SFTPOutputTarget.deliverMiscFile(SFTPOutputTarget.java:114)
at com.dex.b2b.processors.OutboundProcessor.deliverMiscFilesSittingInOutboundDirectory(OutboundProcessor.java:204)
at com.dex.b2b.processors.OutboundProcessor.processOutput(OutboundProcessor.java:308)
at com.dex.b2b.service.B2BService.runTask(B2BService.java:218)
at com.dex.b2b.service.TaskThread.run(TaskThread.java:35)
ERROR 2006-08-29 14:44:00,882 Thread-17 com.enterprisedt.net.j2ssh.transport.TransportProtocolOutputStream - sendMessage() failed: Socket closed (state=5)
ERROR 2006-08-29 14:44:00,882 Thread-17 com.enterprisedt.net.j2ssh.transport.TransportProtocolOutputStream - sendMessage() failed: Socket closed (state=5)
0 votes
by (51.6k points)
Can you post the whole log? If you think it's too big please zip it up and e-mail it to us at support@...

- Hans (EDT)
0 votes
by (240 points)
There is nothing more. That is the whole log.
0 votes
by (51.6k points)
Oh I see. Can you please increase the logging level to ALL then?
Logger.setLevel(Level.ALL);


- Hans (EDT)
0 votes
by (240 points)
I emailed a much larger log file. Please let me know if you do not receive it.

Thanks

Categories

...