25 Replies Last post: Mar 22, 2012 7:50 PM by metyl  
Steve Hickson Newbie 87 posts since
Jan 17, 2007
Currently Being Moderated

Aug 7, 2008 1:20 PM

IOException: Transfer for nexus-maven-repository-index.zip failed

Hi,

 

1) I just updated to build #7935 and still have a same problem:

 

java.io.IOException: Transfer for nexus-maven-repository-index.zip failed; Error transferring file

     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.downloadResource(DefaultIndexUpdater.java:225)

     at org.sonatype.nexus.index.updater.DefaultIndexUpdater$1.invoke(DefaultIndexUpdater.java:73)

     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.run(DefaultIndexUpdater.java:155)

     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:49)

     at org.jetbrains.idea.maven.indices.MavenIndex.updateRemoteContext(MavenIndex.java:294)

     at org.jetbrains.idea.maven.indices.MavenIndex.updateContext(MavenIndex.java:264)

     at org.jetbrains.idea.maven.indices.MavenIndex.update(MavenIndex.java:218)

     at org.jetbrains.idea.maven.indices.MavenIndices.update(MavenIndices.java:115)

     at org.jetbrains.idea.maven.indices.MavenIndicesManager.doUpdateIndices(MavenIndicesManager.java:153)

     at org.jetbrains.idea.maven.indices.MavenIndicesManager.access$000(MavenIndicesManager.java:28)

     at org.jetbrains.idea.maven.indices.MavenIndicesManager$1.run(MavenIndicesManager.java:132)

     at com.intellij.openapi.progress.BackgroundTaskQueue$1.run(BackgroundTaskQueue.java:53)

     at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:3)

     at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:12)

     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:72)

     at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:9)

     at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:2)

     at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:2)

     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

     at java.util.concurrent.FutureTask.run(FutureTask.java:138)

     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

     at java.lang.Thread.run(Thread.java:619)

     at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)

 

This exception is in the log file when I try to update remote maven repository indices by clicking on Update button in Maven Integration plugin.

 

2) In this build there should be more detailed message as described in

http://www.jetbrains.net/jira/browse/IDEADEV-27950

but it's not

 

Edited by: Steve Hickson on Aug 7, 2008 1:20 PM. Added maven tag

Trevor  Novice 237 posts since
Aug 21, 2002
Currently Being Moderated
Aug 7, 2008 12:11 AM in response to: Steve Hickson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

we have this error as well in 7925.  its seems to be fine indexing the local repo, but it gives this error when trying to contact our Artifactory instance.  it seems to contact http://repo1.maven.org/maven2 just fine though.

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Aug 11, 2008 12:33 PM in response to: Steve Hickson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Steve,

 

This exception occurs in case Maven couldn't find any indices in the specified repository.

You shouldn't worry about it.

As for being more informative, it is, probably, a good idea to write something like 'The repository doesn't have an index file' instead. What do you think?

 

Thanks,

Anton Makeev

Juan Hernandez Newbie 11 posts since
Nov 4, 2002
Currently Being Moderated
Oct 16, 2008 3:57 PM in response to: Steve Hickson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Hi,

 

I had the same problem at the office and it was because I'm behind an HTTP proxy.

It seems that the Maven plugin code doesn't use the proxy settings of IntelliJ so tried setting the standard Java environment properties for HTTP proxy and it worked!

 

To do that edit the idea.exe.vmoptions (under IDEA_HOME/bin) and append the following (configure to suit your environment):

-Dhttp.proxyHost=myProxy.com

-Dhttp.proxyPort=80

-Dhttp.nonProxyHosts=myLocalServer

 

Thanks Steve for pointing out where the IntelliJ log file is ... I didn't know that.

 

Another thing is that the error reported by IntelliJ doesn't give more detail because the original exception is not nested! but is not a fault of IntelliJ code is the Nexus Indexer code.

See IDEA_HOME/plugins/maven/lib/nexus-indexer-1.0.0-SNAPSHOT.jar, file org/sonatype/nexus/index/updater/DefaultIndexUpdater line 225:

 

Code:

 

