This project has moved. For the latest updates, please go here.

Unable to perform directory list at []

Jan 16, 2009 at 2:55 PM
Edited Jan 16, 2009 at 2:57 PM
I cannot get SFTP adapter to work in a production environment. I am not using load balancing. On dev machine everything works, but in production environment I get the following errors/warnings:

Event Type: Error
Event Source: SFTPAdapter
Event Category: None
Event ID: 1002
Date: 16.1.2009
Time: 15:30:58
User: N/A
Description:
Method: Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.Dir
Error: Unable to perform directory list at []

------------------------------
Information:
Type: Blogical.Shared.Adapters.Sftp.SftpException
Target: System.Collections.Generic.List`1[Blogical.Shared.Adapters.Sftp.FileEntry] dir(System.String, System.String, Int32, System.Collections.ArrayList, Boolean)
Message: Unable to perform directory list at []
Stacktrace:
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.dir(String fileMask, String uri, Int32 maxNumberOfFiles, ArrayList filesInProcess, Boolean trace)
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.Dir(String fileMask, String uri, ArrayList filesInProcess, Boolean trace)

------------------------------
Type: Tamir.SharpSsh.jsch.SftpException
Target: Tamir.SharpSsh.java.util.Vector Dir2(System.String)
Message: Exception of type 'Tamir.SharpSsh.jsch.SftpException' was thrown.
Stacktrace:
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.SshTransfer.Dir2(String path)
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.dir(String fileMask, String uri, Int32 maxNumberOfFiles, ArrayList filesInProcess, Boolean trace)

*****************

Event Type: Warning
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5740
Date: 16.1.2009
Time: 15:30:58
User: N/A
Description:
The adapter "SFTP" raised an error message. Details "Unable to perform directory list at []".

****************

Event Type: Error
Event Source: SFTPAdapter
Event Category: None
Event ID: 0
Date: 16.1.2009
Time: 15:30:58
User: N/A
Description:
Method: Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndpointTask
Error: Uri:SFTP://xxx.xxx.xxx.xxx:22/temp/*.*

------------------------------
Information:
Type: System.Exception
Target:
Message: Uri:SFTP://xxx.xxx.xxx.xxx:22/temp/*.*
Stacktrace:


------------------------------
Type: Blogical.Shared.Adapters.Sftp.SftpException
Target: System.Collections.Generic.List`1[Blogical.Shared.Adapters.Sftp.FileEntry] dir(System.String, System.String, Int32, System.Collections.ArrayList, Boolean)
Message: Unable to perform directory list at []
Stacktrace:
at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.PickupFilesAndSubmit()
at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndpointTask()


------------------------------
Type: Tamir.SharpSsh.jsch.SftpException
Target: Tamir.SharpSsh.java.util.Vector Dir2(System.String)
Message: Exception of type 'Tamir.SharpSsh.jsch.SftpException' was thrown.
Stacktrace:
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.SshTransfer.Dir2(String path)
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.dir(String fileMask, String uri, Int32 maxNumberOfFiles, ArrayList filesInProcess, Boolean trace)



Obviously, I cannot debug much the code at prod machine. I've been trying to figure this out from the source with no luck. Adapter cnfiguration is identical on dev and prod machines. Also, I cannot get any trace from sftp adapter even with trace option set to true (on production machine).

Any suggestions where to look for solution? Help would be greatly appreciated.
Coordinator
Jan 16, 2009 at 8:10 PM

To trace using DebugView, make sure you have "Capture 32" enabled in the Option menu. It sounds like you might have a connectivity problem. Have you tried using an other client tool?

//Mikael

Jan 19, 2009 at 2:17 PM

Thanks for the quick reply Mikael!

I got the trace working with "Capture 32" enabled (RTFM :-)

Unfortunately, it didn't get me anywhere, the trace is as follows:

