<h2>Too Many Open Files errors from unterminated FTP connections</h2><br/><div style="overflow-x:auto"><h2>Description</h2> <div>App nodes are rendered off line with "Too Many Open Files" error messages. Cause of the issue appears to be linked to unterminated FTP connections.<br /><br />Example:<br /><br />main,Thread-6956,4 <br />java.net.PlainSocketImpl.socketAccept(Native Method) <br />java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408) <br />java.net.ServerSocket.implAccept(ServerSocket.java:462) <br />java.net.ServerSocket.accept(ServerSocket.java:430) <br />org.ftp4che.FTPConnection.sendPortCommand(FTPConnection.java:858) <br />org.ftp4che.FTPConnection.streamFile(FTPConnection.java:1086) <br />org.ftp4che.FTPConnection.access$0(FTPConnection.java:1062) <br />org.ftp4che.FTPConnection$1$DownStreamingThread.run(FTPConnection.java:1035) <br /><br /><br />Looking in the logs we can see a number of failed attempts at downloading an FTP file, example:<br /><br />----------------<br />java.io.IOException: /glide/nodes/pret004_16519/bin/../tmp/gurle219a17951f21100c974a5160812dc60.tmp size:0<br /> <br />Connection properties:<br />user.password=**********<br />connection.passive=false<br />connection.timeout=10000<br />user.login=ServiceNow<br />connection.port=21<br />connection.type=FTP_CONNECTION<br />connection.host=ftp2.pret.com<br />----------------------<br />331 Password required for servicenow<br />230 Logged on<br />211-Features:<br /> MDTM<br /> REST STREAM<br /> SIZE<br /> MLST type*;size*;modify*;<br /> MLSD<br /> UTF8<br /> CLNT<br /> MFMT<br />211 End<br />215 UNIX emulated by FileZilla<br />200 Type set to I<br />200 Port command successful<br />150 Opening data channel for file transfer.<br /> ( scheduled import job: APIResolvedFTP)<br />-------------------------------------<br /><br />Supposition: We are failing to clean up the connections after a bad connection attempt - over time these grow and eventually we hit the O/S limit and ergo the node effectively fails</div> <h2>Steps to Reproduce</h2> <div> </div> <h2>Workaround</h2> <div>There is no workaround for this Known Error at this time.</div> <div><br /><strong>Related Problem: PRB595004</strong></div></div>