4

The problem is: Nexus-maven-repository-index.zip downloads at 10kbps and maven eclipse:eclipse artifact download stops / pauses. I'm not behind any proxy.

EDIT: This is caused by AVG Link Scanner, same issue as in Maven failing to download jar dependencies

I guess I've got some serious issues with my maven installation / network connection.

Here's what I do and what I get:

  1. I've been trying to use m2eclipse, but downloading the file http://mirrors.ibiblio.org/pub/mirrors/maven2/dot-index/nexus-maven-repository-index.zip via eclipse after some time time-outs. I've tried to get the file via wget, and what I see is that the download speed is 11kbps. Is this some kind of a policy? It seems pretty stable at this 11kbps. I've got such an amazing speed for a week now, so it's not a temporary issue. If that's a policy and regular speed for everybody - fine. I won't use m2eclipse, no problem.

  2. I've resigned from using m2eclipse, and I'm using the maven-eclipse-plugin. No, wait - I'm not. Here's what happens when I call mvn eclipse:eclipse:

  3. The artifact download hangs after a while, randomly. Then I hit ^C, run the command again, and the donwload resumes, then hangs again, sometimes at the same artifact, somtimes I get a tiny step further. I've run mvn in debug mode, and it always hangs in the same place, stacktrace below. The same with the uk repo.

What's going on? Thanks for any help, I'm totally lost. I'd assume my internet connection is a mess, but it works really fine (apart from maven). I feel like blakclisted by the maven repo.

Any ideas?

Important details follow:

Here's how I run maven (with any threads number the same happens)

mvnDebug eclipse:eclipse -DdownloadSources=true -Dmaven.artifact.threads=1

Here's my maven version (The same happens with the latest maven 2 version):

$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\apache-maven-3.0.4
Java version: 1.7.0_04, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_04\jre
Default locale: pl_PL, platform encoding: Cp1250
OS name: "windows vista", version: "6.0", arch: "x86", family: "windows"

Here's the stacktrace where maven eclipse:eclipse hangs (looks like an network issue, but why?):

java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) line: not available [native method]   
java.net.SocketInputStream.read(byte[], int, int, int) line: 150    
java.net.SocketInputStream.read(byte[], int, int) line: 121 
org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer(org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer).fillBuffer() line: 149  
org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer.fillBuffer() line: 110   
org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer(org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer).read(byte[], int, int) line: 195    
org.apache.maven.wagon.providers.http.httpclient.impl.io.ChunkedInputStream.read(byte[], int, int) line: 173    
org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputStream.read(byte[], int, int) line: 138 
java.util.zip.GZIPInputStream(java.util.zip.InflaterInputStream).fill() line: 238   
java.util.zip.GZIPInputStream(java.util.zip.InflaterInputStream).read(byte[], int, int) line: 158   
java.util.zip.GZIPInputStream.read(byte[], int, int) line: 116  
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).transfer(org.apache.maven.wagon.resource.Resource, java.io.InputStream, java.io.OutputStream, int, int) line: 493 
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.OutputStream, java.io.InputStream, boolean, int) line: 339  
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.File, java.io.InputStream, boolean, int) line: 310  
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.File, java.io.InputStream) line: 287    
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.StreamWagon).getIfNewer(java.lang.String, java.io.File, long) line: 97   
org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.StreamWagon).get(java.lang.String, java.io.File) line: 61    
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask<T>.run() line: 601 
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run() line: 60    
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$1.execute(java.lang.Runnable) line: 192    
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(java.util.Collection<? extends org.sonatype.aether.spi.connector.ArtifactDownload>, java.util.Collection<? extends org.sonatype.aether.spi.connector.MetadataDownload>) line: 445  
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(org.sonatype.aether.RepositorySystemSession, java.util.Collection<? extends org.sonatype.aether.resolution.ArtifactRequest>) line: 457    
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(org.sonatype.aether.RepositorySystemSession, java.util.Collection<? extends org.sonatype.aether.resolution.ArtifactRequest>) line: 216   
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactRequest) line: 193    
org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactRequest) line: 286    
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.sonatype.aether.RepositorySystemSession) line: 213  
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.wagon.events.TransferListener) line: 157  
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.apache.maven.artifact.repository.ArtifactRepository) line: 525  
org.apache.maven.plugin.ide.IdeUtils.resolveArtifact(org.apache.maven.artifact.resolver.ArtifactResolver, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.plugin.logging.Log) line: 442   
org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).resolveDependenciesWithClassifier(org.apache.maven.plugin.ide.IdeDependency[], java.lang.String, boolean) line: 990   
org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).resolveSourceAndJavadocArtifacts(org.apache.maven.plugin.ide.IdeDependency[]) line: 918   
org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).execute() line: 509   
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution) line: 101 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution, org.apache.maven.lifecycle.internal.ProjectIndex, org.apache.maven.lifecycle.internal.DependencyContext) line: 209 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution, org.apache.maven.lifecycle.internal.ProjectIndex, org.apache.maven.lifecycle.internal.DependencyContext, org.apache.maven.lifecycle.internal.PhaseRecorder) line: 153  
org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, java.util.List<org.apache.maven.plugin.MojoExecution>, org.apache.maven.lifecycle.internal.ProjectIndex) line: 145    
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(org.apache.maven.execution.MavenSession, org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.project.MavenProject, org.apache.maven.lifecycle.internal.TaskSegment) line: 84  
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.project.MavenProject, org.apache.maven.lifecycle.internal.TaskSegment) line: 59   
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.lifecycle.internal.ProjectBuildList, java.util.List<org.apache.maven.lifecycle.internal.TaskSegment>, org.apache.maven.lifecycle.internal.ReactorBuildStatus) line: 183  
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(org.apache.maven.execution.MavenSession) line: 161 
org.apache.maven.DefaultMaven.doExecute(org.apache.maven.execution.MavenExecutionRequest) line: 320 
org.apache.maven.DefaultMaven.execute(org.apache.maven.execution.MavenExecutionRequest) line: 156   
org.apache.maven.cli.MavenCli.execute(org.apache.maven.cli.MavenCli$CliRequest) line: 537   
org.apache.maven.cli.MavenCli.doMain(org.apache.maven.cli.MavenCli$CliRequest) line: 196    
org.apache.maven.cli.MavenCli.main(java.lang.String[], org.codehaus.plexus.classworlds.ClassWorld) line: 141    
sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]    
sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 57  
sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 43  
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 601    
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(java.lang.String[]) line: 290  
org.codehaus.plexus.classworlds.launcher.Launcher.launch(java.lang.String[]) line: 230  
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(java.lang.String[]) line: 409    
org.codehaus.plexus.classworlds.launcher.Launcher.main(java.lang.String[]) line: 352    