void downloadResource(Wagon wagon, String name, File targetFile) throws IOException {

          try {

               wagon.get(name, targetFile);

                  }

          catch (AuthorizationException e) {

               throw new IOException((new StringBuilder()).append("Authorization exception retrieving ").append(name).toString());

                  }

          catch (ResourceDoesNotExistException e) {

               throw new IOException((new StringBuilder()).append("Resource ").append(name).append(" does not exist").toString());

                  }

          catch (WagonException e) {

               throw new IOException((new StringBuilder()).append("Transfer for ").append(name).append(" failed; ").append(e.getMessage()).toString()); // Line 225

                  }

}

 

 

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Oct 20, 2008 4:03 PM in response to: Juan Hernandez
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

This problem should have been fixed recently (in one of the 8.0 eaps). I've updated the bundled Wagon library that includes the bug fix. It shouldn't be necessary to change idea.properties files, the proxy settings are taken from Maven's settings.xml file.

 

Please let me know, if the problem still reccurs in the latest 8.0 eap.

 

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Feb 20, 2009 8:06 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

I'm getting this error in 8.1 and I've triple-checked the URLs, the zip exists there, and I've turned off all the possible HTTP proxy settings (in my settings.xml as well as within IDEA Preferences).  What am I doing wrong?

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Feb 27, 2009 8:46 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Hi, Brain,

 

Probably your repository manager doesn't provide indexes.

What manager do you use?

 

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Feb 27, 2009 10:32 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Nexus 1.2.1 OSS is the version of Nexus I'm using.  That's what I meant when I said I triple-checked the URLs and that the zip exists.

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Mar 2, 2009 1:16 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Is your repository in public access? I could check it.

 

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Mar 2, 2009 10:32 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Sorry, its our internal private Nexus server.  I'll gladly run any commands you need for additional debugging information.  I'm suspecting its still getting its HTTP proxy information from somewhere and trying to go through our HTTP proxy to hit our internal server and failing.  This is on Mac OS X 10.5.6.  Is it possible that IDEA is using the Apple JVM and there by using the proxy settings setup under the System Preferences / Network panel?

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Mar 19, 2009 1:36 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Hi, Brian,

 

You said that you have disabled proxy settings, do your repository is behind a proxy? If so, try the workaround Juan suggested:

"It seems that the Maven plugin code doesn't use the proxy settings of IntelliJ so tried setting the standard Java environment properties for HTTP proxy and it worked!

To do that edit the idea.exe.vmoptions (under IDEA_HOME/bin) and append the following (configure to suit your environment):

-Dhttp.proxyHost=myProxy.com

-Dhttp.proxyPort=80

-Dhttp.nonProxyHosts=myLocalServer"

 

If not could you attach your pom.xml that declares the repository and your setting.xml file?

 

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Mar 19, 2009 6:33 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

That worked, thank you.  Though since I'm on a Mac, I needed to make the change to the VMOptions entry in the Info.plist.

 

Is there a ticket open in your bug tracking system for this issue?

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Mar 20, 2009 4:57 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Does your settings.xml file contains the proxy information?

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Mar 20, 2009 5:19 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Changing the proxy settings in my settings.xml had no effect.  Before this final fix, I tried it with the http proxy settings in that file and without them, to no effect.  They are currently in the settings.xml since Maven itself uses those settings properly and I do need them.  The IDEA Maven plugin does not use the proxy settings from the settings.xml when trying to connect to the Nexus repositories.

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Mar 20, 2009 5:30 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

IDEA uses Maven embedder to download the indices and it, in turn, uses settings.xml and proxies defined it this file.

Please check if Settings->Maven->Maven User Settings File path is set correctly.

 

Thanks,

Anton Makeev

Brian Jackson Newbie 53 posts since
Apr 7, 2003
Currently Being Moderated
Mar 20, 2009 5:58 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Yes I've double and triple checked that setting over the past several weeks trying to debug this issue. The only thing that has finally worked was setting the system properties in the VMOptions.

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Mar 23, 2009 3:55 PM in response to: Brian Jackson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Brian,

 

Please attach your settings.xml file.

 

Thanks,

Anton Makeev

Stefan Reuter Newbie 3 posts since
Aug 21, 2002
Currently Being Moderated
Jun 16, 2009 11:50 AM in response to: Steve Hickson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

I have the same problem with IDEA 9 and Nexus 1.3.4 Open Source. My index is available but downloading requires authentication. When IDEA tries to download the index it receives a HTTP 401 response but does not send the credentials. They are present in the settings.xml and standalone Maven is able to use them.

