Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#90 Error while downloading the files more than 65KB

open
nobody
J2SSH (50)
5
2014-07-25
2012-10-04
sudhakar
No

We are getting an exception 'java.io.IOException: The socket is EOF' whenever we try to download the files with more than 65 kb from SFTP server. However, we don't have any issues to download the file less than 65kb. We have enabled j2ssh logs to figure out the root cause of the issue. Below are the complete details about the issue.

Java Version : jdk1.6.0_11
OS : SunOS 5.10
API Used : J2SSH Core 0.2.9 (j2ssh-core-0.2.9.jar)

2012-10-04 12:48:09,493 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.subsystem.SubsystemChannel - Sending SSH_FXP_STAT subsystem message
2012-10-04 12:48:09,493 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 4 bytes for channel id 1
2012-10-04 12:48:09,493 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,494 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 80 bytes for channel id 1
2012-10-04 12:48:09,494 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,494 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.sftp.SftpMessageStore - Waiting for new messages
2012-10-04 12:48:09,572 INFO [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Received SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.transport.Service - Routing SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Received 33 bytes of data for channel id 1
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Buffer size: 32768
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Unread data: 33
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Buffer size: 32768
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Unread data: 29
2012-10-04 12:48:09,572 DEBUG [ssh-connection 1] com.sshtools.j2ssh.subsystem.SubsystemMessageStore - Received SSH_FXP_ATTRS subsystem message
2012-10-04 12:48:09,573 DEBUG [ssh-connection 1] com.sshtools.j2ssh.transport.Service - Finished processing SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,573 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.subsystem.SubsystemChannel - Sending SSH_FXP_OPEN subsystem message
2012-10-04 12:48:09,573 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 4 bytes for channel id 1
2012-10-04 12:48:09,573 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,573 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 92 bytes for channel id 1
2012-10-04 12:48:09,573 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,573 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.sftp.SftpMessageStore - Waiting for new messages
2012-10-04 12:48:09,730 INFO [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Received SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.transport.Service - Routing SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Received 35 bytes of data for channel id 1
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Buffer size: 32768
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Unread data: 35
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Buffer size: 32768
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.io.DynamicBuffer - Unread data: 31
2012-10-04 12:48:09,730 DEBUG [ssh-connection 1] com.sshtools.j2ssh.subsystem.SubsystemMessageStore - Received SSH_FXP_HANDLE subsystem message
2012-10-04 12:48:09,731 DEBUG [ssh-connection 1] com.sshtools.j2ssh.transport.Service - Finished processing SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,731 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.subsystem.SubsystemChannel - Sending SSH_FXP_READ subsystem message
2012-10-04 12:48:09,731 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 4 bytes for channel id 1
2012-10-04 12:48:09,731 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,731 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.connection.ConnectionProtocol - Sending 43 bytes for channel id 1
2012-10-04 12:48:09,731 INFO [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.transport.TransportProtocolCommon - Sending SSH_MSG_CHANNEL_DATA
2012-10-04 12:48:09,731 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.sftp.SftpMessageStore - Waiting for new messages
2012-10-04 12:48:09,809 ERROR [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon - The Transport Protocol thread failed
java.io.IOException: The socket is EOF
at com.sshtools.j2ssh.transport.TransportProtocolInputStream.readBufferedData(Unknown Source)
at com.sshtools.j2ssh.transport.TransportProtocolInputStream.readMessage(Unknown Source)
at com.sshtools.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
at com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.sshtools.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
2012-10-04 12:48:09,811 DEBUG [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon - The Transport Protocol has been stopped
2012-10-04 12:48:09,812 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Closing all active channels
2012-10-04 12:48:09,813 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - thread has 2 active channels to stop
2012-10-04 12:48:09,813 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Closing session id=0
2012-10-04 12:48:09,813 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.Channel - Connection is not connected
2012-10-04 12:48:09,813 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.Channel - Finializing channel close
2012-10-04 12:48:09,813 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ChannelInputStream - Closing ChannelInputStream
2012-10-04 12:48:09,813 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ChannelOutputStream - Closing ChannelOutputStream
2012-10-04 12:48:09,813 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ChannelInputStream - Closing ChannelInputStream
2012-10-04 12:48:09,814 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Freeing channel 0 [session]
2012-10-04 12:48:09,814 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Closing sftp id=1
2012-10-04 12:48:09,814 DEBUG [ssh-connection 1] com.sshtools.j2ssh.connection.Channel - Connection is not connected
2012-10-04 12:48:09,814 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.Channel - Finializing channel close
2012-10-04 12:48:09,814 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol - Freeing channel 1 [sftp]
2012-10-04 12:48:09,814 INFO [ssh-connection 1] com.sshtools.j2ssh.transport.Service - ssh-connection thread is exiting
2012-10-04 12:48:09,814 DEBUG [DefaultQuartzScheduler_Worker-1] com.sshtools.j2ssh.subsystem.SubsystemChannel - Sending SSH_FXP_CLOSE subsystem message
2012-10-04 12:48:09,815 ERROR [DefaultQuartzScheduler_Worker-1] ges.ftp.RemoteMonitorAndDownloadJob - Exception ::: java.lang.NullPointerException

Can anyone faced similar kind of issues. Please check and let us know how to resolve this issue. Thanks for your help

Discussion