KB Article #178113

"Exception caught, closing session" Error Message

Problem

The following symptoms may be observed in your SecureTransport server:


The error message


Exception caught, closing session


is recorded in the Server Log logged by the FTPD component. The error message can appear at regular intervals or sporadically. Sometimes it may be logged only during specific times of the day or at completely random moments.


Resolution

Our case studies show that this error message occurs when the connecting FTP client closes the TCP connection with a FIN packet right after issuing the QUIT command and without waiting for the 221 Goodbye message from the server.


Having the connection to the ST FTP server half-closed, some FTP clients are set to refuse any further input from the server other than a FIN packet to close the connection completely.


One such client is the cURL software when used in FTP with SSL mode. After sending its FIN packet, cURL sends RST packets as a response to each packet received from the ST FTP server. This is an incorrect behavior by the FTP client and can sometimes result in the above error message.


While the nature of this error message is harmless by itself, ideally, customers receiving it are advised to use different FTP clients after identifying the source of the client connections resulting in the error message.