tags:

views:

1090

answers:

2

Hi,

In one of our project we are using Apache's FTP client APIs. I have to upload xml file to a FTP server, where a process will keep polling that server directory. So using the upload API, I am uploading the xml file with .TRANSFER extension, and after successfully uploading full file, the file will be renamed to .xml file.

The weird problem I am facing was that, sometimes the file size of the file is 0 bytes. but the same file sometimes fully gets uploaded. When I looked at log file, the transfered bytes are 0 kb only. So I am not sure what could be the problem.

I am using linux server and Apache's commons's FTP client APIs.

Any debugging tips and tricks will be helpful.

Regards, Srinivas

A: 

Try running WireShark and see what is going across the wire? That might give you a clue as to where the problem lies.

http://www.wireshark.org/

the.jxc
A: 

If it happens sometimes, it smells like a firewall configuration on one of the ends. Hard to diagnose, but start (if you can) try switching between active/passive.

Look here for a better reference: http://slacksite.com/other/ftp.html

nikudesu