jvthert Newbie 3 posts since
Jun 22, 2007
Currently Being Moderated
Jul 15, 2009 12:21 AM in response to: Stefan Reuter
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

I have exactly the same problem. My nexus repo is not accesible anonymously and all versions of intelliJ fail to retrieve the indexes. My settings.conf is ok (maven works fine) and manually specified. If I enable anonymous access the indexes are retrieved.

 

This is what I see in the logs:

 

2009-07-14 19:55:42,430 [ 239249]   INFO -      #org.jetbrains.idea.maven - Failed to update Maven indices for: http://dev.***.nl/nexus/content/groups/public
java.io.IOException: Transfer for nexus-maven-repository-index.zip failed; Error transferring file
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.downloadResource(DefaultIndexUpdater.java:225)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater$1.invoke(DefaultIndexUpdater.java:73)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.run(DefaultIndexUpdater.java:155)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:49)
    at org.jetbrains.idea.maven.indices.MavenIndex.updateContext(MavenIndex.java:320)
    at org.jetbrains.idea.maven.indices.MavenIndex.updateOrRepair(MavenIndex.java:263)
    at org.jetbrains.idea.maven.indices.MavenIndices.updateOrRepair(MavenIndices.java:136)
    at org.jetbrains.idea.maven.indices.MavenIndicesManager.doUpdateIndices(MavenIndicesManager.java:245)
    at org.jetbrains.idea.maven.indices.MavenIndicesManager.access$200(MavenIndicesManager.java:41)
    at org.jetbrains.idea.maven.indices.MavenIndicesManager$3.run(MavenIndicesManager.java:224)
    at com.intellij.openapi.progress.BackgroundTaskQueue$1.run(BackgroundTaskQueue.java:58)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:8)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:6)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:20)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:10)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    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)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:10)

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Jul 10, 2009 6:19 PM in response to: Steve Hickson
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

We are investigating the problem, I'll let you know when it is fixed.

 

Anton Makeev

Stefan Reuter Newbie 3 posts since
Aug 21, 2002
Currently Being Moderated
Jul 10, 2009 6:39 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Thanks. This is my settings.xml:

 

<settings>
  <mirrors>
    <mirror>
      <id>company</id>
      <mirrorOf>*</mirrorOf>
      <url>https://company/nexus/content/groups/all</url>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
      <id>company-profile</id>
      <activation>
        <activeByDefault/>
      </activation>
      <repositories>
        <repository>
          <id>central</id>
          <url>https://company/nexus/content/groups/all</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>https://company/nexus/content/groups/all</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>company-profile</activeProfile>
  </activeProfiles>
  <servers>
     <server>
      <id>company</id>
      <username>user</username>
      <password>pass</password>
     </server>
     <server>
      <id>central</id>
      <username>user</username>
      <password>pass</password>
     </server>
  </servers>
</settings>

Anton Makeev JetBrains 745 posts since
Dec 19, 2006
Currently Being Moderated
Jul 31, 2009 4:05 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

Hi,

I've fixed the problem (hopefully) and updated the bundled nexus library.

IDEA will use proxy/mirror/authentication settings from Maven's settings.xml file.

Please try the next eap and let me know if you still have any problem downloading the indices.

Thanks,

Anton Makeev

Mathieu Carbou Newbie 1 posts since
Jul 23, 2009
Currently Being Moderated
Jul 20, 2011 10:19 PM in response to: Anton Makeev
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

I am still having the issue with latest IDEA version. We have a similar settings.xml. Is it resolved ?

Mathieu.

Stephen Connolly Newbie 1 posts since
Jan 6, 2012
Currently Being Moderated
Jan 6, 2012 3:20 PM in response to: Mathieu Carbou
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

I think the problem is still there.

 

I think the root cause is that when mirrorOf * is used the credentials for the mirror's id are not looked up, adding a server with id=central allowed the required download to work

metyl Newbie 12 posts since
Apr 3, 2009
Currently Being Moderated
Mar 22, 2012 7:50 PM in response to: Stephen Connolly
Re: IOException: Transfer for nexus-maven-repository-index.zip failed

With latest 11 RC2 and latest nexus 2.0.2 the problem still exists

More Like This

  • Retrieving data ...