El cliente FTP recibe el archivo completo, pero siempre cierra la conexión antes de finalizar

El cliente FTP recibe el archivo completo, pero siempre cierra la conexión antes de finalizar

En una máquina con Windows Server 2008 R2 Standard, tengo problemas para conectarme y descargar un archivo desde un servidor FTP de Windows.

El tamaño del archivo es de ~3 KB a 6 KB. Muy raramente entre 100 KB y 500 KB, pero el servidor tiene mucho espacio en el disco.

Probé una conexión pasiva:

Response:   220-Microsoft FTP Service
Response:   220 Regal Logistics
Command:    USER ********
Response:   331 Password required for ********.
Command:    PASS ********
Response:   230 User ******** logged in.
Status: Connected
Status: Starting download of /********/PO/201405130227.xml
Command:    CWD /********/PO
Response:   250 CWD command successful.
Command:    TYPE A
Response:   200 Type set to A.
Command:    PASV
Response:   227 Entering Passive Mode (***,***,***,**,19,64)
Command:    RETR 201405130227.xml
Response:   125 Data connection already open; Transfer starting.
Response:   426 Data connection closed. Error scanning content
Error:  File transfer failed after transferring 3,465 bytes in 1 second

Lo extraño es que el archivo tiene 3465 bytes, por lo que todo el archivo se transmite, pero no se termina correctamente.

Y probé una conexión activa:

Response:   220-Microsoft FTP Service
Response:   220 Regal Logistics
Command:    USER ********
Response:   331 Password required for ********.
Command:    PASS ********
Response:   230 User ******** logged in.
Command:    PORT 10,0,0,114,214,65
Response:   200 PORT command successful.
Command:    RETR 201405130227.xml
Response:   150 Opening ASCII mode data connection for 201405130227.xml(3465 bytes).
Response:   426 Data connection closed. Error scanning content

Lo intenté desde dos clientes FTP diferentes en el mismo servidor (Filezilla y el cliente FTP CLI) y obtengo la misma respuesta:

125 Data connection already open; Transfer starting.
426 Data connection closed. Error scanning content

Intenté descargar archivos con éxito desde una red separada, por lo que es exclusivo de la ubicación del servidor.

Me comuniqué con los administradores del sistema/red de donde está ubicado el servidor y me aseguraron que los puertos necesarios para que funcione FTP están abiertos. (Supongo que abrieron 21, no estoy seguro de ningún otro). Hay un firewall físico en su red, pero nuevamente, desafortunadamente no tengo acceso a él. El Firewall de Windows está deshabilitado en el servidor.

¿A qué más podría echarle un vistazo para ver si realmente está fallando?

Aquí hay un registro de paquetes de la solicitud justo antes de fallar:

No.     Time           Source                Destination                Protocol  Length Info
     39 6.878855000    LOCAL-IP            EXTERNAL-FTP-SERVER-IP        FTP      77     Request: RETR 201405130227.xml

Frame 39: 77 bytes on wire (616 bits), 77 bytes captured (616 bits) on interface 0
Ethernet II, Src: Hewlett-_ab:cd:ef (00:1e:a1:ab:cd:ef), Dst: Watchgua_12:34:56 (ab:cd:7f:12:34:56)
Internet Protocol Version 4, Src: LOCAL-IP (LOCAL-IP), Dst: EXTERNAL-FTP-SERVER-IP (EXTERNAL-FTP-SERVER-IP)
Transmission Control Protocol, Src Port: 56623 (56623), Dst Port: ftp (21), Seq: 55, Ack: 207, Len: 23
File Transfer Protocol (FTP)

No.     Time           Source                Destination                Protocol  Length Info
     40 6.893662000    EXTERNAL-FTP-SERVER-IP        LOCAL-IP            TCP      60     ftp > 56623 [ACK] Seq=207 Ack=78 Win=93362 Len=0

Frame 40: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Watchgua_12:34:56 (ab:cd:7f:12:34:56), Dst: Hewlett-_ab:cd:ef (00:1e:a1:ab:cd:ef)
Internet Protocol Version 4, Src: EXTERNAL-FTP-SERVER-IP (EXTERNAL-FTP-SERVER-IP), Dst: LOCAL-IP (LOCAL-IP)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 56623 (56623), Seq: 207, Ack: 78, Len: 0

