Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.4k views
in .NET FTP by (250 points)
I am using Edt FTP Pro v6.2.0.20. I have a user who is using normal FTP (not secure). They can see files and download ok but when uploading files they get the following error:
I won't open a connection to xxx.xxx.x.xx (only to xx.xxx.xxx.xxx) (code=500).

I asked them to change from Active to Passive mode and it seemed to improve things for them in some areas but they are still getting the problem.

I have read various things about this error on the net and people mention to check firewall settings but the user says they are not blocking it with the firewall.

Also the user can use other FTP programs to upload ok so maybe I am doing something wrong.

Any ideas?

Thanks

4 Answers

0 votes
by (162k points)
You shouldn't get this error in passive mode, only in active mode.
0 votes
by (250 points)
I'm still getting users having this error and they are using passive mode:
I won't open a connection to xxx.xxx.x.x (only to xx.xxx.xx.xxx) (code=500)

Any more ideas?
0 votes
by (250 points)
This gets stranger. The customer is using FTPS. When they transfer files to the FTP server that already exist on the server (e.g. they have changed) the transfer works fine. If they transfer a file that is new and does not exist on the FTP server it fails with:
I won't open a connection to xxx.xxx.x.x (only to xx.xxx.xx.xxx) (code=500)

I asked the user if there is a permissions issue on the server but there is not because they can transfer files with Filezilla ok.

The user said also that it worked fine when they were using my software with normal FTP (not secure).

I don't understand, the fact that it depends on if the file exists sounds like a permissions problem but the error suggests a security/communications problem.

Any ideas?

Thanks
by (162k points)
Take a look at the User Guide that is included.
by (100 points)
dear support,

Here is the log:


