Community
Participate
Working Groups
Starten a maven build from within eclipse consequently fails because of connection timeouts. The connection timeouts every repository (even the official maven one). About 20% to 40% of connections will fail. Meaning that some connects are succeeding within the same build. Looking at the server logs says that there is never ever a connection on server side. So the client itself refues to connect. This matches IMHO the trace I got while debugging (It seems to fail creating a local loopback connection). I am using the following m3e: m2e - Extensions Development Support (Optional) 1.0.100.20110804-1717 org.eclipse.m2e.sdk.feature.feature.group Eclipse.org - m2e I am using 64bit JVM (Windows x86) 1.6.0_u20 and 1.6.0u29 (same behaviour). I am using Avira professional. While starting the same maven command from cli there are no problems at all. [DEBUG] Writing resolution tracking file C:\Users\mepeisen\.m2\repository\org\apache\maven\plugins\maven-deploy-plugin\resolver-status.properties [DEBUG] onThrowable java.net.ConnectException: Failed to create a selector. to http://npw-repos.bghosting.de/snapshots/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:83) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:857) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:731) at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:484) at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.run(AsyncRepositoryConnector.java:771) at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:260) at org.sonatype.aether.impl.internal.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:567) at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.jboss.netty.channel.ChannelException: Failed to create a selector. at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.register(NioClientSocketPipelineSink.java:190) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:153) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:60) at org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:82) at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:114) at org.jboss.netty.channel.Channels.connect(Channels.java:541) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:218) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:836) ... 9 more Caused by: java.io.IOException: Unable to establish loopback connection at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106) at java.security.AccessController.doPrivileged(Native Method) at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122) at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27) at java.nio.channels.Pipe.open(Pipe.java:133) at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104) at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26) at java.nio.channels.Selector.open(Selector.java:209) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.register(NioClientSocketPipelineSink.java:188) ... 19 more Caused by: java.net.ConnectException: Connection refused: connect at sun.nio.ch.Net.connect(Native Method) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507) at java.nio.channels.SocketChannel.open(SocketChannel.java:146) at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78) ... 27 more
According to the log you provided, m2e gets connection refused. Since some connections do get through, I highly doubt the problem has anything to do with m2e. Disable your antivirus and firewall to see this makes the problem go away.
Did not find a way to make the problem go away. Debugging eclipse shows up a bug amount of this exception. They are also explaining why eclipse for me seems to have problems on reindexing sometimes. Note: On command line I never run into this problem. So it must be something related to eclipse itself or the firewall dislikes the way eclipse behaves. However deactivating the firewall did not help.Maybe it is even a windows firewall problem? I have at least about 10 repositories configured in settings.xml. Maybe this causes m2e to create to much connections? Or maybe it is related to netty itself. I found some info: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5073504 Asking google it seems to be a windows related problem if there are too many connections opened and not gracefully closed. In the whole firewall log there is no hint that the firewall dropped the connections. It does not complain f.e. about flooding or other things.
I wish we could help, but the problem seems to be related to your specific environment, so even if there is a bug in m2e and/or one of its components, there is nothing we can do about it unless you provide us with a way to reproduce the problem or, better yet, with a quality patch.
Closing old/stale bugreports.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/