FAQGeneral
My server fails with java.net.SocketException: Too many files openNetwork sockets are treated like files and your operating system has a limit to the number of file handles it can manage. Running out of file handles is usually due to a large number of clients connecting and disconnecting frequently. As specified by TCP, after being closed sockets remain in the TIME_WAIT state for some additional time. The reason is to ensure that delayed packets arrive on the correct socket. In Windows, the default TIME_WAIT timeout is 4 minutes, in Linux it is 60 seconds. Change the timeout in Windows
Change the timeout in Linux
How can I add other language translations?First you need to specify your language name in config.message.languages configuration parameter. Then if you start the FTP server UI, you will see your language entry in the message panel. Translate messages and finally save your translated messages. We are always interested in adding more translations to the official distribution of FtpServer. If you produce a translation and can contribute it back to the project, please create a new JIRA issue so that we can add it to the core product. How can I send binary data stored in a database when the FTP Server gets the RETR command?You can write your own ftplet to do this. The following code will clarify this. public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpReplyOutput response) throws FtpException, IOException { String requestedFile = request.getArgument(); // get input stream from database - BLOB data InputStream in = getInputStreamFromDatabase(requestedFile); if (in == null) { response.write(new DefaultFtpReply(550, "Cannot find data " + requestedFile)); return FtpletEnum.RET_SKIP; } // open data connection DataConnection out = null; response.write(new DefaultFtpReply(150, "Getting data connection.")); try { out = session.getDataConnection().openConnection(); } catch (Exception ex) { } if (out == null) { response.write(new DefaultFtpReply(425, "Cannot open data connection.")); return FtpletEnum.RET_SKIP; } // transfer data try { out.transferToClient(in); response.write(new DefaultFtpReply(226, "Data transfer okay.")); } catch (Exception ex) { response.write(new DefaultFtpReply(551, "Data transfer failed.")); } finally { session.getDataConnection().closeDataConnection(); in.close(); } return FtpletEnum.RET_SKIP; } Why I am getting ClassNotFoundException when I am trying to use database based user manager?JDBC driver Jar file should be in CLASSPATH or it has to be copied in the INSTALL_DIR/common/lib directory. Did you specify fully qualified JDBC driver class name in config.user-manager.jdbc-driver configuration parameter? I am unable to run FtpServer on top of Glassfish although it is running correctly over tomcat.This can be caused by Glassfish's QuickStartup mode which was the default one in some versions. In order to disable quick startup, add the following line to your domain.xml file: com.sun.enterprise.server.ss.ASQuickStartup=false |