Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.6k views
in Java FTP by (160 points)
I am receiving IOException while trying to list directories in the remote SFTP server. I understand ErrorCode|Status=4 means
An error occurred, but no specific error code exists to describe the failure.
. Any ideas on what could be causing IOException while closing handle?

Here is the sftp console commands:
sftp usr@server.com
usr@server.com's password: 
Connected to usr@server.com.
sftp> ls
dir1  
sftp> cd dir1/dir2/
sftp> ls
file1.txt
file2.DAT


Exception received by my application:
Caused by: java.io.IOException: 
   at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.closeHandle(SftpSubsystemClient.java:202)
   at com.enterprisedt.net.j2ssh.SftpClient.cd(SftpClient.java:364)
   at com.enterprisedt.net.ftp.ssh.SSHFTPClient.chdir(SSHFTPClient.java:1670)


Here is the debug log:
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SftpClient) cd(/)
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SubsystemChannel) Sending SSH_FXP_REALPATH subsystem message
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sending 4 bytes for channel id 4 (maxSize=32648)
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ChannelDataWindow) remote window consumed 4 bytes of window space (131046 bytes left)
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolCommon) Name=SSH_MSG_CHANNEL_DATA,MessageId=94
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolOutputStream) Sent message. Seq no=12, msg=94
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent 4 bytes (4 total) for channel id 4
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent total bytes 4 for channel id 4
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sending 10 bytes for channel id 4 (maxSize=32648)
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ChannelDataWindow) remote window consumed 10 bytes of window space (131036 bytes left)
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolCommon) Name=SSH_MSG_CHANNEL_DATA,MessageId=94
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolOutputStream) Sent message. Seq no=13, msg=94
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent 10 bytes (10 total) for channel id 4
19 Feb 2014 08:09:46,268 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent total bytes 10 for channel id 4
19 Feb 2014 08:09:46,269 [DEBUG] {ssh-connection 5} (com.enterprisedt.SshMessageStore) Waiting for max 30000 ms
19 Feb 2014 08:09:46,275 [DEBUG] {Transport protocol 5} (com.enterprisedt.TransportProtocolCommon) Received unregistered message: Name=SSH_MSG_CHANNEL_DATA,MessageId=94
19 Feb 2014 08:09:46,276 [DEBUG] {ssh-connection 5} (com.enterprisedt.ConnectionProtocol) Received 93 bytes of data for channel id 4
19 Feb 2014 08:09:46,276 [DEBUG] {ssh-connection 5} (com.enterprisedt.ChannelDataWindow) local window consumed 93 bytes of window space (130875 bytes left)
19 Feb 2014 08:09:46,276 [DEBUG] {ssh-connection 5} (com.enterprisedt.SshFxpName) 1 file(s) in directory
19 Feb 2014 08:09:46,276 [DEBUG] {ssh-connection 5} (com.enterprisedt.SubsystemMessageStore) Received SSH_FXP_NAME subsystem message
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SftpSubsystemClient) Opening directory /
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SubsystemChannel) Sending SSH_FXP_OPENDIR subsystem message
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sending 4 bytes for channel id 4 (maxSize=32648)
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ChannelDataWindow) remote window consumed 4 bytes of window space (131032 bytes left)
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolCommon) Name=SSH_MSG_CHANNEL_DATA,MessageId=94
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolOutputStream) Sent message. Seq no=14, msg=94
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent 4 bytes (4 total) for channel id 4
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent total bytes 4 for channel id 4
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sending 10 bytes for channel id 4 (maxSize=32648)
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ChannelDataWindow) remote window consumed 10 bytes of window space (131022 bytes left)
19 Feb 2014 08:09:46,276 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolCommon) Name=SSH_MSG_CHANNEL_DATA,MessageId=94
19 Feb 2014 08:09:46,277 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.TransportProtocolOutputStream) Sent message. Seq no=15, msg=94
19 Feb 2014 08:09:46,277 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent 10 bytes (10 total) for channel id 4
19 Feb 2014 08:09:46,277 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.ConnectionProtocol) Sent total bytes 10 for channel id 4
19 Feb 2014 08:09:46,277 [DEBUG] {ssh-connection 5} (com.enterprisedt.SshMessageStore) Waiting for max 30000 ms
19 Feb 2014 08:09:47,286 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SftpMessageStore) Waiting for new messages (requestid=4)
19 Feb 2014 08:09:48,296 [DEBUG] {(S)FTP Client [912, 0] INPUT} (com.enterprisedt.SftpMessageStore) Waiting for new messages (requestid=4)
19 Feb 2014 08:09:48,375 [DEBUG] {Transport protocol 5} (com.enterprisedt.TransportProtocolCommon) R

1 Answer

0 votes
by (51.6k points)
I can't really see any clues in the log. Are you able to inspect the server logs? Since the server is reporting an error, those logs should have information about what happened.

- Hans (EnterpriseDT)

Categories

...