org.apache.maven.plugin.MojoExecutionException: Failed to connect to Nexus at: http://127.0.0.1:49049

Sonatype JIRA | Peter Lynch | 5 years ago
  1. 0

    Fails on win and linux. Reference: https://builds.sonatype.org/view/nexus/job/nexus-oss/521/jdk=java-6x,label=linux/testReport/junit/org.sonatype.nexus.plugin/CloseStageRepositoryMojoTest/mavenProxySupportWithoutAuth/ {noformat} Failed to connect to Nexus at: http://127.0.0.1:49049 Stacktrace org.apache.maven.plugin.MojoExecutionException: Failed to connect to Nexus at: http://127.0.0.1:49049 at org.sonatype.nexus.plugin.AbstractStagingMojo.getClient(AbstractStagingMojo.java:82) at org.sonatype.nexus.plugin.CloseStageRepositoryMojo.doExecute(CloseStageRepositoryMojo.java:82) at org.sonatype.nexus.plugin.AbstractNexusMojo.execute(AbstractNexusMojo.java:129) at org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.runMojo(CloseStageRepositoryMojoTest.java:376) at org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.mavenProxySupportTest(CloseStageRepositoryMojoTest.java:270) at org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.mavenProxySupportWithoutAuth(CloseStageRepositoryMojoTest.java:242) 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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) 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:172) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70) {noformat}

    Sonatype JIRA | 5 years ago | Peter Lynch
    org.apache.maven.plugin.MojoExecutionException: Failed to connect to Nexus at: http://127.0.0.1:49049
  2. 0

    I'm trying to cut the 1.5.0 release of the OSS Crowd Plugin before making the changes necessary to have it be compatible with 1.6. But when I go to do the release, I get a 401 error on https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar: INFO] [INFO] [deploy:deploy {execution: default-deploy}] [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol https [INFO] [DEBUG] Checking for pre-existing User-Agent configuration. [INFO] [DEBUG] Adding User-Agent configuration. [INFO] [DEBUG] not adding permissions to wagon connection [INFO] Uploading: https://repository.sonatype.org/service/local/staging/deploy/maven2//org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar [INFO] 4/43K [INFO] 8/43K [INFO] 12/43K [INFO] 16/43K [INFO] 20/43K [INFO] 24/43K [INFO] 28/43K [INFO] 32/43K [INFO] 36/43K [INFO] 40/43K [INFO] 43/43K [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol https [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] BUILD ERROR [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [DEBUG] Trace [INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) [INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) [INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) [INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) [INFO] at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [INFO] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [INFO] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [INFO] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) [INFO] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) [INFO] ... 17 more (etc. etc. etc.) I'm using the same credentials as I use for snapshot deployment as it works. I can also log into r.s.o. using those credentials and see I a Staging repository. Any ideas?

    Sonatype JIRA | 7 years ago | Justin Edelson
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401
  3. 0

    I'm trying to cut the 1.5.0 release of the OSS Crowd Plugin before making the changes necessary to have it be compatible with 1.6. But when I go to do the release, I get a 401 error on https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar: INFO] [INFO] [deploy:deploy {execution: default-deploy}] [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol https [INFO] [DEBUG] Checking for pre-existing User-Agent configuration. [INFO] [DEBUG] Adding User-Agent configuration. [INFO] [DEBUG] not adding permissions to wagon connection [INFO] Uploading: https://repository.sonatype.org/service/local/staging/deploy/maven2//org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar [INFO] 4/43K [INFO] 8/43K [INFO] 12/43K [INFO] 16/43K [INFO] 20/43K [INFO] 24/43K [INFO] 28/43K [INFO] 32/43K [INFO] 36/43K [INFO] 40/43K [INFO] 43/43K [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol https [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] BUILD ERROR [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [DEBUG] Trace [INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) [INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) [INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) [INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) [INFO] at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [INFO] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [INFO] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [INFO] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401 [INFO] at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) [INFO] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) [INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) [INFO] ... 17 more (etc. etc. etc.) I'm using the same credentials as I use for snapshot deployment as it works. I can also log into r.s.o. using those credentials and see I a Staging repository. Any ideas?

    Sonatype JIRA | 7 years ago | Justin Edelson
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://repository.sonatype.org/service/local/staging/deploy/maven2/org/sonatype/nexus/plugins/nexus-crowd-plugin/1.5.0/nexus-crowd-plugin-1.5.0.jar. Return code is: 401
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jenkins dev - Error trying to release StarTeam plugin

    nabble.com | 11 months ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Connection failed: Unable to connect to
  6. 0

    Re: [m2e-users] Get "java.lang.NoClassDefFoundError" though the class is

    eclipse.org | 1 year ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.10:wsgen (default) on project TestWebService: Failed to execute wsgen

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.plugin.MojoExecutionException

      Failed to connect to Nexus at: http://127.0.0.1:49049

      at org.sonatype.nexus.plugin.AbstractStagingMojo.getClient()
    2. ${project.groupId}:${project.artifactId}
      CloseStageRepositoryMojoTest.mavenProxySupportWithoutAuth
      1. org.sonatype.nexus.plugin.AbstractStagingMojo.getClient(AbstractStagingMojo.java:82)
      2. org.sonatype.nexus.plugin.CloseStageRepositoryMojo.doExecute(CloseStageRepositoryMojo.java:82)
      3. org.sonatype.nexus.plugin.AbstractNexusMojo.execute(AbstractNexusMojo.java:129)
      4. org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.runMojo(CloseStageRepositoryMojoTest.java:376)
      5. org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.mavenProxySupportTest(CloseStageRepositoryMojoTest.java:270)
      6. org.sonatype.nexus.plugin.CloseStageRepositoryMojoTest.mavenProxySupportWithoutAuth(CloseStageRepositoryMojoTest.java:242)
      6 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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      16. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      17. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      17 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:172)
      4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
      5 frames