No.     Time           Source                Destination                Protocol  Length Info
     41 6.957666000    EXTERNAL-FTP-SERVER-IP        LOCAL-IP            FTP      108    Response: 125 Data connection already open; Transfer starting.

Frame 41: 108 bytes on wire (864 bits), 108 bytes captured (864 bits) on interface 0
Ethernet II, Src: Watchgua_12:34:56 (ab:cd:7f:12:34:56), Dst: Hewlett-_ab:cd:ef (00:1e:a1:ab:cd:ef)
Internet Protocol Version 4, Src: EXTERNAL-FTP-SERVER-IP (EXTERNAL-FTP-SERVER-IP), Dst: LOCAL-IP (LOCAL-IP)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 56623 (56623), Seq: 207, Ack: 78, Len: 54
File Transfer Protocol (FTP)

No.     Time           Source                Destination                Protocol  Length Info
     42 6.986757000    EXTERNAL-FTP-SERVER-IP        LOCAL-IP            FTP      106    Response: 426 Data connection closed. Error scanning content

Frame 42: 106 bytes on wire (848 bits), 106 bytes captured (848 bits) on interface 0
Ethernet II, Src: Watchgua_12:34:56 (ab:cd:7f:12:34:56), Dst: Hewlett-_ab:cd:ef (00:1e:a1:ab:cd:ef)
Internet Protocol Version 4, Src: EXTERNAL-FTP-SERVER-IP (EXTERNAL-FTP-SERVER-IP), Dst: LOCAL-IP (LOCAL-IP)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 56623 (56623), Seq: 261, Ack: 78, Len: 52
File Transfer Protocol (FTP)

No.     Time           Source                Destination                Protocol  Length Info
     43 6.986768000    LOCAL-IP            EXTERNAL-FTP-SERVER-IP        TCP      54     56623 > ftp [ACK] Seq=78 Ack=313 Win=65280 Len=0

Frame 43: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: Hewlett-_ab:cd:ef (00:1e:a1:ab:cd:ef), Dst: Watchgua_12:34:56 (ab:cd:7f:12:34:56)
Internet Protocol Version 4, Src: LOCAL-IP (LOCAL-IP), Dst: EXTERNAL-FTP-SERVER-IP (EXTERNAL-FTP-SERVER-IP)
Transmission Control Protocol, Src Port: 56623 (56623), Dst Port: ftp (21), Seq: 78, Ack: 313, Len: 0

Recopilé algunos registros más; esta vez miré más que los puertos 21 y 22; miré las IP de la conexión FTP:

    No.     Time           Source                Destination           Protocol Length Info
   2607 11.440148000   __REMOTE__IP__        _LOCAL_IP_            FTP      105    Response: 227 Entering Passive Mode (198,104,198,16,17,233)

Frame 2607: 105 bytes on wire (840 bits), 105 bytes captured (840 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 54613 (54613), Seq: 195, Ack: 60, Len: 51
File Transfer Protocol (FTP)

No.     Time           Source                Destination           Protocol Length Info
   2608 11.440763000   _LOCAL_IP_            __REMOTE__IP__        FTP      74     Request: RETR testthing.txt

Frame 2608: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: Hewlett-_SUB_MAC (11:22:33:SUB_MAC), Dst: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC)
Internet Protocol Version 4, Src: _LOCAL_IP_ (_LOCAL_IP_), Dst: __REMOTE__IP__ (__REMOTE__IP__)
Transmission Control Protocol, Src Port: 54613 (54613), Dst Port: ftp (21), Seq: 60, Ack: 246, Len: 20
File Transfer Protocol (FTP)

No.     Time           Source                Destination           Protocol Length Info
   2609 11.441029000   _LOCAL_IP_            __REMOTE__IP__        TCP      66     54617 > 4585 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=128 SACK_PERM=1

Frame 2609: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II, Src: Hewlett-_SUB_MAC (11:22:33:SUB_MAC), Dst: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC)
Internet Protocol Version 4, Src: _LOCAL_IP_ (_LOCAL_IP_), Dst: __REMOTE__IP__ (__REMOTE__IP__)
Transmission Control Protocol, Src Port: 54617 (54617), Dst Port: 4585 (4585), Seq: 0, Len: 0

