Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

nagajim

Posts

9

Joined

Sun Jun 12, 2005 10:22 pm

Error - Invalid Address Given

by nagajim » Sun Oct 26, 2008 10:48 pm

My application downloads a number of files on startup. I am using edtFTPnet (free) V1.3.0. The vast majority of users (98%+) connect to the server and download without issue. However, this is not the case for 2 or 3 individuals.

Extract from the monitor file follows:
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.547 : 425 Sorry, invalid address given
INFO [FTPControlSocket] 25 Oct 2008 17:54:49.547 : Expected reply codes = [220,230] (strict=False)
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.627 : ---> SIZE ./htdocs/fymfiles_2/FYMYards.ini
ERROR [FTPControlSocket] 25 Oct 2008 17:54:49.757 : Exception in SendCommand : System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)

Is there some setting on their local machines which is causing this problem? Any suggestions would be most welcome.

thanks,
Jim
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Error - Invalid Address Given

by support2 » Mon Oct 27, 2008 9:55 am

What did the client send prior to your log excerpt , i.e. what did it send for the server to respond with "425 Sorry, invalid address given"?
no avatar
User

nagajim

Posts

9

Joined

Sun Jun 12, 2005 10:22 pm

Re: Error - Invalid Address Given

by nagajim » Tue Oct 28, 2008 5:34 am

This is the start of the log file
DEBUG [FTPConnection] 25 Oct 2008 17:54:47.794 : Set LocalDirectory='C:\FYM'
DEBUG [HostNameResolver] 25 Oct 2008 17:54:48.986 : ftp.fymanager.co.uk resolved to 213.171.193.5
DEBUG [FTPClient] 25 Oct 2008 17:54:48.986 : Connecting to 213.171.193.5:21
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.006 : Setting socket timeout=120000
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.146 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.156 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 25 Oct 2008 17:54:49.547 : 425 Sorry, invalid address given

which is exactly the same for a successful connection (apart from a different local directory) e.g.
DEBUG [FTPConnection] 25 Oct 2008 10:42:34.968 : Set LocalDirectory='H:\Documents and Settings\James Hill\My Documents\Visual Studio 2008\Projects\ftptest\ftptest\bin\Debug'
DEBUG [HostNameResolver] 25 Oct 2008 10:42:35.000 : ftp.fymanager.co.uk resolved to 213.171.193.5
DEBUG [FTPClient] 25 Oct 2008 10:42:35.015 : Connecting to 213.171.193.5:21
DEBUG [FTPControlSocket] 25 Oct 2008 10:42:35.609 : Setting socket timeout=120000
DEBUG [FTPControlSocket] 25 Oct 2008 10:42:35.609 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 25 Oct 2008 10:42:35.609 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 25 Oct 2008 10:42:35.656 : 220-Matrix FTP server ready.
DEBUG [FTPControlSocket] 25 Oct 2008 10:42:35.656 : 220-This is a private system - No anonymous login

Data from different users - the 1st fails to connect the 2nd successfully connects.

Jim
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Error - Invalid Address Given

by support2 » Tue Oct 28, 2008 7:12 am

This is an unusual problem - it looks like it is a PureFTPD message. Various threads around the Internet claim that it is a server problem (e.g. http://forums.techguy.org/web-email/762 ... valid.html).

I don't find that explanation totally convincing (although it is definitely a message coming from the server when the client first connects - very unusual).

My best guess is that the server does a reverse DNS lookup on the IP address of the client, and returns this error if the client's IP address can't be resolved. Perhaps to ensure that only IP addresses that have valid DNS records can connect to the server.

I suspect the solution will be (if you have control over the FTP server) to run PureFTPD in a mode that doesn't try to resolve the IP addresses of clients. This is normally done using the '-H' flag.
no avatar
User

nagajim

Posts

9

Joined

Sun Jun 12, 2005 10:22 pm

Re: Error - Invalid Address Given

by nagajim » Tue Oct 28, 2008 10:23 pm

no avatar
User

EDT Support

Posts

905

Joined

Mon Apr 26, 2004 3:03 pm

by EDT Support » Wed Oct 29, 2008 5:14 am

no avatar
User

nagajim

Posts

9

Joined

Sun Jun 12, 2005 10:22 pm

by nagajim » Sat Nov 01, 2008 5:44 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Sat Nov 01, 2008 5:57 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Mon Nov 03, 2008 1:06 pm


Who is online

Users browsing this forum: No registered users and 9 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron