-1

I'm using WinScp to get to a distant ftp server. I cannot connect on my laptop, having the following message Can't open data connection. Yet when my colleague is connecting on her machine, she can connect to the distant ftp site

I listed the solutions, I tried

  • Set to passive mode: Did not work
  • Set to active mode: Did not work
  • Use another ftp client (Filezilla here): Did not work
  • Opened up the range of port on the distant firewall for the server (included 39000 to 41000): Did not work
  • Setup a bat file based on a shared drive with ftp access to the server I want to ftp: did not work

Please also find a detailed excerpt of the log

    2016-10-25 16:16:11.100 Session upkeep
    . 2016-10-25 16:16:11.103 Session upkeep
    . 2016-10-25 16:16:11.602 Session upkeep
    . 2016-10-25 16:16:12.124 Session upkeep
    . 2016-10-25 16:16:12.615 Session upkeep
    . 2016-10-25 16:16:13.129 Session upkeep
    . 2016-10-25 16:16:13.628 Session upkeep
    . 2016-10-25 16:16:14.143 Session upkeep
    . 2016-10-25 16:16:14.644 Session upkeep
    . 2016-10-25 16:16:15.157 Session upkeep
    . 2016-10-25 16:16:15.657 Session upkeep
    . 2016-10-25 16:16:16.171 Session upkeep
    . 2016-10-25 16:16:16.682 Session upkeep
    . 2016-10-25 16:16:17.185 Session upkeep
    . 2016-10-25 16:16:17.686 Session upkeep
    . 2016-10-25 16:16:18.199 Session upkeep
    . 2016-10-25 16:16:18.699 Session upkeep
    . 2016-10-25 16:16:19.214 Session upkeep
    . 2016-10-25 16:16:19.714 Session upkeep
    . 2016-10-25 16:16:20.228 Session upkeep
    . 2016-10-25 16:16:20.728 Session upkeep
    . 2016-10-25 16:16:21.242 Session upkeep
    . 2016-10-25 16:16:21.742 Session upkeep
    . 2016-10-25 16:16:22.256 Session upkeep
    . 2016-10-25 16:16:22.770 Session upkeep
    . 2016-10-25 16:16:23.271 Session upkeep
    . 2016-10-25 16:16:23.784 Session upkeep
    . 2016-10-25 16:16:24.284 Session upkeep
    . 2016-10-25 16:16:24.798 Session upkeep
    . 2016-10-25 16:16:25.297 Session upkeep
    . 2016-10-25 16:16:25.812 Session upkeep
    . 2016-10-25 16:16:26.312 Session upkeep
    . 2016-10-25 16:16:26.312 Sending dummy command to keep session alive.
    > 2016-10-25 16:16:26.312 REST 0
    < 2016-10-25 16:16:26.312 350 Rest supported. Restarting at 0
    . 2016-10-25 16:16:26.312 Dummy directory read to keep session alive.
    . 2016-10-25 16:16:26.312 Listage du répertoire en cours...
    > 2016-10-25 16:16:26.312 TYPE A
    < 2016-10-25 16:16:26.362 200 Type set to A
    > 2016-10-25 16:16:26.363 PASV
    < 2016-10-25 16:16:26.411 227 Entering Passive Mode (2x,92,x,143,159,76)
    > 2016-10-25 16:16:26.411 MLSD
    . 2016-10-25 16:16:26.412 Connexion à 2x.92.x.143:40780...
    < 2016-10-25 16:16:36.795 425 Can't open data connection.
    . 2016-10-25 16:16:36.795 Listage du répertoire impossible
    . 2016-10-25 16:16:36.795 Got reply 4 to the command 2
    . 2016-10-25 16:16:36.912 Session upkeep
    . 2016-10-25 16:16:36.967 Session upkeep
    . 2016-10-25 16:16:37.471 Session upkeep
    . 2016-10-25 16:16:37.981 Session upkeep
    . 2016-10-25 16:16:38.136 Session upkeep
    . 2016-10-25 16:16:38.481 Session upkeep
    . 2016-10-25 16:16:38.995 Session upkeep
    . 2016-10-25 16:16:39.497 Session upkeep
    . 2016-10-25 16:16:40.010 Session upkeep
    . 2016-10-25 16:16:40.514 Session upkeep
    . 2016-10-25 16:16:41.023 Session upkeep
    . 2016-10-25 16:16:41.523 Session upkeep
    . 2016-10-25 16:16:42.037 Session upkeep
    . 2016-10-25 16:16:42.537 Session upkeep
    . 2016-10-25 16:16:43.054 Session upkeep
    . 2016-10-25 16:16:43.551 Session upkeep
    . 2016-10-25 16:16:44.065 Session upkeep
    . 2016-10-25 16:16:44.565 Session upkeep
    . 2016-10-25 16:16:45.079 Session upkeep
    . 2016-10-25 16:16:45.578 Session upkeep
    . 2016-10-25 16:16:46.093 Session upkeep
    . 2016-10-25 16:16:46.598 Session upkeep
    . 2016-10-25 16:16:47.107 Session upkeep
    . 2016-10-25 16:16:47.607 Session upkeep
    . 2016-10-25 16:16:48.121 Session upkeep
    . 2016-10-25 16:16:48.674 Session upkeep
    . 2016-10-25 16:16:49.135 Session upkeep
    . 2016-10-25 16:16:49.638 Session upkeep
    . 2016-10-25 16:16:50.150 Session upkeep
    . 2016-10-25 16:16:50.649 Session upkeep
    . 2016-10-25 16:16:51.164 Session upkeep
    . 2016-10-25 16:16:51.312 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.313 WinSCP Version 5.9.2 (Compilation 6958) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
    . 2016-10-25 16:16:51.313 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
    . 2016-10-25 16:16:51.313 Log level: Debug 2
    . 2016-10-25 16:16:51.313 Local account: xxx
    . 2016-10-25 16:16:51.313 Working directory: C:\Program Files (x86)\WinSCP
    . 2016-10-25 16:16:51.313 Process ID: 7428
    . 2016-10-25 16:16:51.317 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
    . 2016-10-25 16:16:51.317 Time zone: Current: GMT+2, Standard: GMT+1 (Paris, Madrid), DST: GMT+2 (Paris, Madrid (heure d’été)), DST Start: 27/03/2016, DST End: 30/10/2016
    . 2016-10-25 16:16:51.318 Login time: mardi 25 octobre 2016 16:16:51
    . 2016-10-25 16:16:51.318 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.319 Session name: zZz
    . 2016-10-25 16:16:51.319 Host name: 2x.92.46.143 (Port: 21)
    . 2016-10-25 16:16:51.319 User name: GERMANY (Password: Yes, Key file: No)
    . 2016-10-25 16:16:51.319 Transfer Protocol: FTP
    . 2016-10-25 16:16:51.319 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
    . 2016-10-25 16:16:51.319 Disable Nagle: No
    . 2016-10-25 16:16:51.319 Proxy: None
    . 2016-10-25 16:16:51.319 Send buffer: 262144
    . 2016-10-25 16:16:51.319 UTF: Auto
    . 2016-10-25 16:16:51.319 FTPS: Explicit TLS/SSL [Client certificate: No]
    . 2016-10-25 16:16:51.319 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
    . 2016-10-25 16:16:51.319 Session reuse: Yes
    . 2016-10-25 16:16:51.319 TLS/SSL versions: TLSv1.0-TLSv1.2
    . 2016-10-25 16:16:51.319 Local directory: C:\Users\xxx\Documents, Remote directory: /, Update: Yes, Cache: No
    . 2016-10-25 16:16:51.319 Cache directory changes: No, Permanent: Yes
    . 2016-10-25 16:16:51.319 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
    . 2016-10-25 16:16:51.321 Timezone offset: 0h 0m
    . 2016-10-25 16:16:51.321 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.324 Session upkeep
    . 2016-10-25 16:16:51.385 Connexion à 2x.92.x.143...
    . 2016-10-25 16:16:51.386 TLS layer changed state from unconnected to connecting
    . 2016-10-25 16:16:51.386 TLS layer changed state from connecting to connected
    . 2016-10-25 16:16:51.386 Connecté à 2x.92.x.143, négociation de la connexion SSL...
    < 2016-10-25 16:16:51.422 220-FileZilla Server version 0.9.41 beta
    < 2016-10-25 16:16:51.669 220-written by Tim Kosse ([email protected])
    < 2016-10-25 16:16:51.669 220 Please visit http://sourceforge.net/projects/filezilla/
    > 2016-10-25 16:16:51.669 AUTH TLS
    . 2016-10-25 16:16:51.695 Session upkeep
    < 2016-10-25 16:16:51.717 234 Using authentication type TLS
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server hello A
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server certificate A
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server done A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write client key exchange A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write change cipher spec A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write finished A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 flush data
    . 2016-10-25 16:16:51.824 TLS connect: SSLv3 read server session ticket A
    . 2016-10-25 16:16:51.824 TLS connect: SSLv3 read finished A
    . 2016-10-25 16:16:51.825 Verifying certificate for "xxx GERMANY" with fingerprint xcr and 18 failures
    . 2016-10-25 16:16:51.825 Certificate for "xxx GERMANY" matches cached fingerprint and failures
    . 2016-10-25 16:16:51.826 Using TLSv1, cipher TLSv1/SSLv3: AES256-SHA, 1024 bit RSA, AES256-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA1
    . 2016-10-25 16:16:51.826 Session upkeep
    . 2016-10-25 16:16:51.854 Connexion SSL établie. En attente du message de bienvenue...
    > 2016-10-25 16:16:51.854 USER GERMANY
    < 2016-10-25 16:16:51.874 331 Password required for germany
    > 2016-10-25 16:16:51.874 PASS ********
    < 2016-10-25 16:16:51.922 230 Logged on
    > 2016-10-25 16:16:51.922 SYST
    < 2016-10-25 16:16:51.970 215 UNIX emulated by FileZilla
    > 2016-10-25 16:16:51.970 FEAT
    < 2016-10-25 16:16:52.020 211-Features:
    < 2016-10-25 16:16:52.020  MDTM
    < 2016-10-25 16:16:52.020  REST STREAM
    < 2016-10-25 16:16:52.020  SIZE
    < 2016-10-25 16:16:52.020  MLST type*;size*;modify*;
    < 2016-10-25 16:16:52.020  MLSD
    < 2016-10-25 16:16:52.021  AUTH SSL
    < 2016-10-25 16:16:52.021  AUTH TLS
    < 2016-10-25 16:16:52.021  PROT
    < 2016-10-25 16:16:52.021  PBSZ
    < 2016-10-25 16:16:52.031  UTF8
    < 2016-10-25 16:16:52.031  CLNT
    < 2016-10-25 16:16:52.031  MFMT
    < 2016-10-25 16:16:52.031 211 End
    > 2016-10-25 16:16:52.031 CLNT WinSCP-release-5.9.2
    < 2016-10-25 16:16:52.069 200 Don't care
    > 2016-10-25 16:16:52.070 OPTS UTF8 ON
    < 2016-10-25 16:16:52.118 200 UTF8 mode enabled
    > 2016-10-25 16:16:52.118 PBSZ 0
    < 2016-10-25 16:16:52.165 200 PBSZ=0
    > 2016-10-25 16:16:52.165 PROT P
    . 2016-10-25 16:16:52.205 Session upkeep
    < 2016-10-25 16:16:52.213 200 Protection level set to P
    . 2016-10-25 16:16:52.213 Session upkeep
    . 2016-10-25 16:16:52.263 Connecté
    . 2016-10-25 16:16:52.263 Got reply 1 to the command 1
    . 2016-10-25 16:16:52.263 --------------------------------------------------------------------------
    . 2016-10-25 16:16:52.263 Using FTP protocol.
    . 2016-10-25 16:16:52.263 Doing startup conversation with host.
    > 2016-10-25 16:16:52.321 PWD
    < 2016-10-25 16:16:52.369 257 "/" is current directory.
    . 2016-10-25 16:16:52.369 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.369 Changing directory to "/".
    > 2016-10-25 16:16:52.369 CWD /
    < 2016-10-25 16:16:52.417 250 CWD successful. "/" is current directory.
    . 2016-10-25 16:16:52.417 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.417 Getting current directory name.
    > 2016-10-25 16:16:52.418 PWD
    < 2016-10-25 16:16:52.466 257 "/" is current directory.
    . 2016-10-25 16:16:52.466 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.580 Listage du répertoire en cours...
    > 2016-10-25 16:16:52.580 TYPE A
    < 2016-10-25 16:16:52.628 200 Type set to A
    > 2016-10-25 16:16:52.628 PASV
    < 2016-10-25 16:16:52.678 227 Entering Passive Mode (2x,92,x,143,159,77)
    > 2016-10-25 16:16:52.678 MLSD
    . 2016-10-25 16:16:52.678 Connexion à 2x.92.x.143:40781...
    . 2016-10-25 16:16:52.680 Session upkeep
    . 2016-10-25 16:16:53.231 Session upkeep
    . 2016-10-25 16:16:53.731 Session upkeep
    . 2016-10-25 16:16:54.231 Session upkeep
    . 2016-10-25 16:16:54.732 Session upkeep
    . 2016-10-25 16:16:55.232 Session upkeep
    . 2016-10-25 16:16:55.735 Session upkeep
    . 2016-10-25 16:16:56.285 Session upkeep
    . 2016-10-25 16:16:56.785 Session upkeep
    . 2016-10-25 16:16:56.785 Sending dummy command to keep session alive.
    > 2016-10-25 16:16:56.785 PWD
    < 2016-10-25 16:16:56.785 257 "/" is current directory.
    . 2016-10-25 16:16:57.286 Session upkeep
    . 2016-10-25 16:16:57.786 Session upkeep
    . 2016-10-25 16:16:58.287 Session upkeep
    . 2016-10-25 16:16:58.813 Session upkeep
    . 2016-10-25 16:16:59.315 Session upkeep
    . 2016-10-25 16:16:59.815 Session upkeep
    . 2016-10-25 16:17:00.315 Session upkeep

