java.net.ConnectException

Connection refused: connect

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 web13680

  • via Google Groups by Stephen Neal, 1 year ago
    Connection refused: connect java.net.ConnectException: Connection refused: connect
  • via Pentaho BI Platform Tracking by Golda David, 1 year ago
    Connection refused: connect Connection refused: connect
  • via Oracle Community by 431393, 8 months ago
    Connection refused: connect java.net.ConnectException: Connection refused: connect
  • Stack trace

    • java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method)[mxunittask] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)[mxunittask] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)[mxunittask] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)[mxunittask] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[mxunittask] at java.net.Socket.connect(Socket.java:529)[mxunittask] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[mxunittask] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[mxunittask] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[mxunittask] at java.lang.reflect.Method.invoke(Method.java:597)[mxunittask] at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)[mxunittask] at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)[mxunittask] at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)[mxunittask] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)[mxunittask] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)[mxunittask] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)[mxunittask] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)[mxunittask] at org.mxunit.ant.HttpHelper.runTest(Unknown Source)[mxunittask] at org.mxunit.ant.MXUnitAntTask.doTest(Unknown Source)[mxunittask] at org.mxunit.ant.MXUnitAntTask.runDirectoryTests(Unknown Source)[mxunittask] at org.mxunit.ant.MXUnitAntTask.execute(Unknown Source)[mxunittask] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)[mxunittask] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[mxunittask] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[mxunittask] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[mxunittask] at java.lang.reflect.Method.invoke(Method.java:597)[mxunittask] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)[mxunittask] at org.apache.tools.ant.Task.perform(Task.java:348)[mxunittask] at org.apache.tools.ant.Target.execute(Target.java:435)[mxunittask] at org.apache.tools.ant.Target.performTasks(Target.java:456)[mxunittask] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)[mxunittask] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)[mxunittask] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)[mxunittask] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)[mxunittask] at org.apache.tools.ant.Main.runBuild(Main.java:851)[mxunittask] at org.apache.tools.ant.Main.startAnt(Main.java:235)[mxunittask] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)[mxunittask] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)[mxunittask]

    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

    Unknown user
    Once, 11 months ago
    2 times, 2 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 11 months ago
    282 more bugmates