PDA

View Full Version : FTP erstellt leere Dateien auf Server



ChristophS
11-11-10, 13:38
Hallo.
Ich habe seit einiger Zeit (~Juli) das Problem, das der FTP-Transfer von der AS400 auf einige externe FTP-Server misslingt.

Protokoll:
331 Please specify the password.
230 Login successful.
UNIX Type: L8
namefmt 1
500 Unknown SITE command.
Client NAMEFMT ist 1.
cd import
250 Directory successfully changed.
binary
200 Switching to Binary mode.
mput /qntc/...Pfad.../*.zip
229 Entering Extended Passive Mode (|||24101|)
425 Failed to establish connection.

Das Ergebniss dieser Aktion ist jedesmal eine 0 KB Datei auf dem Fremdsystem, egal ob ASCII oder BINARY.
Per FTP-Programm, wie etwa FileZilla, gibt es kein Problem.

Warum nun der Fehlercode 425 auftaucht ist mir völlig schleierhaft.

Meine Frage: Gibt es inzwischen irgendwelche PTF's für dieses Problem? Oder hat jemand eine andere Idee/Lösungsmöglichkeit?

viele Grüße
Christoph

TARASIK
11-11-10, 15:46
Hallo Christoph,
ist da vielleicht eine Firewall im Spiel ? Welches Release ist denn auf der ISeries ?

TARASIK
11-11-10, 15:52
Hallo Christoph,
vielleicht ist dies ein Ansatz ?

FTP Connection Ending Abnormally
Incident Summary

Problem Summary:
FTP client connection from the IBM iSeries™ family of servers or the IBM System i5™ is periodically failing with a reply code 425. PORT mode is being used.

Resolution:
Information APAR II13451 indicates that this is occurring because the IBM iSeries™ family of servers or the IBM System i5™ is reusing a data port too quickly and, therefore, not allowing the connection to be cleaned up on the server side. Following is the explanation provided in the INFO APAR and ways to work around the problem.

iSeries FTP client and server were changed in V5R1 to assign ephemeral port numbers randomly. This change was made to prevent possible security exposures which can take place if a "hacker" can predict the next port number which TCP will use, as this information can be used to carry out a "spoofing" attack. Assigning port numbers randomly is suggested in RFC 2577 - FTP Security Considerations. However, the sequence of port numbers is not always "random" across FTP client and server jobs which causes intermittent failures in establishing data connections on high-use systems. Because of these security enhancements, users running FTP client connections in PORT mode may see intermittent problems with data connections. The remote system may send a " 425 " error.

The following can be used to avoid the problem:
o Use Passive Mode connection ("SENDPASV 1")
o Monitor for the error message and retry the operation.
o Change the TCP closed connection wait (TIMW) timeout value on the remote system (for example, the system running the FTP server) to a very small value (for example, 1 sec) may also resolve the problem.

ChristophS
11-11-10, 16:20
Hallo Tarasik.
Danke für die Antwort.
Die Firewall schließe ich aus, da die AS400 alle FTP-Berechtigungen besitzt und auch auf unseren eigenen FTP-Server in der DMZ ohne Problem zugreifen kann.

Ich habe den Tip in deiner Mail getestet und vor dem Transfer den sendpasv 1 explizit gesetzt. Hatte aber auch keinen Erfolg. Nach dem mput geht er wieder in "229 Entering Extended Passive Mode" und danach kommt "425 failed....".

Unser Release ist V6R1M0

TARASIK
11-11-10, 16:29
Hallo Christoph,
lief denn das ganze schon einmal unter R610 ? Es hat sich bei R610 bei FTP einiges geändert.
IBM i Support: Software Technical Document : 484261471 (http://www-912.ibm.com/s_dir/slkbase.NSF/1ac66549a21402188625680b0002037e/dace92df240295dc8625742500565275?OpenDocument&ExpandSection=-1)

ChristophS
12-11-10, 07:32
Hallo Tarasik.

Das war der Fehler.
Der automatische extended Passive Mode muß ab R610 explizit ausgeschaltet werden (-->SENDEPSV).

Vielen Dank für deine Hilfe.
Christoph

sirdidi
21-03-12, 11:29
Danke der Tip hat mir auf die Schnelle sehr geholfen!!!!! ;)

Fuerchau
21-03-12, 14:28
Da der Default im System geändert werden kann, ist die Angabe SENDEPSV nicht ausreichend, da das ein Toggle-Schalter ist.

SENDEPSV 0

setzt das explizit aus.