Not sure what to think about it.

Any tips or hints are more than welcomed as I've been struggling with this for two days already.

9
  • 1
    What do your FTP server logs say? What have you done to troubleshoot this? Have you performed a packet capture on the server? Why are you using FTP in the first place? It's an old, insecure, horrible protocol (which you're finding out).
    – EEAA
    Oct 29, 2016 at 21:10
  • Hi @EEAA, the log is in the question (see above). The listed attempts I've tried are in the listed solutions (see above too). I'm using FTP because it is a legacy... I've asked for a change to sftp as I'm in no mood to fix that kind of old sh** but still for the sake of the intellectual challenge, I'm interested to find out why. Hope my answers are OK with you, mate.
    – Andy K
    Oct 31, 2016 at 9:00
  • 1
    Those are client logs. I asked for the server log...
    – EEAA
    Oct 31, 2016 at 12:07
  • If you open all ports - does it work? :)
    – GioMac
    Nov 1, 2016 at 14:10
  • 1
    Try setting to passive mode, then open the advance settings and on the left click ftp. Find the drop down for force ip address change to enable. Any difference?
    – Drifter104
    Nov 1, 2016 at 22:35

2 Answers 2

0

Since you are using winscp instead of scp, I assume that you are Windows. Installing "Git Bash", is simple way to get bash and git, but it also includes a few other handy utilities including ssh and scp. I would give them a try to help narrow your issue down. Sorry, I cannot think of a more direct solution or diagnostic test.

