org.apache.maven.plugin.MojoExecutionException

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

Samebug tips4

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web5136

  • via Unknown by Peter Lynch,
  • via GitHub by xingfengshen
    ,
  • Stack trace

    • org.apache.maven.plugin.MojoExecutionException: Failed to connect to Nexus at: http://127.0.0.1:42428/ at org.sonatype.nexus.plugin.AbstractStagingMojo.getClient(AbstractStagingMojo.java:82) at org.sonatype.nexus.plugin.ListStageRepositoriesMojo.doExecute(ListStageRepositoriesMojo.java:44) at org.sonatype.nexus.plugin.AbstractNexusMojo.execute(AbstractNexusMojo.java:129) at org.sonatype.nexus.plugin.ListStageRepositoriesMojoTest.runMojo(ListStageRepositoriesMojoTest.java:254) at org.sonatype.nexus.plugin.ListStageRepositoriesMojoTest.baseUrlWithTrailingSlash(ListStageRepositoriesMojoTest.java:131) 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) Caused by: org.sonatype.nexus.restlight.common.RESTLightClientException: GET request execution failed. Reason: Connection refused at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.get(AbstractRESTLightClient.java:507) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.get(AbstractRESTLightClient.java:463) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.getApiVersion(AbstractRESTLightClient.java:397) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.loadVocabulary(AbstractRESTLightClient.java:301) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.connect(AbstractRESTLightClient.java:242) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.<init>(AbstractRESTLightClient.java:189) at org.sonatype.nexus.restlight.stage.StageClient.<init>(StageClient.java:106) at org.sonatype.nexus.plugin.AbstractStagingMojo.connect(AbstractStagingMojo.java:67) at org.sonatype.nexus.plugin.AbstractStagingMojo.getClient(AbstractStagingMojo.java:78) ... 35 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at java.net.Socket.<init>(Socket.java:375) at java.net.Socket.<init>(Socket.java:249) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source) at org.apache.commons.httpclient.HttpConnection.open(Unknown Source) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source) at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source) at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source) at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.get(AbstractRESTLightClient.java:499) ... 43 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    stigkjstigkj
    4 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    824 more bugmates