No.     Time           Source                Destination           Protocol Length Info
   2610 11.442013000   __REMOTE__IP__        _LOCAL_IP_            TCP      60     ftp > 54613 [ACK] Seq=246 Ack=80 Win=93360 Len=0

Frame 2610: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 54613 (54613), Seq: 246, Ack: 80, Len: 0

No.     Time           Source                Destination           Protocol Length Info
   2622 11.459434000   __REMOTE__IP__        _LOCAL_IP_            TCP      66     4585 > 54617 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 WS=2 MSS=1400 SACK_PERM=1

Frame 2622: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: 4585 (4585), Dst Port: 54617 (54617), Seq: 0, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
   2623 11.459475000   _LOCAL_IP_            __REMOTE__IP__        TCP      54     54617 > 4585 [ACK] Seq=1 Ack=1 Win=4194304 Len=0

Frame 2623: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: Hewlett-_SUB_MAC (11:22:33:SUB_MAC), Dst: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC)
Internet Protocol Version 4, Src: _LOCAL_IP_ (_LOCAL_IP_), Dst: __REMOTE__IP__ (__REMOTE__IP__)
Transmission Control Protocol, Src Port: 54617 (54617), Dst Port: 4585 (4585), Seq: 1, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
   2634 11.482207000   __REMOTE__IP__        _LOCAL_IP_            FTP      108    Response: 125 Data connection already open; Transfer starting.

Frame 2634: 108 bytes on wire (864 bits), 108 bytes captured (864 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 54613 (54613), Seq: 246, Ack: 80, Len: 54
File Transfer Protocol (FTP)

No.     Time           Source                Destination           Protocol Length Info
   2635 11.483996000   __REMOTE__IP__        _LOCAL_IP_            FTP-DATA 60     FTP Data: 4 bytes

Frame 2635: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: 4585 (4585), Dst Port: 54617 (54617), Seq: 1, Ack: 1, Len: 4
FTP Data (test)

No.     Time           Source                Destination           Protocol Length Info
   2636 11.484173000   __REMOTE__IP__        _LOCAL_IP_            FTP      106    Response: 426 Data connection closed. Error scanning content

Frame 2636: 106 bytes on wire (848 bits), 106 bytes captured (848 bits) on interface 0
Ethernet II, Src: Watchgua_LOCALMAC (AA:BB:CC:LOCALMAC), Dst: Hewlett-_SUB_MAC (11:22:33:SUB_MAC)
Internet Protocol Version 4, Src: __REMOTE__IP__ (__REMOTE__IP__), Dst: _LOCAL_IP_ (_LOCAL_IP_)
Transmission Control Protocol, Src Port: ftp (21), Dst Port: 54613 (54613), Seq: 300, Ack: 80, Len: 52
File Transfer Protocol (FTP)

Ah, probamos la conexión a un servidor FTP que usaba un puerto de control no estándar y la transferencia de archivos funcionó correctamente.

Sólo cuando nos conectamos a un servidor FTP que utiliza el puerto de control estándar 21 la transferencia tiene problemas.


Limpiamos la configuración del firewall, la reconstruimos y restablecimos la configuración del firewall. Luego se solucionó el problema.

La configuración que se aplicó era idéntica a la configuración que existía antes. La configuración del firewall de alguna manera se corrompió. Eso es todo lo que escribió, de verdad.

Respuesta1

Respuesta: 426 Conexión de datos cerrada. Error al escanear contenido

Haydefinitivamenteun Firewall intermedio que intercepta el tráfico FTP. Que yo sepa, Microsoft FTP NO admite el escaneo de contenido.

Para ser claro: esto es más bien uncortafuegos centralcosa que unfirewall de Windowscosa.

Asimismo, la teoría de lapuerto no estándar-Trabajar apoya esto. (Central FW solo parece inspeccionar el tráfico hacia el puerto 21)

Comenta esto con los administradores de tu red.

Respuesta2

Bueno, según el mensaje "426 Conexión de datos cerrada. Error al escanear contenido" que estás recibiendo. Parece que podría ser un firewall de red que busca virus.

http://forums.iis.net/t/1105801.aspx?Solución de problemas+FTP+426+Errores+Conexión+transferencia+cerrada+abortada+

información relacionada