[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

FTP Session from PC into AS400 hangs up on append statement

Posted on 2006-04-26
6
Medium Priority
?
1,539 Views
Last Modified: 2008-01-16
I am having a strange problem with an FTP session on the PC.
I am using a .BAT file to execute my commands, feeding off of an FTP "Script File".

The problem started when we upgraded our O/S to V5.R2.M0.  We have since applied Cum. PTFs, to no avail.

The problem is intermittent.  Sometimes (when system traffic is low), the script executes clear through.
Other times (seemingly when the system is busier), the script gets through the logon, executes an "Append" command, and hangs.

Here is what it looks like when it WORKS:

  ftp> Connected to MY400.ABC.corp.
  open MY400
  220-QTCP at MY400.
  220 Connection will close if idle more than 5 minutes.
  ftp> Username user
  myuser
  331 Enter password.
  230 MYUSER logged on.
  ftp> ftp>
  append "C:\Program Files\WPN\pfile.txt" MYLIB/PFILE
  200 PORT subcommand request successful.              
  150 Sending file to member PFILE in file PFILE in library MYLIB.
  250 File transfer completed successfully.
  ftp: 133 bytes sent in 0.00Seconds 133000.00Kbytes/sec.
  ftp> quit
  221 QUIT subcommand received.

When it fails, it just hangs on the 11th line and never comes back.  The session then looks like this:

  ftp> Connected to MY400.ABC.corp.
  open MY400
  220-QTCP at MY400.
  220 Connection will close if idle more than 5 minutes.
  ftp> Username user
  myuser
  331 Enter password.
  230 MYUSER logged on.
  ftp> ftp>
  append "C:\Program Files\WPN\pfile.txt" MYLIB/PFILE
  200 PORT subcommand request successful.              


I have been looking all over for the cause of this.  I am unable to find anything in the AS400 "QTCP" Joblogs.
The session obvoiusly gets connected and signed on.  The "Append" command returns the "200 PORT subcommand request successful", which implies to me that the a valid port was found and the request was sent down it.

We have hundreds of users executing this script each day.  Since the V5R2 upgrade, most of these conversations are now hanging up.

Any Ideas?


0
Comment
Question by:denniskroenke
  • 2
4 Comments
 
LVL 13

Expert Comment

by:_b_h
ID: 16545985
FTP uses port 21 for control and port 20 for the actual data transfer; it looks like port 20 is the issue. I will do some digging.
Barry
0
 
LVL 13

Accepted Solution

by:
_b_h earned 2000 total points
ID: 16546491
Dennis,
After a control connection is made, the data connection occurs on a random port when using passive mode. Try switching to port mode by issuing SENDPASV 0 which will use port 20 for the data transfer.
For more info on passive and port modes, see
http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/fdeb011a2e6f53f4862569b60068b585?OpenDocument

Barry
0
 
LVL 27

Expert Comment

by:tliotta
ID: 16611083
Any progress? You might try STRCMNTRC for TCP/IP (if you have authority) and see if the data connection works from the AS/400. Review NETSTAT *CNN while connections are being established, both working and failing. Maybe software firewalls on the PCs are blocking ranges of ports and your ephemeral ports have moved to a new range since the upgrade.

Barry seems to have the best direction concerning how data connections actually work. That's where to research.

Tom
0
 

Author Comment

by:denniskroenke
ID: 16735778
Thank you.  After looking deeper at the traffic on PORT-20, I believe that this is now resolved.
This task can now be closed.

Thank you again for the valuable insight into this problem!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Currently, there is an issue with being able to copy values from an external application to a dropdown list in Project Web Access (PWA).  The standard copy and paste methods don't seem to work properly. Here is a way to accomplish this task to s…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question