Are you using strictly IP v6 addresses? If so, have you got it to work using IPv4?
In either case, you might want to check if the ports are bound by running the netstat command. Make sure the IP/Port combination is in LISTENING state. You might want to try connecting to it using telnet client to see if you can establish the connection. If that works, then you can dig deeper into why SFTP is not working. Hope this helps. Sai. On Mon, Jul 16, 2012 at 8:35 AM, BRESCIANI, MARCO (MARCO) < [email protected]> wrote: > Self-reply: it's a PC issue since it seems working on another PC without > fancy firewalls. :) > FTP server runs and connects, SFTP server runs but can't connect (e.g.: > filezilla). Ideas? Seems like a connection refused. But I don't see any > trace in the logs (neither mine nor apache things). > > > MARCO BRESCIANI > ALCATEL-LUCENT > SENIOR SW CRAFT TERMINAL DEVELOPMENT ENG > NETWORKS – IP DIVISION > WT PRODUCT UNIT > via Trento, 30 – 20059 Vimercate (MB) – Italy > Phone: +39 039 686 6279 > Fax: +39 039 686 5600 > [email protected] > > > -----Original Message----- > > From: BRESCIANI, MARCO (MARCO) [mailto:marco.bresciani@alcatel- > > lucent.com] > > Sent: Monday, July 16, 2012 12:56 PM > > To: [email protected] > > Subject: RE: IPv6 and IPv4 (s)ftp servers > > > > Hi all, > > I've tried following your suggestions and installed Java 7 (u5), 32 > > bit and I'm now receiving "strange" exceptions... any suggestion or > > idea? I've even used the security JVM parameters (- > > Djava.security.policy=java.policy). Am I missing something? Could it be > > a firewall on PC? > > > > > > - 2012-07-16 12:49:00,341 - ERROR - o.a.m.c.s.SimpleIoProcessorPool - > > Failed to create a new instance of > > org.apache.mina.transport.socket.nio.NioProcessor:null - > > java.lang.reflect.InvocationTargetException: null > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > at > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor > > AccessorImpl.java:57) > > at > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon > > structorAccessorImpl.java:45) > > at > > java.lang.reflect.Constructor.newInstance(Constructor.java:525) > > at > > org.apache.mina.core.service.SimpleIoProcessorPool.<init>(SimpleIoProce > > ssorPool.java:180) > > at > > org.apache.mina.core.service.SimpleIoProcessorPool.<init>(SimpleIoProce > > ssorPool.java:123) > > at > > org.apache.mina.core.polling.AbstractPollingIoAcceptor.<init>(AbstractP > > ollingIoAcceptor.java:132) > > at > > org.apache.mina.transport.socket.nio.NioSocketAcceptor.<init>(NioSocket > > Acceptor.java:73) > > at > > org.apache.ftpserver.listener.nio.NioListener.start(NioListener.java:11 > > 9) > > at > > org.apache.ftpserver.impl.DefaultFtpServer.start(DefaultFtpServer.java: > > 80) > > at > > com.alu.ipd.wtpu.ftpserver.rfc959.Rfc959.start(Rfc959.java:216) > > at > > com.alu.ipd.wtpu.ftpserver.rfc959.Rfc959Runnable.run(Rfc959Runnable.jav > > a:48) > > at java.lang.Thread.run(Thread.java:722) > > Caused by: org.apache.mina.core.RuntimeIoException: Failed to open a > > selector. > > at > > org.apache.mina.transport.socket.nio.NioProcessor.<init>(NioProcessor.j > > ava:61) > > ... 13 common frames omitted > > Caused by: java.io.IOException: Unable to establish loopback connection > > at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125) > > at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69) > > at java.security.AccessController.doPrivileged(Native Method) > > at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141) > > at > > sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50) > > at java.nio.channels.Pipe.open(Pipe.java:150) > > at > > sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:126) > > at > > sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider > > .java:44) > > at java.nio.channels.Selector.open(Selector.java:227) > > at > > org.apache.mina.transport.socket.nio.NioProcessor.<init>(NioProcessor.j > > ava:59) > > ... 13 common frames omitted > > Caused by: java.net.SocketException: Permission denied: connect > > at sun.nio.ch.Net.connect0(Native Method) > > at sun.nio.ch.Net.connect(Net.java:364) > > at sun.nio.ch.Net.connect(Net.java:356) > > at > > sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:623) > > at java.nio.channels.SocketChannel.open(SocketChannel.java:184) > > at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97) > > ... 22 common frames omitted > > > > > > > > > > > > > > > > > > MARCO BRESCIANI > > ALCATEL-LUCENT > > SENIOR SW CRAFT TERMINAL DEVELOPMENT ENG > > NETWORKS – IP DIVISION > > WT PRODUCT UNIT > > via Trento, 30 – 20059 Vimercate (MB) – Italy > > Phone: +39 039 686 6279 > > Fax: +39 039 686 5600 > > [email protected] > > > > > > > -----Original Message----- > > > From: Sai Pullabhotla [mailto:[email protected]] > > > Sent: Friday, July 13, 2012 6:31 PM > > > To: [email protected] > > > Subject: Re: IPv6 and IPv4 (s)ftp servers > > > > > > I believe IPv6 support in NIO is added to Java 7 only. So it won't > > work > > > in > > > Java 6. > > > > > > Please feel free to correct me if I'm wrong. > > > > > > Regards, > > > Sai. > > > > > > On Fri, Jul 13, 2012 at 9:32 AM, BRESCIANI, MARCO (MARCO) < > > > [email protected]> wrote: > > > > > > > Hi all, > > > > I'm getting crazy with running SSHD on a Win7 64bit PC, with JVM > > > 6u33 > > > > 64bit. > > > > > > > > I'm actually not (yet) sure if it's a problem on my PC (right after > > > this > > > > email > > > > I'll ask colleagues to check on theirs) but this is the situation: > > > > > > > > I've configured and ran the SSHD and Apache FtpServer on my PC, on > > > the > > > > usual > > > > 22 and 21 ports with no issues. It seems, anyway, that I cannot > > reach > > > those > > > > servers through IPv6 networking, not even from my PC itself! > > > > I can use [::1] or localhost and they work even by disabling the > > > Windows > > > > IPv4 stack; anyway, using my whole IPv6 address it does not work. > > > > > > > > It there something I miss? Here below, a brief copy-paste of > > > meaningful > > > > code > > > > (more or less similar for FtpServer: > > > > > > > > > > > > this.sshServer = SshServer.setUpDefaultServer(); > > > > this.sshServer.setPort(SFtp.PORT); > > > > this.sshServer.setReuseAddress(true); > > > > > > > > if (SecurityUtils.isBouncyCastleRegistered()) { > > > > this.sshServer.setKeyPairProvider(new > > > > PEMGeneratorHostKeyProvider(keyGen, > > > > "RSA", 2048)); > > > > } else { > > > > this.sshServer.setKeyPairProvider(new FileKeyPairProvider(new > > > String[] > > > > { > > > > keyGen })); > > > > } > > > > > > > > this.sshServer.setPasswordAuthenticator(new > > > > CustomPasswordAuthenticator(this.username, this.password)); > > > > > > > > > > > > > > > > > this.sshServer.setSubsystemFactories(Collections.<NamedFactory<Command> > > > >singletonList(new > > > > SftpSubsystem.Factory())); > > > > > > > > this.sshServer.setFileSystemFactory(new > > > > CustomFileSystemFactory(SFtp.USER_HOME)); > > > > > > > > this.sshServer.start(); > > > > >
