Problem getting Listing for UNIX Type: L8 Server (wodFtpDLX / wodFtpDLX.NET)
I'm currently have trouble listing files within a specific directory for a UNIX Type: L8 server. I know 3 files exist, because I can see them with 2 other Ftp tools.
Following are log files from those 2 other tools, and one with wodFtpDLX.net.
LogFile from CoreFtp
Welcome to Core FTP, release ver 1.3c, build 1447.4 (U) -- © 2003-2006
WinSock 2.0
Mem -- 2,096,620 KB, Virt -- 2,097,024 KB
Started on Friday September 22, 2006 at 14:32:PM
Connect socket #356 to 199.253.134.240, port 21...
220 stx2-533-prd FTP server starting...
USER ia10380
331 User ia10380 OK. Password required.
PASS **********
230 OK. Logged in
SYST
215 UNIX Type: L8
Keep alive off...
PWD
230 <virtual directory>
PORT 129,176,129,31,40,10
200 PORT command successful
LIST
150-Connecting to mailbox
150 Options: -l
226 3 matches total
Transferred 219 bytes in 0.016 seconds
LogFile using VB.NET & FtpWebRequest class
================================================================================
9/22/2006 2:37:24 PM MTPS_FTP (1.0.0.5) starting.
================================================================================
CommandLineArgs:
\Edisrv05serverapps$PRODMTPS_FTPMTPS_FTP.exe
9/22/2006 2:37:25 PM Successfully connected to CLMSQL02PROD
--------------------------------------------------------------------------------
Connecting to Site: AEL-DIA Settings: SSL=False PASV=False Binary=True
--------------------------------------------------------------------------------
Submitting FtpWebRequest : LIST /
--------------------------------------------------------------------------------
Receiving FtpWebResponse:
230 OK. Logged in
230 <virtual directory>
230 <virtual directory>
220 stx2-533-prd FTP server starting...
226 3 matches total
13310 Sep 19 2006 11:00:32 October_WebEx_Broadcast.htm
8034 Sep 19 2006 10:35:20 End_of_Contingency_for_Electronic_Remittance_Advice.htm
21214 Aug 21 2006 15:30:51 September_WebEx_Broadcast.htm
LogFile using VB.NET & wodFtpDLX.Net
================================================================================
9/22/2006 2:38:15 PM MTPS_FTP (1.0.0.5) starting.
================================================================================
CommandLineArgs:
D:Visual Studio ProjectsDTW01MTPS_FTP_With_wodFtpDLXMTPS_FTPinDebugMTPS_FTP.vshost.exe
9/22/2006 2:38:16 PM Successfully connected to CLMSQL51TEST
--------------------------------------------------------------------------------
Connecting to Site: AEL-DIA Settings: Protocol=FTP Port=21 PASV=True TransferMode=Binary
Connecting to server
stx2-533-prd FTP server starting...
Sending authentication data
USER ia10380 User ia10380 OK. Password required.
PASS ******** OK. Logged in
PWD <virtual directory>
Connected to server - idle
Setting transfer mode
TYPE A TYPE is now ASCII
Changing current directory
CWD <virtual directory>
Connected to server - idle
Total Files in DirItems structure = 0
Any idea what the problem may be?
Re: Problem getting Listing for UNIX Type: L8 Serv
Hi Dave,
If it works with other applications, it should work with us too. Perhaps you could try to set FirFormat Property to Ftp1.DirFormat = WeOnlyDo.Client.DirFormats.UNIX
If this doesnt work, is it possible for us to gain access to the server?
Can you contact me at techsupport@weonlydo.com
Regards,
Damba
Re: Problem getting Listing for UNIX Type: L8 Serv
Sorry, This external FTP server is also limiting incoming connections by IP address.
I've tried all the different DirectoryFormats and have even tried using your demo apps. None of them are displaying the 3 files.
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
Did you try the same code on any other server? does it work with them?
If yes, i noticed in second log that you set Passive to False. Can you try it with wodFtpDLX.Net?
Regards,
Damba
Re: Problem getting Listing for UNIX Type: L8 Serv
I tried as you suggested, PASV=false but no luck.
I'm not getting anything back from the Ftp1.ListItemsEvent.
Re: Problem getting Listing for UNIX Type: L8 Serv
Hi Dave,
Please try to use ListParams Property before calling Connect Method. You need to set value of ListParams Property to .
Here is example:
---------------------------------
dlx1.ListParams =
---------------------------------
Now, when LIST command is executed it will send only LIST without parameters. By default wodFtpDLX.NET send LIST -al. Maybe this will help you.
More help for ListParams Property you can find here:
http://www.weonlydo.com/FtpDLX.NET/Help/WeOnlyDo.Client.FTP~WeOnlyDo.Client.FtpDLX~ListParams.html
Hope this help.
Regards,
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
I am already setting ListParams = .
I wonder if there is an error being thrown from the CWD, and that the list command is not even being sent? Wouldn't the list command typically show up that it is being sent?
This problem might also be corrected with another issue I'm trying to work through with Kreso, regarding MVS and not forcing a CWD command to happen every time. The logic I would like to be implemented, is if FTP1.RemotePath is already = to the RemotePath being sent into the ListDir function, then skip the CWD command and just do the list. That just might also correct the problem here?
LogFile using VB.NET & wodFtpDLX.Net
================================================================================
9/22/2006 2:38:15 PM MTPS_FTP (1.0.0.5) starting.
================================================================================
CommandLineArgs:
D:Visual Studio ProjectsDTW01MTPS_FTP_With_wodFtpDLXMTPS_FTPbinDebugMTPS_FTP.vshost.exe
9/22/2006 2:38:16 PM Successfully connected to CLMSQL51TEST
--------------------------------------------------------------------------------
Connecting to Site: AEL-DIA Settings: Protocol=FTP Port=21 PASV=True TransferMode=Binary
Connecting to server
stx2-533-prd FTP server starting...
Sending authentication data
USER ia10380 User ia10380 OK. Password required.
PASS ******** OK. Logged in
PWD <virtual directory>
Connected to server - idle
Setting transfer mode
TYPE A TYPE is now ASCII
Changing current directory
CWD <virtual directory>
Connected to server - idle
Total Files in DirItems structure = 0
Re: Problem getting Listing for UNIX Type: L8 Serv
Hi Dave,
PASV or PORT commands are not visible. You need to call ListDir Moethod but I don't see it on log.
Please send us complete FTPReply.
Here is how:
-----------------------
Debug.Print(Args.Command + + Args.ReplyText)
-----------------------
You can send us also code snippet.
Regards,
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
Here is the log again, showing you exactly the commands being sent and received. The top one is the problem one where the LIST command is not being sent. The bottom log is to a different server and you can see the LIST command is being sent. Maybe the problem is your code doesn't know how to handle <virtual directory>?
Again however, my proposed logic would still hold true for this example. FTP1.RemotePath is already set to <virtual directory> and I'm also calling Ftp1.ListDir(<virtual directory>), so because they are both equal, I just want it to do a LIST. Please don't force another change directory, it's already in the right place.
--------------------------------------------------------------------------------
Connecting to Site: AEL-DIA Settings: Protocol=FTP Port=21 PASV=False TransferMode=Binary
Ftp1_StateChangedEvent Args.NewState: Connecting to server
Ftp1_FtpReplyEvent Args.ReplyText: stx2-533-prd FTP server starting...
Ftp1_StateChangedEvent Args.NewState: Sending authentication data
Ftp1_PreTranslateCommandEvent Args.Command: USER ia10380
Ftp1_FtpReplyEvent Args.ReplyText: User ia10380 OK. Password required.
Ftp1_PreTranslateCommandEvent Args.Command: PASS ********
Ftp1_FtpReplyEvent Args.ReplyText: OK. Logged in
Ftp1_PreTranslateCommandEvent Args.Command: PWD
Ftp1_FtpReplyEvent Args.ReplyText: <virtual directory>
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
Calling Ftp1.ListDir(<virtual directory>)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: TYPE is now ASCII
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD <virtual directory>
Ftp1_FtpReplyEvent Args.ReplyText: <virtual directory>
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
Total Files in DirItems structure = 0
--------------------------------------------------------------------------------
Connecting to Site: AEL-DMN Settings: Protocol=FTPSwithdata Port=21 PASV=False TransferMode=Binary
Ftp1_StateChangedEvent Args.NewState: Connecting to server
Ftp1_FtpReplyEvent Args.ReplyText: Department of Human Service Secure Transport site!
Secure FTP Server ready.
Ftp1_StateChangedEvent Args.NewState: Initializing secure connection
Ftp1_PreTranslateCommandEvent Args.Command: AUTH TLS
Ftp1_FtpReplyEvent Args.ReplyText: SSLv23/TLSv1
Ftp1_StateChangedEvent Args.NewState: Setting data channel security
Ftp1_PreTranslateCommandEvent Args.Command: PBSZ 0
Ftp1_FtpReplyEvent Args.ReplyText: PBSZ=0
Ftp1_PreTranslateCommandEvent Args.Command: PROT P
Ftp1_FtpReplyEvent Args.ReplyText: PROT command successful
Ftp1_StateChangedEvent Args.NewState: Sending authentication data
Ftp1_PreTranslateCommandEvent Args.Command: USER esupport@729713100
Ftp1_FtpReplyEvent Args.ReplyText: Password required for esupport@729713100.
Ftp1_PreTranslateCommandEvent Args.Command: PASS ********
Ftp1_FtpReplyEvent Args.ReplyText: Virtual user ESupport@729713100 logged in.
Ftp1_PreTranslateCommandEvent Args.Command: PBSZ 0
Ftp1_FtpReplyEvent Args.ReplyText: PBSZ=0
Ftp1_PreTranslateCommandEvent Args.Command: PROT P
Ftp1_FtpReplyEvent Args.ReplyText: PROT command successful
Ftp1_PreTranslateCommandEvent Args.Command: PWD
Ftp1_FtpReplyEvent Args.ReplyText: / is current directory.
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
Calling Ftp1.ListDir(/)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: Type set to A.
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD /
Ftp1_FtpReplyEvent Args.ReplyText: CWD command successful.
Ftp1_StateChangedEvent Args.NewState: Downloading directory list from the server
Ftp1_PreTranslateCommandEvent Args.Command: PORT 129,176,129,31,10,114
Ftp1_FtpReplyEvent Args.ReplyText: PORT command successful.
Ftp1_
Re: Problem getting Listing for UNIX Type: L8 Serv
Looks like my second log got cut-off I'll repaste starting from the ListDir call.
Calling Ftp1.ListDir(/)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: Type set to A.
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD /
Ftp1_FtpReplyEvent Args.ReplyText: CWD command successful.
Ftp1_StateChangedEvent Args.NewState: Downloading directory list from the server
Ftp1_PreTranslateCommandEvent Args.Command: PORT 129,176,129,31,10,114
Ftp1_FtpReplyEvent Args.ReplyText: PORT command successful.
Ftp1_PreTranslateCommandEvent Args.Command: LIST
Ftp1_FtpReplyEvent Args.ReplyText: Opening ASCII mode SSL data connection for file list.
Ftp1_FtpReplyEvent Args.ReplyText: Transfer complete.
total 0
drwxrwxrwx 1 root 2000 0 Nov 22 2004 Archive_Request
drwxrwxrwx 1 root 2000 0 Nov 22 2004 Miscellaneous_Received
drwxrwxrwx 1 root 2000 0 Nov 22 2004 Miscellaneous_Submitted
drwxrwxrwx 1 root 2000 0 Jul 6 08:25 Production_Failed
drwxrwxrwx 1 root 2000 0 Apr 26 2004 TestResults
drwxrwxrwx 1 root 2000 0 Apr 26 2004 TestTransactions
drwxrwxrwx 1 root 2000 0 Sep 22 11:22 X12_Transactions
drwxrwxrwx 1 root 2000 0 Apr 26 2004 messages
drwxrwxrwx 1 root 2000 0 Apr 26 2004 received
drwxrwxrwx 1 root 2000 0 Sep 25 07:32 submitted
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
Total Files in DirItems structure = 10
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
You can try something like this in PreTranslateCommand Event:
----------------------------------------------
Private Sub dlx1_PreTranslateCommand(Command As String)
If Left$(Command, 3) = CWD Then
Command = & vbCrLf
End If
End Sub
----------------------------------------------
or this:
----------------------------------------------
Private Sub dlx1_PreTranslateCommand(Command As String)
If Left$(Command, 3) = PWD Then
Command = & vbCrLf
End If
End Sub
----------------------------------------------
PreTranslateCommand Event fires before the command is sent to FTP server.
More help for PreTranslateCommand Event you can find here:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~PreTranslateCommand_EV.html
You can try it. I'm not sure that you will get successful result. Problem is that we can't connect to your server so my proposal could not give any result.
You can try something else to send for CWD or PWD or other Command in PretranslateCommand Event.
Let us know how it goes.
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
No luck. If I change the CWD command to CRLF, then the next thing that happens is I'm getting disconnected from the server.
Calling Ftp1.ListDir(<virtual directory>)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: TYPE is now ASCII
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD <virtual directory>
Args.Command has been manually changed to crlf. Args.Command:
Ftp1_StateChangedEvent Args.NewState: Disconnected from server
Connection was closed by foreign host.
Interesting, I added error trapping in the DoneEvent and the CWD <virtual directory> command is coming back with an error. Nothing very discriptive (230 <virtual directory>), but the point is it's generating an error and possibly why it's not moving on to do the PORT & LIST commands that would typically follow.
Calling Ftp1.ListDir(<virtual directory>)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: TYPE is now ASCII
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD <virtual directory>
Ftp1_FtpReplyEvent Args.ReplyText: <virtual directory>
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
***Error*** Ftp1_DoneEvent Args.Error: 230 Args.Description: <virtual directory>
Total Files in DirItems structure = 0
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
Please try to call ListDir on this way (if if you didn't yet):
----------------------
Ftp1.ListDir( /<virtual directory> )
----------------------
Any luck?
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
No luck. Same behavior.
Connecting to Site: AEL-DIA Settings: Protocol=FTP Port=21 PASV=False TransferMode=Binary
Ftp1_StateChangedEvent Args.NewState: Connecting to server
Ftp1_FtpReplyEvent Args.ReplyText: stx2-533-prd FTP server starting...
Ftp1_StateChangedEvent Args.NewState: Sending authentication data
Ftp1_PreTranslateCommandEvent Args.Command: USER ia10380
Ftp1_FtpReplyEvent Args.ReplyText: User ia10380 OK. Password required.
Ftp1_PreTranslateCommandEvent Args.Command: PASS ********
Ftp1_FtpReplyEvent Args.ReplyText: OK. Logged in
Ftp1_PreTranslateCommandEvent Args.Command: PWD
Ftp1_FtpReplyEvent Args.ReplyText: <virtual directory>
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
Calling Ftp1.ListDir(<virtual directory>)
Ftp1_StateChangedEvent Args.NewState: Setting transfer mode
Ftp1_PreTranslateCommandEvent Args.Command: TYPE A
Ftp1_FtpReplyEvent Args.ReplyText: TYPE is now ASCII
Ftp1_StateChangedEvent Args.NewState: Changing current directory
Ftp1_PreTranslateCommandEvent Args.Command: CWD <virtual directory>
Args.Command has been changed to Args.Command: CWD /<virtual directory>
Ftp1_FtpReplyEvent Args.ReplyText: <virtual directory>
Ftp1_StateChangedEvent Args.NewState: Connected to server - idle
***Error*** Ftp1_DoneEvent Args.Error: 230 Args.Description: <virtual directory>
Total Files in DirItems structure = 0
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
I will have to inform Kreso about your problem and we will see what he can do for you.
Please send me also error that is returned from Done Event:
--------------------------------------
Private Sub Ftp1_DoneEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.FtpDoneArgs) Handles Ftp1.DoneEvent
Debug.Print( DONE: + Args.Error.ToString)
End Sub
--------------------------------------
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
I had it printed out already. :)
***Error*** Ftp1_DoneEvent Args.Error: 230 Args.Description: <virtual directory>
Args.Error = 230
Args.Decription = <virtual directory>
I now know that it sends back an error for every CWD command, even with servers I'm not having any problems with. It's more like an informational message than a true error. Is there any way to change that behaviour, so that only real errors come back through the args.Error & args.descrition for Ftp1.DoneEvent? If not, then can you propose a way a person can put in good error-handling logic?
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
One more thing:
Please go to command prompt and type:
----------------------
telnet your_server_name 21
----------------------
and send us first line returned.
Maybe we can find somewhere your server and duplicate your problem.
Drazen
Re: Problem getting Listing for UNIX Type: L8 Serv
It returned:
220 Microsoft FTP Service
Re: Problem getting Listing for UNIX Type: L8 Serv
Here are the commands straight from a command-line ftp. Doesn't get much simpler than this and yet this is able to get the directory listing.
C:>ftp 199.253.134.240
Connected to 199.253.134.240.
220 stx2-533-prd FTP server starting...
User (199.253.134.240:(none)): ia10380
331 User ia10380 OK. Password required.
Password:
230 OK. Logged in
ftp> dir
200 PORT command successful
150-Connecting to mailbox
150 Options: -l
13310 Sep 19 2006 11:00:32 October_WebEx_Broadcast.htm
8034 Sep 19 2006 10:35:20 End_of_Contingency_for_Electronic_Remittance_Advice.htm
21214 Aug 21 2006 15:30:51 September_WebEx_Broadcast.htm
226 3 matches total
ftp: 219 bytes received in 0.02Seconds 13.69Kbytes/sec.
ftp> bye
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 CPU time spent on you: 0.010 seconds.
C:>
Re: Problem getting Listing for UNIX Type: L8 Serv
Dave,
can we meet online? Can you install http://wippien.com and perhaps VNC on your system so we can access it directly and see this for ourselves? Wippien will make sure connection is secure.
I can explain all you need to do in email.
I need to see this and try few things if I could type on your computer.
Kreso
Re: Problem getting Listing for UNIX Type: L8 Serv
Yes, that should be fine.
I installed the software and it want's me to create an account.
Maybe you can send the remainder what you would like me to do in email?