Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.4k views
in .NET FTP by (320 points)
When using a windows service and making calls to GetFileInfos, seem like I am getting a timeout, The service is avialabe and the user that I am using to connect to the ftp server is valid and have rights also the user that is running the windows service has admin rights, works in other ftp server but not on this one. I am not sure whats going on here is the trace, please help here is the logging information

this is the exception message:
EnterpriseDT.Net.Ftp.ControlChannelIOException: An I/O exception occurred.

When I use a ftp shell that comes with the edtftp install also fail look at this:

ftp> set UserName=actual_user
Set user = actual_user
ftp> password= actual_pass
Set password
ftp> connect remote.ftp.server
Opened connection to remote.ftp.server
ftp> dir
Command 'dir' failed - disconnected
ftp> ls
Cannot execute command - not connected
ftp> dir
Cannot execute command - not connected
ftp> connect remote.ftp.server
Opened connection to remote.ftp.server
ftp> pwd
/
ftp> ls
Command 'ls' failed - disconnected
ftp>



DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.200 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 12 Feb 2011 14:58:10.560 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
INFO [LicenseProperties] 12 Feb 2011 14:58:12.482 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 12 Feb 2011 14:58:12.482 : Production license
DEBUG [FTPConnection] 12 Feb 2011 14:58:12.482 : Set LocalDirectory='C:\Windows\system32'
DEBUG [SecureFTPConnection] 12 Feb 2011 14:58:12.482 : Set LocalDirectory to C:\Windows\system32
INFO [LicenseProperties] 12 Feb 2011 14:58:12.482 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 12 Feb 2011 14:58:12.482 : Production license
DEBUG [SSLFTPClient] 12 Feb 2011 14:58:12.482 : Connecting to remote.ftp.server:21
DEBUG [SSLFTPControlSocket] 12 Feb 2011 14:58:12.482 : waitOnShutdownSSL=True
DEBUG [HostNameResolver] 12 Feb 2011 14:58:12.529 : Resolving remote.ftp.server
DEBUG [HostNameResolver] 12 Feb 2011 14:58:12.622 : Obtained 1 addresses
DEBUG [HostNameResolver] 12 Feb 2011 14:58:12.622 : IP address: 10.1.1.10
DEBUG [HostNameResolver] 12 Feb 2011 14:58:12.622 : remote.ftp.server resolved to 10.1.1.10
DEBUG [ExFTPControlSocket] 12 Feb 2011 14:58:12.622 : Connecting directly to ftp-server remote.ftp.server:21
INFO [SSLFTPSocket] 12 Feb 2011 14:58:12.622 : Connecting to 10.1.1.10:21 with timeout 120000 ms
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.669 : Setting socket timeout=120000
ALL [SecureSocket] 12 Feb 2011 14:58:12.669 : SecureSocket timeout=120000
ALL [SecureSocket] 12 Feb 2011 14:58:12.669 : SecureSocket timeout=120000
INFO [FTPControlSocket] 12 Feb 2011 14:58:12.669 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [ExFTPControlSocket] 12 Feb 2011 14:58:12.669 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=remote.ftp.server, controlPort=21, timeout=120000
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.669 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.732 : 220-Hi there, welcome to the Euro RSCG Portland FTP site.
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.732 : 220 WFTPD 3.0 service (by Texas Imperial Software) ready for new user
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.732 : ---> USER actual_user
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.779 : 331 Give me your password, please
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.779 : ---> PASS ********
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.826 : 230 Logged in successfully
DEBUG [FTPConnection] 12 Feb 2011 14:58:12.826 : Successfully logged in
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.841 : ---> FEAT
DEBUG [ExFTPConnection] 12 Feb 2011 14:58:12.841 : Starting KeepAlive thread with period 30s
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : 211-Extensions supported:
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : MDTM
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : SIZE
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : REST STREAM
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : TVFS
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.872 : 211 END
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.888 : ---> TYPE I
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.919 : 200 Type is Image (Binary)
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.919 : ---> PWD
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:12.966 : 257 "/" is current directory
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:14.748 : ---> TYPE I
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:14.794 : 200 Type is Image (Binary)
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.560 : ---> SYST
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.591 : 215 WIN32 L 8 (WFTPD by Texas Imperial Software)
WARN [FTPFileFactory] 12 Feb 2011 14:58:15.607 : Unknown SYST 'WIN32 L 8 (WFTPD by Texas Imperial Software)' - defaulting to Unix parsing
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.607 : ---> PWD
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.638 : 257 "/" is current directory
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.638 : ---> PASV
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : 227 Entering Passive Mode (38,100,212,82,10,176)
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : Server supplied address=10.1.1.10
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : Server supplied port=2736
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : autoPassiveIPSubstitution=True
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : remoteAddr=10.1.1.10
DEBUG [FTPControlSocket] 12 Feb 2011 14:58:15.685 : Substituting server supplied IP (10.1.1.10) with remote host IP (10.1.1.10)
ALL [SecureSocket] 12 Feb 2011 14:58:15.685 : SecureSocket timeout=120000
ALL [SecureSocket] 12 Feb 2011 14:58:15.685 : SecureSocket timeout=120000
DEBUG [HostNameResolver] 12 Feb 2011