3
  • Thanks @kevin. It helps but not that much. I don't feel in a great mood to sort out a legacy system. The system in itself, is very heterogenous (mix of linux and windows) and it takes a lot of time to have everything sorted. Anyway, I've asked for a change to sftp. It should be easier to not have those kind of stupid issues.
    – Andy K
    Oct 31, 2016 at 9:03
  • 1
    @AndyK, sorry I could not be of more help, but yeah, sometimes upgrading or replacing is more worthwhile than the headache of debugging something that may be unfixable without some arcane knowledge. But that is what Stack Exchange is for; you might still get lucky.
    – Kevin
    Nov 1, 2016 at 1:36
  • No worries @kevin, your help was helpful. Good luck with your career in IT, you know customer care, This is a rare skill that will be always be much sought. Cheers, mate.
    – Andy K
    Nov 3, 2016 at 10:33
2
+50

This is a long shot, but here goes.

  1. What is the IP address of your colleagues computer?
  2. Is she in a different IP range than you are?
  3. Is there a firewall rule on the remote computer that is allowing your colleague to connect, but disallowing your computer from connecting?

Possible solutions:

  1. Try the IP address of your colleagues computer.
  2. Try an IP in the same IP range as your colleagues computer.
  3. Ask the server-team / customer to include your computer's IP into their firewall rules.

A bonus solution:

I have personally had one situation where a Windows 7 Home Edition was unable to connect to FTP servers, if the Windows account being used was a simple user account. Logging in with the Administrative account on the Windows 7 Home Edition solved the issue. This might be a solution for your client, even though you might be using the Professional Edition: Log in with a privileged/administrative account and try to connect to the FTP server again. (Might work by starting WinSCP as Administrator).

1
  • Points are yours , Sir. Your help was much appreciated. Again, the issue was not technical, just human as always actually
    – Andy K
    Nov 3, 2016 at 10:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .