Hello to everybody!
I have a big problem with the enterprisedt ftp.
I have a customer with a data transfer batch application which was running smooth
since 4.5 years without any trouble. The data is transfered to another company via internet,
both systems are protected by firewalls of course. On the day when the trouble starts my customer
had a system crash due to power failure and the data receiving company restarted their firewall due to unknown reasons.
Heres the code snippet which throws an exception
FTPClient ftp = new FTPClient();
StringBufferInputStream bufStream = new StringBufferInputStream(buf);
ftp.setRemoteHost(Main.FtpHost);
FTPMessageCollector listener = new FTPMessageCollector();
ftp.setMessageListener(listener);
ftp.setConnectMode(FTPConnectMode.ACTIVE);
ftp.connect();
ftp.login(Main.FtpUser, Main.FtpPasswd);
ftp.setType(FTPTransferType.ASCII);
if (!Main.FtpDir.equals("")) {
ftp.chdir(Main.FtpDir);
};
ftp.put(bufStream, fileName);
ftp.quit();
A 'java.net.SocketException: Connection reset' is thrown by ftp.quit.
The upload seems to be ok (!!), but unfortunally the exception causes a database rollback .
I have tested the application with another ftp-server and everything works !!!
It is very interisting that from the unix shell of the sending machine the ftp to the same adress works well.
Does anyone have an idea what could cause an exception at this point, especially firewall related?
How can ftp.quit() throw an exception ??
Thank you
Volker