Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.4k views
in Java FTP by (120 points)
We are using the registered version of edtftpj-pro.jar version 4.4.0 and are attempting to connect to a new customer SFTP server that runs WS-FTP Pro:
DEBUG [TransportProtocolCommon] 11 Mar 2013 10:22:00.920 : Remote identification: 'SSH-2.0-WS_FTP-SSH_7.5.1'

We are receiving the following exception on the initial connection when we attempt to execute the "pwd" command:

DEBUG [com.enterprisedt.net.j2ssh.session.SessionChannelClient] 11 Mar 2013 10:22:03.383 : Requesting command execution
DEBUG [ChannelInputStream] 11 Mar 2013 10:22:03.384 : Starting blocking operation
DEBUG [com.enterprisedt.net.j2ssh.session.SessionChannelClient] 11 Mar 2013 10:22:03.384 : Command is pwd
DEBUG [ChannelInputStream] 11 Mar 2013 10:22:03.384 : Waiting for channel data
DEBUG [ConnectionProtocol] 11 Mar 2013 10:22:03.384 : Sending exec request for the session channel
DEBUG [SshMessageStore] 11 Mar 2013 10:22:03.384 : Waiting for max 5000 ms
DEBUG [TransportProtocolCommon] 11 Mar 2013 10:22:03.384 : Sending SSH_MSG_CHANNEL_REQUEST
DEBUG [ConnectionProtocol] 11 Mar 2013 10:22:03.384 : Waiting for channel request reply
DEBUG [SshMessageStore] 11 Mar 2013 10:22:03.384 : Waiting for max 120000 ms
DEBUG [IOStreamConnector] 11 Mar 2013 10:22:03.385 : Starting IOStreamConnectorThread thread
DEBUG [ChannelInputStream] 11 Mar 2013 10:22:03.385 : Starting blocking operation
DEBUG [ChannelInputStream] 11 Mar 2013 10:22:03.385 : Waiting for extended channel data
DEBUG [SshMessageStore] 11 Mar 2013 10:22:03.385 : Waiting for max 5000 ms
DEBUG [TransportProtocolCommon] 11 Mar 2013 10:22:03.429 : Received unregistered message: SSH_MSG_CHANNEL_FAILURE
DEBUG [SshMessageStore] 11 Mar 2013 10:22:03.429 : Waiting for max 119900 ms
DEBUG [ConnectionProtocol] 11 Mar 2013 10:22:03.429 : Channel request failed
ERROR [SCPClient] 11 Mar 2013 10:22:03.430 : Failed to execute command 'pwd'
DEBUG [Channel] 11 Mar 2013 10:22:03.430 : close() called
DEBUG [ConnectionProtocol] 11 Mar 2013 10:22:03.430 : Local computer has closed channel 2[session]
DEBUG [TransportProtocolCommon] 11 Mar 2013 10:22:03.430 : Sending SSH_MSG_CHANNEL_CLOSE
DEBUG [Channel] 11 Mar 2013 10:22:03.431 : Connection is connected
DEBUG [ChannelDataWindow] 11 Mar 2013 10:22:03.431 : Stopped channel data window
DEBUG [ChannelDataWindow] 11 Mar 2013 10:22:03.431 : Stopped channel data window
ERROR [ExecuteCommandTask] 11 Mar 2013 10:22:03.431 : 2:ExecuteCommand[pwd] failed : Failed to execute command 'pwd'
com.enterprisedt.net.ftp.FTPException: Failed to execute command 'pwd'
at com.enterprisedt.net.ftp.ssh.SCPClient.executeCommand(SCPClient.java:1191)
at com.enterprisedt.net.ftp.async.internal.ExecuteCommandTask.run(ExecuteCommandTask.java:89)
at com.enterprisedt.net.ftp.async.internal.FTPTaskProcessor$b.run(FTPTaskProcessor.java:590)


com.enterprisedt.net.ftp.FTPException: Failed to execute command 'pwd'
at com.enterprisedt.net.ftp.ssh.SCPClient.executeCommand(SCPClient.java:1191)
at com.enterprisedt.net.ftp.async.internal.ExecuteCommandTask.run(ExecuteCommandTask.java:89)
at com.enterprisedt.net.ftp.async.internal.FTPTaskProcessor$b.run(FTPTaskProcessor.java:590)
DEBUG [AsyncResult] 11 Mar 2013 10:22:03.431 : notifyComplete() called: com.enterprisedt.net.ftp.async.ExecuteCommandResult@12b4986
DEBUG [AsyncResult] 11 Mar 2013 10:22:03.432 : waitTillComplete() exit: com.enterprisedt.net.ftp.async.ExecuteCommandResult@12b4986
INFO [FTPTaskProcessor] 11 Mar 2013 10:22:03.435 : Processed task 2:ExecuteCommand[pwd]
INFO [FTPTaskProcessor] 11 Mar 2013 10:22:03.435 : Freed connection for task 2
INFO [FTPTaskProcessor] 11 Mar 2013 10:22:03.435 : Task 2 complete (FTPThread[FTPThread_edt_2])
DEBUG [TransportProtocolCommon] 11 Mar 2013 10:22:03.476 : Received unregistered message: SSH_MSG_CHANNEL_CLOSE


If I run the "pwd" command from the sftp command line client I get this response from the server when using the same logon:

sftp> pwd
Remote working directory: /users/user1

Any idea on why the library is failing on the "PWD" command for this particular server if it works fine when using the Linux sftp client? Is there an alternative command that is better supported for this?

Thank you!

1 Answer

0 votes
by (162k points)
Could you post a code snippet? I'm unsure why "SCPClient" is appearing in your log.

Categories

...