org.sonatype.nexus.proxy.ItemNotFoundException: Item not found on path "/activemq/activemq-core/1.2/activemq-core-1.2.jar" in repository "repo1"!

Sonatype JIRA | Peter Lynch | 5 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Noticed this test failure: https://builds.sonatype.org/view/nexus/job/nexus-oss/767/jdk=java-6x,label=linux/testReport/junit/org.sonatype.nexus.proxy/RouterTest/testCreateCollection/ It looks like from the log message timing that we are not allowing enough time for Jetty remote proxy to completely start up before it is queried by the test. {noformat} Error Message Item not found on path "/activemq/activemq-core/1.2/activemq-core-1.2.jar" in repository "repo1"! Stacktrace org.sonatype.nexus.proxy.ItemNotFoundException: Item not found on path "/activemq/activemq-core/1.2/activemq-core-1.2.jar" in repository "repo1"! at org.sonatype.nexus.proxy.repository.AbstractProxyRepository.doRetrieveItem0(AbstractProxyRepository.java:1265) at org.sonatype.nexus.proxy.repository.AbstractProxyRepository.doRetrieveItem(AbstractProxyRepository.java:1085) at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRetrieveItem(AbstractMavenRepository.java:393) at org.sonatype.nexus.proxy.maven.maven2.M2Repository.doRetrieveItem(M2Repository.java:417) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:769) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:584) at org.sonatype.nexus.proxy.M2ResourceStoreTest.retrieveItem(M2ResourceStoreTest.java:45) at org.sonatype.nexus.proxy.M2ResourceStoreTest.testCreateCollection(M2ResourceStoreTest.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) Standard Output 08:30:01.940 [main] WARN o.s.s.c.s.FileSecurityConfigurationSource - No configuration file in place, copying the default one and continuing with it. 08:30:01.941 [main] INFO o.s.s.c.s.FileSecurityConfigurationSource - Loading Security configuration from /opt/grid/slave/workspace/nexus-oss/374c4ad3/nexus/nexus-proxy/target/plexus-home-6852492207199181941/nexus-work/conf/security-configuration.xml 08:30:01.944 [main] INFO o.s.n.p.a.DefaultLSAttributeStorage - Default LS AttributeStorage in place. 08:30:01.945 [main] INFO o.s.n.p.a.DefaultAttributesHandler - Legacy AttributeStorage directory exists here "/opt/grid/slave/workspace/nexus-oss/374c4ad3/nexus/nexus-proxy/target/plexus-home-6852492207199181941/nexus-work/proxy/attributes", transitioning them on-the-fly as they are used to repository storage. 08:30:01.956 [main] INFO org.mortbay.log - jetty-6.1.19 08:30:01.957 [main] INFO org.mortbay.log - Started SelectChannelConnector@0.0.0.0:43214 [INFO] Creating and configuring EHCache manager with classpath:/ehcache.xml, using disk store 'none' 08:30:01.966 [main] INFO o.s.n.p.r.DefaultRepositoryTypeRegistry - Registered default repository types. 08:30:01.966 [main] INFO o.s.n.p.r.DefaultRepositoryRegistry - Added repository ID='repo1' (contentClass='maven2', mainFacet='org.sonatype.nexus.proxy.maven.MavenProxyRepository') 08:30:01.969 [main] INFO o.s.n.p.r.DefaultRepositoryRegistry - Added repository ID='inhouse' (contentClass='maven2', mainFacet='org.sonatype.nexus.proxy.maven.MavenHostedRepository') 08:30:01.973 [main] INFO o.s.n.p.r.DefaultRepositoryRegistry - Added repository ID='inhouse-snapshot' (contentClass='maven2', mainFacet='org.sonatype.nexus.proxy.maven.MavenHostedRepository') 08:30:01.979 [main] INFO o.s.n.p.r.DefaultRepositoryRegistry - Added repository ID='test' (contentClass='maven2', mainFacet='org.sonatype.nexus.proxy.repository.GroupRepository') 08:30:01.982 [main] INFO o.s.n.p.s.r.c.CommonsHttpClientRemoteStorage - Remote storage settings change detected for ProxyRepository ID="repo1" ("repo1"), updating HttpClient... 08:30:01.982 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.982 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.983 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.983 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.983 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.983 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.984 [main] ERROR o.s.n.p.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "repo1" [id=repo1] while retrieving remote artifact "/activemq/activemq-core/1.2/activemq-core-1.2.jar" from URL http://localhost:43214/repo1/, this is 1 (re)try, cause: java.net.ConnectException: Connection refused 08:30:01.984 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.985 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.985 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.985 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.985 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.985 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.986 [main] ERROR o.s.n.p.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "repo1" [id=repo1] while retrieving remote artifact "/activemq/activemq-core/1.2/activemq-core-1.2.jar" from URL http://localhost:43214/repo1/, this is 2 (re)try, cause: java.net.ConnectException: Connection refused 08:30:01.986 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.986 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.987 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.987 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.987 [main] INFO o.a.c.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused 08:30:01.987 [main] INFO o.a.c.httpclient.HttpMethodDirector - Retrying request 08:30:01.987 [main] ERROR o.s.n.p.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "repo1" [id=repo1] while retrieving remote artifact "/activemq/activemq-core/1.2/activemq-core-1.2.jar" from URL http://localhost:43214/repo1/, this is 3 (re)try, cause: java.net.ConnectException: Connection refused 08:30:01.988 [main] WARN o.s.n.p.maven.maven2.M2Repository - Remote peer of proxy repository "repo1" [id=repo1] threw a org.sonatype.nexus.proxy.RemoteStorageException exception. Connection/transport problems occured while connecting to remote peer of the repository. Auto-blocking this repository to prevent further connection-leaks and known-to-fail outbound connections until administrator fixes the problems, or Nexus detects remote repository as healthy. - Cause(s): Transport error while executing GET method [repositoryId="repo1", requestPath="/activemq/activemq-core/1.2/activemq-core-1.2.jar", remoteUrl="http://localhost:43214/repo1/activemq/activemq-core/1.2/activemq-core-1.2.jar"] > Connection refused [INFO] Shutting down EHCache manager. 08:30:01.993 [RepositoryStatusChecker-repo1] INFO o.s.n.p.r.DefaultRepositoryRegistry-repo1 - Next attempt to auto-unblock the "repo1" (id=repo1) repository by checking its remote peer health will occur in 40 seconds. {noformat} All tests that use a simulated remote proxy should at least not proceed until the proxy is fully started. Adding to the current iteration to verify at least this is not a regression. If it something that needs significant rework then it should be postponed until after 2.0

    Sonatype JIRA | 5 years ago | Peter Lynch
    org.sonatype.nexus.proxy.ItemNotFoundException: Item not found on path "/activemq/activemq-core/1.2/activemq-core-1.2.jar" in repository "repo1"!

    Root Cause Analysis

    1. org.sonatype.nexus.proxy.ItemNotFoundException

      Item not found on path "/activemq/activemq-core/1.2/activemq-core-1.2.jar" in repository "repo1"!

      at org.sonatype.nexus.proxy.repository.AbstractProxyRepository.doRetrieveItem0()
    2. ${project.groupId}:${project.artifactId}
      M2ResourceStoreTest.testCreateCollection
      1. org.sonatype.nexus.proxy.repository.AbstractProxyRepository.doRetrieveItem0(AbstractProxyRepository.java:1265)
      2. org.sonatype.nexus.proxy.repository.AbstractProxyRepository.doRetrieveItem(AbstractProxyRepository.java:1085)
      3. org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRetrieveItem(AbstractMavenRepository.java:393)
      4. org.sonatype.nexus.proxy.maven.maven2.M2Repository.doRetrieveItem(M2Repository.java:417)
      5. org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:769)
      6. org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:584)
      7. org.sonatype.nexus.proxy.M2ResourceStoreTest.retrieveItem(M2ResourceStoreTest.java:45)
      8. org.sonatype.nexus.proxy.M2ResourceStoreTest.testCreateCollection(M2ResourceStoreTest.java:153)
      8 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      6. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      7. org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
      8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
      9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
      10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      15. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      15 frames
    5. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    7. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      3. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
      4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      5 frames