[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Ftpapi Digest, Vol 74, Issue 16
Below is the requested job log from the SIZE issue that I'm having.
Data area RETURNCODE created in library QTEMP.
0: FTPAPI version 2.2 released on 2005-09-20
0: 220-Microsoft FTP Service
0: 220 Hey Get OUT!!!!
0: > USER anonymous
0: 331 Anonymous access allowed, send identity (e-mail name) as
password.
0: > PASS
**********
0: 230-Welcome,
NOT!!!
0: 230 Anonymous user logged
in.
0: > SITE NAMEFMT
1
0: 500 'SITE NAMEFMT 1': command not
understood
0: > TYPE
I
0: 200 Type set to
I.
0: > SIZE /00000010000007009747180009010910909.pdf
0: 421 Timeout (120 seconds): closing control
connection.
0: > TYPE
I
0: 421 Terminating
connection.
0: >
QUIT
You are correct that the error does not occur when the send is done for
the SIZE command.
It's when the program trys to receive the response.
> * 213 <byte size>
> c evalwwReply = Reply(peSession: wwMsg)
This is when I receive the time out.
I manually tried to use the SIZE command and I get the error that it's
not supported.
See Below:
Connecting to remote host 192.168.105.4 using port 21.
220-Microsoft FTP Service
220 Hey Get OUT!!!!
anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
230-Welcome, NOT!!!
230 Anonymous user logged in.
Windows_NT
SIZE /00000010000007009747180009010910909.pdf
Subcommand 'SIZE' not valid.
For a list of available FTP subcommands, enter subcommand HELP.
*** How to recreate this I'm not sure w/o getting you access to this
system.
I've never seen this before. Let me know if you want me to try and get
permission for you to get on this system.
Also reading your previous response it sounds like I should be able to
bypass the SIZE request and the FTP process should still work.
Is this correct?
Thanks again for your help.
Dan
>
----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 13 Dec 2012 10:53:02 -0500
> From: Dan Dan <qmagic101@xxxxxxxxxxx>
> To: <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Need Help with FTP API - Getting error with SIZE
> Message-ID: <SNT127-W25E059466F085CA7EFB52BEF4E0@xxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
>
> I'm trying to do a Get Command, the file that I need is on a Windows
> FTP server.
>
> Now that I'm trying to GET the PDF file that I placed on the server
it
> fails.
> I've tracked the issue down to the point that a send is done
requesting
> the SIZE of the file.
> *Change to Binary Mode
> c callp ftp_binaryMode(sess: *on)
> *Change Name Format to 1
> c callp ftp_NamFmt(sess: 1)
> * Get the Requested file
> c if ftp_get(sess: SendFrom:SendTo)<0
>
> SendFrom= /00000010000007009747180009010910909.pdf
> SendTo = /pdf/00000010000007009747180009010910909.pdf
>
> Looks like all goes well until the SIZE is requested
>
> * get total number of bytes to receive
> c eval wkTotBytes = FTP_size(peSocket :
> c peRemote )
>
>
> * send size command:
> c if SendLine(wkSocket: 'SIZE ' + peFile)<0
> c return -1
> c endif
>
> * 213 <byte size>
> c eval wwReply = Reply(peSession: wwMsg)
>
> ***** Connection Times out while waiting on response ****
>
> ***** What was sent in SendLine ***** = SIZE
> /00000010000007009747180009010910909.pdf
>
>
> NOTES:
> 1) I'm currently using this same API to do a PUT from the AS400 to
this
> Windows FTP server w/o any issues.
> 2) I used FTP on the AS400 and was able to transfer this file from
the
> Windows FTP server to the IFS on the AS400.
> 3) I issue the BIN and NA 1 commands before I request the GET. They
> apear to work.
>
> Thanks in advance for any help you can supply.
> Dan
>
> ------------------------------
>
> Message: 2
> Date: Thu, 13 Dec 2012 14:15:57 -0600
> From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
> To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: Need Help with FTP API - Getting error with SIZE
> Message-ID: <50CA377D.2030508@xxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hello Dan,
>
> The 'SIZE' command is not available in all FTP implementations, it's
an
> extension to the protocol. The only way FTPAPI can tell whether the
> server supports (or doesn't support) SIZE is by sending the command,
and
> checking the response to see if it's supported. And that's what it
does.
>
> It sends SIZE, and if it's unsupported it ignores the error and
> continues. I can't see why you'd get a timeout error here...
>
> Please generate a session log. You do that by adding FTP_log(*on) to
> your progam, just before you connect to the server. Then look at the
> output of the log (which is in your job log) and I think you'll see
that
> the timeout is occuring on RETR rather than SIZE. At least, that
would
> be my guess...
>
> If it's not, and you're truly getting the error on the SIZE command
then
> please tell me how to reproduce the problem, as I've never seen that
> happen, and can't do anything about fixing it if I can't reproduce
it.
>
> -SK
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------