java.net.ConnectException

Connection refused

Samebug tips4

Check if your MongoDB is available.

Check if your server (or a proxy server) is not going up and down. There might be something between a proxy and a client sending intermittent requests to non-functioning hosts as well. There might as well be too many requests in a short amount of time.

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

Solutions on the web13203

  • via GitHub by richtera
    , 4 months ago
    Connection refused (Connection refused)
  • via GitHub by gbrost
    , 7 months ago
    Connection refused (Connection refused)
  • via GitHub by Patheek1971
    , 4 months ago
    Connection refused (Connection refused)
  • Stack trace

    • java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)[na:1.6.0_25] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)[na:1.6.0_25] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)[na:1.6.0_25] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)[na:1.6.0_25] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[na:1.6.0_25] at java.net.Socket.connect(Socket.java:529)[na:1.6.0_25] at java.net.Socket.connect(Socket.java:478)[na:1.6.0_25] at java.net.Socket.<init>(Socket.java:375)[na:1.6.0_25] at java.net.Socket.<init>(Socket.java:249)[na:1.6.0_25] at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)[commons-httpclient-3.1.SONATYPE.jar:3.1] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.get(AbstractRESTLightClient.java:499)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.get(AbstractRESTLightClient.java:463)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.getApiVersion(AbstractRESTLightClient.java:397)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.loadVocabulary(AbstractRESTLightClient.java:301)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.connect(AbstractRESTLightClient.java:242)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.common.AbstractRESTLightClient.<init>(AbstractRESTLightClient.java:189)[nexus-restlight-client-common-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.restlight.stage.StageClient.<init>(StageClient.java:106)[nexus-restlight-stage-client-2.0-SNAPSHOT.jar:na] at org.sonatype.nexus.plugin.AbstractStagingMojo.connect(AbstractStagingMojo.java:67)[classes/:na] at org.sonatype.nexus.plugin.AbstractStagingMojo.getClient(AbstractStagingMojo.java:78)[classes/:na] at org.sonatype.nexus.plugin.ListStageRepositoriesMojo.doExecute(ListStageRepositoriesMojo.java:44)[classes/:na] at org.sonatype.nexus.plugin.AbstractNexusMojo.execute(AbstractNexusMojo.java:129)[classes/:na] at org.sonatype.nexus.plugin.ListStageRepositoriesMojoTest.runMojo(ListStageRepositoriesMojoTest.java:254)[test-classes/:na] at org.sonatype.nexus.plugin.ListStageRepositoriesMojoTest.baseUrlWithTrailingSlash(ListStageRepositoriesMojoTest.java:131)[test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_25] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_25] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)[junit-dep-4.8.2.jar:na] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)[junit-dep-4.8.2.jar:na] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)[junit-dep-4.8.2.jar:na] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)[junit-dep-4.8.2.jar:na] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)[junit-dep-4.8.2.jar:na] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)[junit-dep-4.8.2.jar:na] at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)[junit-dep-4.8.2.jar:na] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)[junit-dep-4.8.2.jar:na] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)[junit-dep-4.8.2.jar:na] at org.junit.runners.ParentRunner.run(ParentRunner.java:236)[junit-dep-4.8.2.jar:na] at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)[surefire-junit4-2.10.jar:2.10] at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)[surefire-junit4-2.10.jar:2.10] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)[surefire-junit4-2.10.jar:2.10] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_25] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_25] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)[surefire-api-2.10.jar:2.10] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)[surefire-booter-2.10.jar:2.10] at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)[surefire-booter-2.10.jar:2.10] at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)[surefire-booter-2.10.jar:2.10] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)[surefire-booter-2.10.jar:2.10]

    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

    4 times, 5 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    826 more bugmates