DEBUG [SFTPMessageStore] 6 Aug 2019 13:46:22.648 :  Set timeout=60000
INFO [LicenseProperties] 6 Aug 2019 13:46:22.773 :  Licence expiry date: 31.12.9999
INFO [LicenseProperties] 6 Aug 2019 13:46:22.773 :  Production license
DEBUG [FTPConnection] 6 Aug 2019 13:46:22.773 :  Set LocalDirectory='C:\Windows\system32'
DEBUG [SecureFTPConnection] 6 Aug 2019 13:46:22.773 :  Set LocalDirectory to C:\Windows\system32
INFO [LicenseProperties] 6 Aug 2019 13:46:22.773 :  Licence expiry date: 31.12.9999
INFO [LicenseProperties] 6 Aug 2019 13:46:22.773 :  Production license
DEBUG [SSLFTPClient] 6 Aug 2019 13:46:22.773 :  Connecting to ftp.netzone.ch:21
DEBUG [SSLFTPControlSocket] 6 Aug 2019 13:46:22.773 :  waitOnShutdownSSL=True
DEBUG [SecureSocket] 6 Aug 2019 13:46:22.804 :  ChangeSecurityProtocol: None
DEBUG [ProxyConnector] 6 Aug 2019 13:46:22.804 :  ProxySettings: Socks5 172.30.141.179:1080 (anonymous)
DEBUG [SocksConnector] 6 Aug 2019 13:46:22.804 :  SOCKS5 context being created from ProxySettings
DEBUG [HostNameResolver] 6 Aug 2019 13:46:22.804 :  Resolving 172.30.141.179
DEBUG [HostNameResolver] 6 Aug 2019 13:46:22.820 :  172.30.141.179 resolved to 172.30.141.179
DEBUG [HostNameResolver] 6 Aug 2019 13:46:22.820 :  Resolving 172.30.141.179
DEBUG [HostNameResolver] 6 Aug 2019 13:46:22.820 :  172.30.141.179 resolved to 172.30.141.179
DEBUG [ExFTPControlSocket] 6 Aug 2019 13:46:22.820 :  Created control-socket: SocksContext=, ProxySettings=Socks5 172.30.141.179:1080 (anonymous), RemoteHost=ftp.netzone.ch, controlPort=21, timeout=60000
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:22.820 :  StrictReturnCodes=False
DEBUG [ExFTPControlSocket] 6 Aug 2019 13:46:22.820 :  Connecting to proxy 172.30.141.179:1080
INFO [SSLFTPSocket] 6 Aug 2019 13:46:22.820 :  Connecting to 172.30.141.179:1080 with timeout 60000 ms
DEBUG [SSLFTPSocket] 6 Aug 2019 13:46:22.851 :  Successfully connected to 172.30.141.179:1080
DEBUG [ExFTPControlSocket] 6 Aug 2019 13:46:22.851 :  Sending proxy connect request ftp.netzone.ch:21
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  SOCKS 5 Authentication Methods:
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  EnterpriseDT.Util.Socks.Socks5NoAuthMethod
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  Sending SOCKS5 handshake request:
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    05 01 00
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  Response SOCKS5 handshake received:
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    05 00
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  Selected authentication method = EnterpriseDT.Util.Socks.Socks5NoAuthMethod
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  Building SOCKS request:
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    Version      = 5
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    Command      = Connect
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    Address type = Domain name
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    Address       = ftp.netzone.ch
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    Port          = 21
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :  Sending request:
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    05 01 00 03 0E 66 74 70
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    2E 6E 65 74 7A 6F 6E 65
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.851 :    2E 63 68 00 15
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :  SOCKS5 Response received (1):
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :    05 00 00 01
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :  SOCKS5 Response received (2):
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :    AC 1E FB 0D
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :  SOCKS5 Response received (3):
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :    FB 52
DEBUG [Socks5Helper] 6 Aug 2019 13:46:22.992 :  Binding address is 172.30.251.13 64338
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:22.992 :  Setting socket timeout=60000
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:22.992 :  SetSocketTimeout: 60000
INFO [FTPControlSocket] 6 Aug 2019 13:46:23.007 :  Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  220-You are user number 8 of 300 allowed.
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  220-Local time is now 13:46. Server port: 21.
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  220-This is a private system - No anonymous login
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  220 You will be disconnected after 15 minutes of inactivity.
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.023 :  ---> USER verasoft.ch12
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.070 :  331 User verasoft.ch12 OK. Password required
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.070 :  ---> PASS ********
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.179 :  230-Your bandwidth usage is restricted
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.179 :  230 OK. Current restricted directory is /
DEBUG [FTPConnection] 6 Aug 2019 13:46:23.179 :  Successfully logged in
DEBUG [ExFTPConnection] 6 Aug 2019 13:46:23.179 : FTPConnection.1 Starting KeepAlive thread with period 30s
INFO [FTPConnection] 6 Aug 2019 13:46:23.179 :  Auto FEAT disabled
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.179 :  ---> TYPE I
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.210 :  200 TYPE is now 8-bit binary
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.210 :  ---> PWD
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.257 :  257 "/" is your current location
DEBUG [FTPConnection] 6 Aug 2019 13:46:23.257 :  Home directory is '/'
DEBUG [FTPConnection] 6 Aug 2019 13:46:23.257 :  Exists(welcome.png)
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.257 :  ---> SIZE welcome.png
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.288 :  550 Can't check for file existence
DEBUG [FTPClient] 6 Aug 2019 13:46:23.288 :  SIZE not supported
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.288 :  ---> MDTM welcome.png
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.319 :  550 Can't check for file existence
DEBUG [FTPClient] 6 Aug 2019 13:46:23.319 :  MDTM not supported
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.335 :  ---> PORT 172,30,141,17,220,86
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.366 :  500 I won't open a connection to 172.30.141.17 (only to 193.58.223.71)
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.366 :  Expected reply codes = [200,250] (strict=False)
DEBUG [FTPTaskProcessor] 6 Aug 2019 13:46:23.366 :  Purging task queue
DEBUG [FTPConnection] 6 Aug 2019 13:46:23.366 :  Closing connection [instance=0,abrupt=False]
DEBUG [FTPFileFactory] 6 Aug 2019 13:46:23.366 :  Defaulting to Unix parsing
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.366 :  ---> QUIT
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.413 :  221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
DEBUG [FTPControlSocket] 6 Aug 2019 13:46:23.413 :  221 Logout.
DEBUG [SecureSocket] 6 Aug 2019 13:46:23.413 :  Shutdown(Both)
DEBUG [ExFTPConnection] 6 Aug 2019 13:46:23.694 : FTPConnection.1 KeepAlive thread finished.


Any thoughts?
by (162k points)
PORT = active mode, not passive.
by (100 points)
This is strange, because just before making a connection i set it to PASV. Is it possible that Proxy server is somehow changing/enforcing that?

In code it states:

_FTPConnection.ConnectMode = FTPConnectMode.PASV;
_FTPConnection.Connect();

edit:

I also log to my errorLog info about ConnectMode - before and after calling Connect() it returns:
connect mode: PASV

also in "catch" it returns the same.
by (162k points)
This is getting too involved for the forums - please open a support ticket at https://enterprisedt.com/help
0 votes
by (162k points)
At this point it is best to send us a *zipped* log file set to the All logging level, together with your purchase reference. support at enterprisedt dot com

Categories

...