Removing the ftplet worked. I was using it because I would like to capture the output of the server to display in a status window and could not figure out another way. Is there a better way to do that?
Thanks, TRAVIS BOWEN Staff Software Engineer IBM Systems & Technology Group, Client Enablement & Systems Assurance Phone: 520-799-4612 | Mobile: 520-975-1526 IBM E-mail: tbo...@us.ibm.com 9000 S Rita Rd Tucson, AZ 85744-0002 United States From: David Latorre <dvl...@gmail.com> To: ftpserver-users@mina.apache.org, Date: 05/22/2013 07:55 AM Subject: Re: No users can connect, no error. If you cannot debug the code, remove your FTPLet , set the debug level to DEBUG and try and connect from a remote client while monitoring the connection with wireshark. 2013/5/22 John Hartnup <john.hart...@gmail.com>: > It looks as if the socket is being closed, and not by the server. > Therefore, either the client or a firewall. To be absolutely sure of this, > use something like Wireshark to trace the TCP packets -- find out which end > closes the socket, and whether it's a FIN or a RST. > > Or you could attach a debugger to the server's Java process and step > through the login process. > >> I don't think it is a firewall issue as I would expect the client to not > even be able to connect to the server. It seems to connect then >> the server closes the connection immediately. > > Some firewalls do "stateful protocol analysis" of FTP. That is, they look > at the content and make decisions based on it, for example they allow > sockets to open on ports that they've seen in PORT and PASV commands. Some > of these firewalls can be configured to decline anonymous FTP, and that > would be consistent with your original report: firewall allows socket > connection; firewall sees USER command with parameter "anonymous", and > closes the socket as a result. However, if you get the same result with > admin/admin, that's less likely to be the reason. > > > > > On 21 May 2013 21:17, Travis Bowen <tbo...@us.ibm.com> wrote: > >> I am trying to connect from the same computer using the filezilla client. >> I have tried the default users.properties from the 1.0.6 distribution with >> both ClearTextPasswordEncryptor and SaltedPasswordEncryptor and both >> anonymous and admin/admin show the same results. >> >> I don't think it is a firewall issue as I would expect the client to not >> even be able to connect to the server. It seems to connect then the server >> closes the connection immediately. >> >> >> Thanks, >> >> *TRAVIS BOWEN * >> Staff Software Engineer >> IBM Systems & Technology Group, Client Enablement & Systems Assurance >> [image: Inactive hide details for John Hartnup ---05/21/2013 01:02:22 >> PM---This like the work of a firewall rejecting anonymous Ftp. Yo]John >> Hartnup ---05/21/2013 01:02:22 PM---This like the work of a firewall >> rejecting anonymous Ftp. You could verify this by trying to log in >> >> From: John Hartnup <john.hart...@gmail.com> >> To: ftpserver-users@mina.apache.org, >> Date: 05/21/2013 01:02 PM >> Subject: Re: No users can connect, no error. >> ------------------------------ >> >> >> >> This like the work of a firewall rejecting anonymous Ftp. You could verify >> this by trying to log in from a client on the same system as the server, or >> by changing the configuration to use a username other than "anonymous". >> On 21 May 2013 20:28, "Travis Bowen" <tbo...@us.ibm.com> wrote: >> >> > First I'd like to thank you for providing this software. >> > >> > However, the documentation is somewhat lacking. I've spent several hours >> > just trying to get the embedded version to accept user logins. >> > >> > Here is the code I am using (drawn from the quickstart docs and other >> > sources): >> > >> > FtpServerFactory serverFactory = *new* FtpServerFactory(); >> > ListenerFactory listenerFactory = *new* ListenerFactory(); >> >> > >> > // set the port of the listener >> > listenerFactory.setPort(*props*.getFtpPortProperty()); >> >> > Listener listener = listenerFactory.createListener(); >> > >> > // replace the default listener >> > serverFactory.addListener("default", listener); >> > >> > Map<String, Ftplet> ftpletMap = *new* HashMap<String, Ftplet> (); >> > ftpletMap.put("IBMFtplet", *new* IBMFtplet(*this*)); >> > >> > serverFactory.setFtplets(ftpletMap); >> > >> > ConnectionConfigFactory connectionConfigFactory = *new* >> > ConnectionConfigFactory(); >> > connectionConfigFactory.setAnonymousLoginEnabled(*true*); >> > >> > >> > >> serverFactory.setConnectionConfig (connectionConfigFactory.createConnectionConfig()); >> > >> > PropertiesUserManagerFactory userManagerFactory = *new* >> > PropertiesUserManagerFactory(); >> > userManagerFactory.setFile(*new* File("users.properties")); >> > userManagerFactory.setPasswordEncryptor(*new* >> >> > ClearTextPasswordEncryptor()); >> > UserManager userManager = userManagerFactory.createUserManager (); >> > >> > UserFactory userFactory = *new* UserFactory(); >> >> > userFactory.setName("anonymous"); >> > userFactory.setPassword(""); >> > userFactory.setHomeDirectory("/tmp"); >> > >> > List<Authority> auths = *new* ArrayList<Authority>(); >> > Authority auth = *new* WritePermission(); >> >> > auths.add(auth); >> > userFactory.setAuthorities(auths); >> > >> > User user = userFactory.createUser(); >> > >> > userManager.save(user); >> > serverFactory.setUserManager(userManager); >> > >> > // start the server >> > FtpServer server = serverFactory.createServer(); >> > >> > server.start(); >> > >> > Here is the output: >> > >> > [NioProcessor-3] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CREATED >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > [NioProcessor-4] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> - >> > CREATED >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > [NioProcessor-5] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> - >> > CREATED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > [NioProcessor-6] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> - >> > CREATED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > [NioProcessor-7] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> - >> > CREATED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > [NioProcessor-8] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> - >> > CREATED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - OPENED >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - SENT: 220 Service ready for new user. >> > >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - RECEIVED: USER anonymous >> > [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter >> > - CLOSED >> > >> > here is the users.properties file: >> > >> > #Generated file - don't edit (please) >> > #Tue May 21 10:08:40 MST 2013 >> > ftpserver.user.anonymous.writepermission=true >> > ftpserver.user.anonymous.idletime=0 >> > ftpserver.user.anonymous.userpassword= >> > ftpserver.user.anonymous.enableflag=true >> > ftpserver.user.anonymous.homedirectory=/tmp >> > >> > >> > It seems to automatically close the connection for any user (I also tried >> > the default admin/admin). >> > >> > Thanks, >> > >> > *TRAVIS BOWEN * >> >> > Staff Software Engineer >> > IBM Systems & Technology Group, Client Enablement & Systems Assurance >> > >> >> > > > -- > "There is no way to peace; peace is the way"