9 Answers

0 votes
by (162k points)
It may be a firewall blocking the data connection (which is used to retrieve the listing).

Try using active mode instead of passive mode.
0 votes
by (320 points)
When I received the exception immediate after I change to ACTIVE mode failed again.
0 votes
by (320 points)
Also I try the ftp client that comes with windows and I am able to connect and display the root folder content, but when I try the ftp shell that comes with the install failed to display.
her is the output from edtftp ftp command shell:
Not connected
ftp> set username=actual_user
Set user = actual_user
ftp> password = actual_pass
Set password
ftp> connect ftp.server.com
Opened connection to ftp.server.com
ftp> dir
Command 'dir' failed - disconnected
ftp>

the output when I use the windows default client is to long, because it display the root folder contet, please advice.
0 votes
by (162k points)
Please post the active mode logging, and also the output from DOS ftp.exe (remove any long listings and type 'debug' when first connected to get more debugging).
0 votes
by (320 points)
Here is the listion of DOS ftp.exe program:

ftp> debug
Debugging On .
ftp> o ftp.actual.server
Connected to ftp.actual.server.
220-Hi there, welcome to the Our FTP site.
220 WFTPD 3.0 service (by Texas Imperial Software) ready for new user
User (ftp.actual.server:(none)): actual_user
---> USER actual_user
331 Give me your password, please
Password:
---> PASS actual_password
230 Logged in successfully
ftp> cd actual_folder
---> CWD actual_folder
250 "/actual_folder" is current directory
ftp> dir
---> PORT 10,140,45,140,206,94
200 PORT command okay
---> LIST
150 File Listing Follows in ASCII mode.
total 1
-rwxrwxrwx 1 noone nogroup 4 Feb 15 10:07 test.txt
226 Transfer finished successfully.
ftp: 73 bytes received in 0.00Seconds 73000.00Kbytes/sec.
ftp>

Here is the loggin the active mode:

DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.083 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.083 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.083 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.085 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.085 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.085 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 15 Feb 2011 11:48:02.099 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [SFTPMessageStore] 15 Feb 2011 11:48:04.399 : Set timeout=30000
INFO [LicenseProperties] 15 Feb 2011 11:48:08.056 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 15 Feb 2011 11:48:08.056 : Production license
DEBUG [FTPConnection] 15 Feb 2011 11:48:08.057 : Set LocalDirectory='C:\Windows\system32'
DEBUG [SecureFTPConnection] 15 Feb 2011 11:48:08.058 : Set LocalDirectory to C:\Windows\system32
INFO [LicenseProperties] 15 Feb 2011 11:48:08.060 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 15 Feb 2011 11:48:08.060 : Production license
DEBUG [SSLFTPClient] 15 Feb 2011 11:48:08.061 : Connecting to ftp.actual.server:21
DEBUG [SSLFTPControlSocket] 15 Feb 2011 11:48:08.062 : waitOnShutdownSSL=True
DEBUG [HostNameResolver] 15 Feb 2011 11:48:08.074 : Resolving ftp.actual.server
DEBUG [HostNameResolver] 15 Feb 2011 11:48:08.075 : Obtained 1 addresses
DEBUG [HostNameResolver] 15 Feb 2011 11:48:08.075 : IP address: 10.1.1.10
DEBUG [HostNameResolver] 15 Feb 2011 11:48:08.075 : ftp.actual.server resolved to 10.1.1.10
DEBUG [ExFTPControlSocket] 15 Feb 2011 11:48:08.075 : Connecting directly to ftp-server ftp.actual.server:21
INFO [SSLFTPSocket] 15 Feb 2011 11:48:08.076 : Connecting to 10.1.1.10:21 with timeout 30000 ms
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.112 : Setting socket timeout=30000
ALL [SecureSocket] 15 Feb 2011 11:48:08.114 : SecureSocket timeout=30000
ALL [SecureSocket] 15 Feb 2011 11:48:08.114 : SecureSocket timeout=30000
INFO [FTPControlSocket] 15 Feb 2011 11:48:08.116 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [ExFTPControlSocket] 15 Feb 2011 11:48:08.117 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=ftp.actual.server, controlPort=21, timeout=30000
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.120 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.149 : 220-Hi there, welcome to the Euro RSCG Portland FTP site.
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.150 : 220 WFTPD 3.0 service (by Texas Imperial Software) ready for new user
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.157 : ---> USER actual_user
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.192 : 331 Give me your password, please
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.193 : ---> PASS ********
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.231 : 230 Logged in successfully
DEBUG [FTPConnection] 15 Feb 2011 11:48:08.231 : Successfully logged in
DEBUG [ExFTPConnection] 15 Feb 2011 11:48:08.235 : Starting KeepAlive thread with period 30s
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.237 : ---> FEAT
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : 211-Extensions supported:
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : MDTM
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : SIZE
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : REST STREAM
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : TVFS
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.271 : 211 END
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.272 : ---> TYPE I
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.306 : 200 Type is Image (Binary)
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.307 : ---> PWD
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:08.340 : 257 "/" is current directory
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:09.902 : ---> TYPE I
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:09.936 : 200 Type is Image (Binary)
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.611 : ---> SYST
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.644 : 215 WIN32 L 8 (WFTPD by Texas Imperial Software)
WARN [FTPFileFactory] 15 Feb 2011 11:48:22.645 : Unknown SYST 'WIN32 L 8 (WFTPD by Texas Imperial Software)' - defaulting to Unix parsing
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.646 : ---> PWD
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.679 : 257 "/" is current directory
DEBUG [SSLFTPControlSocket] 15 Feb 2011 11:48:22.683 : Creating active data socket on port 0
DEBUG [ExFTPControlSocket] 15 Feb 2011 11:48:22.685 : Binding 10.1.1.140
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.687 : ---> PORT 10,140,45,140,205,249
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.720 : 200 PORT command okay
DEBUG [ExFTPActiveDataSocket] 15 Feb 2011 11:48:22.722 : Created active data-socket: ProxyConnector=
DEBUG [SSLFTPActiveDataSocket] 15 Feb 2011 11:48:22.722 : Created active data-socket: Protocol=None, CompatibilityFlags=Standard
ALL [SecureSocket] 15 Feb 2011 11:48:22.724 : SecureSocket timeout=30000
ALL [SecureSocket] 15 Feb 2011 11:48:22.724 : SecureSocket timeout=30000
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:22.724 : ---> LIST
DEBUG [FTPControlSocket] 15 Feb 2011 11:48:43.867 : 425 Unable to open data connection - error=[10060] Connection timed out
DEBUG [FTPClient] 15 Feb 2011 11:48:43.87
0 votes
by (162k points)
The clue is here:

Binding 10.1.1.140
PORT 10,140,45,140,205,249

What is the difference between your two IP addresses 10.140.45.140 and 10.1.1.140?

The listening socket is binding to the latter, but apparently it ends up being 10.140.45.140
0 votes
by (320 points)
I am sorry, I forgot to clarify that, the 10.1.1.140 think of internet address and the 10.140.45.140 as part of the intranet where a firewall maps the first ip to the second.
0 votes
by (162k points)
For some reason this is causing a problem. The server is unable to reach the IP address supplied.
0 votes
by (320 points)
But, if I use DOS ftp.exe or any other ftp client everything works as expected. weird!. From a programming or setup a the client level I don't know what else I can do.

Categories

...