java.net.ConnectException: Connection refused

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Sonatype JIRA by Stuart McCulloch, 1 year ago
Connection refused
via Atlassian JIRA by Adrian Hempel [Atlassian], 1 year ago
Connection refused
via Mirth Project by Peter Scholz, 1 year ago
Connection refused
via Oracle Community by 692599, 1 year ago
Connection refused
via Oracle Community by gmilitel - oracle, 1 year ago
Connection refused
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.(Socket.java:375)
at java.net.Socket.(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.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.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 com.noelios.restlet.ext.httpclient.HttpMethodCall.sendRequest(HttpMethodCall.java:313)
at com.noelios.restlet.http.HttpClientConverter.commit(HttpClientConverter.java:418)
at com.noelios.restlet.http.HttpClientHelper.handle(HttpClientHelper.java:108)
at org.restlet.Client.handle(Client.java:157)
at org.restlet.Uniform.handle(Uniform.java:108)
at org.sonatype.nexus.integrationtests.NexusRestClient.sendMessage(NexusRestClient.java:563)
at org.sonatype.nexus.integrationtests.NexusRestClient.sendMessage(NexusRestClient.java:543)
at org.sonatype.nexus.integrationtests.NexusRestClient.sendMessage(NexusRestClient.java:494)
at org.sonatype.nexus.integrationtests.NexusRestClient.sendMessage(NexusRestClient.java:488)
at org.sonatype.nexus.integrationtests.NexusRestClient.sendMessage(NexusRestClient.java:470)
at org.sonatype.nexus.integrationtests.NexusRestClient.doGetForStatus(NexusRestClient.java:250)
at org.sonatype.nexus.integrationtests.NexusRestClient.doGetForStatus(NexusRestClient.java:230)
at org.sonatype.nexus.test.utils.TasksNexusRestClient.waitForAllTasksToStop(TasksNexusRestClient.java:209)
at org.sonatype.nexus.test.utils.TasksNexusRestClient.waitForAllTasksToStop(TasksNexusRestClient.java:180)
at org.sonatype.nexus.test.utils.TasksNexusRestClient.waitForAllTasksToStop(TasksNexusRestClient.java:158)
at org.sonatype.nexus.test.utils.TaskScheduleUtil.waitForAllTasksToStop(TaskScheduleUtil.java:88)
at org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest.oncePerClassTearDown(AbstractNexusIntegrationTest.java:417)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:222)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRun(TestRunner.java:757)
at org.testng.TestRunner.run(TestRunner.java:608)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:158)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:98)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
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)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
4 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.