[5032] [SftpReceiverEndpoint] ReadLocationConfiguration called 
[5032] [TimeSchedule]Executing GetNextActivationTime 
[5032] [SftpReceiverEndpoint] Start called 
[5032] [SftpReceiverEndpoint] ControlledTermination.Enter() 
[5032] [SftpReceiverEndpoint] PickupFilesAndSubmit called [SFTP://xxx.xxx.xxx.xxx:22/temp/*.*] 
[5032] [SftpReceiverEndpoint] Dir(/temp/*.*) 
[5032] [SftpReceiverEndpoint] Reconnecting to xxx.xxx.xxx.xxx 
[5032] [SftpReceiverEndpoint] Dir(/temp/*.*) 
[5032] [SftpReceiverEndpoint] Exception #1 
[5032] [SftpReceiverEndpoint] ControlledTermination.Leave() 
[5032] [TimeSchedule]Executing GetNextActivationTime 
[5032] [SftpReceiverEndpoint] ControlledTermination.Enter() 
[5032] [SftpReceiverEndpoint] PickupFilesAndSubmit called [SFTP://xxx.xxx.xxx.xxx:22/temp/*.*] 
[5032] [SftpReceiverEndpoint] Dir(/temp/*.*) 
[5032] [SftpReceiverEndpoint] Reconnecting to xxx.xxx.xxx.xxx 
[5032] [SftpReceiverEndpoint] Dir(/temp/*.*) 
[5032] [SftpReceiverEndpoint] Exception #2 
[5032] [SftpReceiverEndpoint] ControlledTermination.Leave() 

I also tried the connection with sftp client (winSCP) and it works fine. 

Coordinator
Jan 20, 2009 at 7:01 PM
What got me wondering here is the fact that you don't get a Connection Failure, which I'm pretty sure would show up in the trace. This would leave me thinking the user does not have the sufficient rights to do directory search.

Connectivity problems is common crossing the plattform bounderies. I wrote an article about this  a while ago. 
http://blogical.se/blogs/mikael/archive/2008/03/05/biztalk-sftp-adapter-troubleshooting.aspx

The best thing is to try with the code in the article since that uses the same ssh library, but you could also try it with Tunnelier.

hth
//Mikael
Feb 19, 2009 at 12:09 PM
First of all, thank you for the test code.

I was not in a hurry with this, and had only today time to spend a few hours looking into this. I think I got the problem resolved, just not sure how. I added directory listing command to the test code and compiled it against the release 1.3.2 libraries (I did not compile the adapter libraries at this point). With most of the sftp servers the test code seemed to work fine, but trying to make a directory listing at this one problematic sftp server caused an exception being thrown from ls(string path) method in Tamir.SharpSSH.jsch.ChannelSftp class. And this happened only when testing on the procution server. I added some trace to the ChannelSftp class, recompiled the Tamir.SharpSSH.dll and... the problem disappeared. I have make a few more tests to make sure, but seems ok.

It might be that Tamir.SharpSSH.dll that is in the latest release was not built from the latest source or has some other issues. Well, it also might have been that I messed up the installation at some point. Or something else. Anyway, the problem seems to be quite rare and the exception message has nothing to do with the problem itself, so it's hard to tell what really was wrong.

The code in the Tamir.SharpSSH project is really messed up, pure evil. Are there no other options with sftp and .NET?

Thanks for helping!

cheers
maakku
Coordinator
Feb 20, 2009 at 4:07 PM
I agree with you about the code structure of the Tamir.SharpSSH library. I believe it was originally written in java, and was converted using some tool. But I should also point out that we've had very little problems with it.

Anyway, -glad it's working out for you. Please rate the release if you're happy with our work.

//Mikael
Apr 23, 2009 at 3:19 PM
Edited Jun 24, 2009 at 10:28 AM

Removed as per Mikael's request.

Jun 23, 2009 at 1:18 AM

I am experiencing this same problem with my installation. However, this thread does not seem to explain what the real problem was, nor how to resolve it.

 

Has anyone else come across this issue recently, and have a step by step solution on what needs to be done to resolve it?

 

Thank you,

Eric

Coordinator
Jun 23, 2009 at 1:52 PM

amitmca, would you mind moving your reply to a new discussion?

//Mikael

Jul 13, 2009 at 1:32 AM

Try disable load balancing on the receive location

Sep 29, 2011 at 11:28 AM

Hi all,

I got the same problem "Unable to perform directory list at [SFTP://server:22/*.xml]" if I disable load balancing I receive similar error "Unable to perform directory list at []".

I can connect to the server with other client sftp app, so I think the problem is not connection failure.

Can anybody help me?

Thanks in advance.

Mar 30, 2012 at 8:25 PM

I set the Load Balance to false and it worked for me.