Thanks for any hints.

Kornel

Community
  • 1
  • 1
CatInABox
  • 387
  • 2
  • 4
  • 12
  • Can you download the file with a browser with higher speed? – Behe May 07 '12 at 22:44
  • Yes, I've tried downloading manually (browser) while maven couldnt resume the donwload. The web browser downloads just fine. But it's not a specific artifcat I'm having trouble with (maven hangs randomly, after ^C and resuming chacnces are, it will hang on the next file) – CatInABox May 08 '12 at 05:31
  • I tried to download the file you mentioned, the speed is **very slow**. This does not seem to be a problem with m2eclipse but eventually with their server(s)? Can you provide a part of your pom that shows the error? I could try to reproduce the behavior. – Behe May 15 '12 at 09:11
  • The index file is not that important, let's just assume its download speed is limited. Imported are the dependencies - they won't download properly. I've booted ubuntu from a pendrive, installed maven3 and jdk7 and ... everything is fine. My next step is to set the repo directory, under windows, to a pendrive and see if that works (maybe it's an hdd issue?) – CatInABox May 27 '12 at 14:28
  • Try IRC on irc.codehaus.org in #maven the admins hang out there (re 'central' server issue). I think maybe there is a fail2ban like policy in place. To fix this problem consider setting up a local Nexus http://www.sonatype.org/nexus/go server the free open-source version. Then setup a Proxy to central (and all other exteral repos you use). Then reconfigure all your projects to use it instead of central direct. You will find Eclipse will be much faster to use with m2eclipse. – Darryl Miles Sep 18 '12 at 00:18

1 Answers1

1

Two quick pieces of advice:

  • Don't use ibiblio, the canonical Maven repository is http://repo1.maven.org/maven2 - it is maintained by Sonatype and it is now served off of a global CDN. You shouldn't be having any speed issues downloading the index.

  • Consider putting a repository manager between you and the public repository. You'll often find that performance will improve because of this... remarkably.

Don't bother downloading with wget, it won't help you. In fact, you might see slower download times because you are trying to use wget. My strongest recommendation is to use a repository manager: either Nexus or Artifactory.

Tim O'Brien
  • 9,623
  • 5
  • 30
  • 36