FTP Session from PC into AS400 hangs up on append statement

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?


denniskroenkeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_b_hCommented:
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
_b_hCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tliottaCommented:
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
denniskroenkeAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.