Re: No users can connect, no error.
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 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 > 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" 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 ftpletMap = *new* HashMap(); > > 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 auths = *new* ArrayList(); > > 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:
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 : > 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 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 >> 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" 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 ftpletMap = *new* HashMap(); >> > 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 auths = *new* ArrayList(); >> > 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(); >
Re: No users can connect, no error.
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 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 : > 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 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 >> 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" 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 ftpletMap = *new* HashMap (); >> > ftpletMap.put("IBMFtplet", *new* IBMFtplet(*this*)); >> > >> > serverFactory.setFtplets(ftpletMap); >> > >> > ConnectionConfigFactory connectionConfigFactory = *new* >> > ConnectionConfigFactor
Re: No users can connect, no error.
I would make sure that the ftplet is the actual reason(ie, add the ftplet again and check). You have two options: 1) fix your ftplet if that's enough for you 2) (recommended) use the logging output for your status window. For this, you can parse the log files or use an adequate logging appender / channel El 22/05/2013 17:11, "Travis Bowen" escribió: > 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 * > E-mail:* *tbo...@us.ibm.com** * > [image: IBM] > > 9000 S Rita Rd > Tucson, AZ 85744-0002 > United States > > > [image: Inactive hide details for David Latorre ---05/22/2013 07:55:10 > AM---If you cannot debug the code, remove your FTPLet , set the]David > Latorre ---05/22/2013 07:55:10 AM---If you cannot debug the code, remove > your FTPLet , set the debug level to DEBUG and try and connec > > From: David Latorre > 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 : > > 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 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 > >> 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" 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 de
ftps invalid keystore format
I am trying to use ftps and I am getting invalid keystore format when using jdk6. I have attempted to use my own keytool generated certificate as well as the ftpserver.jks file that is in the Apache FtpServer distribution. Here is the section of code that is failing (pretty much taken directly from documentation on FtpServer page): serverFactory = new FtpServerFactory(); factory = new ListenerFactory(); factory.setPort(2221); // define SSL configuration SslConfigurationFactory ssl = new SslConfigurationFactory(); ssl.setKeystoreFile(new File("ftpserver.jks")); ssl.setKeystorePassword("password"); // set the SSL configuration for the listener factory.setSslConfiguration(ssl.createSslConfiguration()); < fails here factory.setImplicitSsl(true); Any help would be appreciated. Thanks, Matt This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.