java.net.ConnectException: Connection refused

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check if your MongoDB is available.


rp
tip

host port isnt set

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

  • {code} Tests run: 4, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.707 sec <<< FAILURE! listenSameAddressTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.297 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenSameAddressTest(ServiceSocketBindIntegrationTest.java:179) listenEmptyTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.385 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenEmptyTest(ServiceSocketBindIntegrationTest.java:109) listenWildcardTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.28 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenWildcardTest(ServiceSocketBindIntegrationTest.java:132) {code}
    via by Andrew Audibert,
  • {code} Tests run: 4, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.707 sec <<< FAILURE! listenSameAddressTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.297 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenSameAddressTest(ServiceSocketBindIntegrationTest.java:179) listenEmptyTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.385 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenEmptyTest(ServiceSocketBindIntegrationTest.java:109) listenWildcardTest(tachyon.master.ServiceSocketBindIntegrationTest) Time elapsed: 0.28 sec <<< ERROR! java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenWildcardTest(ServiceSocketBindIntegrationTest.java:132) {code}
    via by Andrew Audibert,
  • The XD shell completion crashes on: job launch --name <TAB> gives {noformat} xd:>job launch --name Exception in thread "Spring Shell" java.lang.IllegalStateException: Could not determine kind: tab-completion-count-1 existing-job disable-string-converter at org.springframework.xd.shell.converter.CompletionConverter.determineKind(CompletionConverter.java:109) at org.springframework.xd.shell.converter.CompletionConverter.getAllPossibleValues(CompletionConverter.java:69) at org.springframework.shell.core.SimpleParser.completeAdvanced(SimpleParser.java:857) at org.springframework.shell.core.ParserCompleter.complete(ParserCompleter.java:47) at jline.console.ConsoleReader.complete(ConsoleReader.java:3077) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2501) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2162) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2150) at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:522) at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) at java.lang.Thread.run(Thread.java:744) {noformat} Moreover, seems completion generally crashes when the server is not up (which was taken care of previously if I'm not mistaken): xd:>job destroy --name <TAB> {noformat} Exception in thread "Spring Shell" org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:9393/jobs/definitions?size=10000&deployments=true":Connection refused; nested exception is java.net.ConnectException: Connection refused at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:561) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:506) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:243) at org.springframework.xd.rest.client.impl.JobTemplate.list(JobTemplate.java:121) at org.springframework.xd.rest.client.impl.JobTemplate.list(JobTemplate.java:40) at org.springframework.xd.shell.converter.ExistingXDEntityConverter.getAllPossibleValues(ExistingXDEntityConverter.java:72) at org.springframework.shell.core.SimpleParser.completeAdvanced(SimpleParser.java:857) at org.springframework.shell.core.ParserCompleter.complete(ParserCompleter.java:47) at jline.console.ConsoleReader.complete(ConsoleReader.java:3077) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2501) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2162) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2150) at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:522) at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) at java.lang.Thread.run(Thread.java:744) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:78) at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52) {noformat}
    via by Eric Bottard,
  • The XD shell completion crashes on: job launch --name <TAB> gives {noformat} xd:>job launch --name Exception in thread "Spring Shell" java.lang.IllegalStateException: Could not determine kind: tab-completion-count-1 existing-job disable-string-converter at org.springframework.xd.shell.converter.CompletionConverter.determineKind(CompletionConverter.java:109) at org.springframework.xd.shell.converter.CompletionConverter.getAllPossibleValues(CompletionConverter.java:69) at org.springframework.shell.core.SimpleParser.completeAdvanced(SimpleParser.java:857) at org.springframework.shell.core.ParserCompleter.complete(ParserCompleter.java:47) at jline.console.ConsoleReader.complete(ConsoleReader.java:3077) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2501) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2162) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2150) at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:522) at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) at java.lang.Thread.run(Thread.java:744) {noformat} Moreover, seems completion generally crashes when the server is not up (which was taken care of previously if I'm not mistaken): xd:>job destroy --name <TAB> {noformat} Exception in thread "Spring Shell" org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:9393/jobs/definitions?size=10000&deployments=true":Connection refused; nested exception is java.net.ConnectException: Connection refused at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:561) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:506) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:243) at org.springframework.xd.rest.client.impl.JobTemplate.list(JobTemplate.java:121) at org.springframework.xd.rest.client.impl.JobTemplate.list(JobTemplate.java:40) at org.springframework.xd.shell.converter.ExistingXDEntityConverter.getAllPossibleValues(ExistingXDEntityConverter.java:72) at org.springframework.shell.core.SimpleParser.completeAdvanced(SimpleParser.java:857) at org.springframework.shell.core.ParserCompleter.complete(ParserCompleter.java:47) at jline.console.ConsoleReader.complete(ConsoleReader.java:3077) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2501) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2162) at jline.console.ConsoleReader.readLine(ConsoleReader.java:2150) at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:522) at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) at java.lang.Thread.run(Thread.java:744) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:78) at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52) {noformat}
    via by Eric Bottard,
  • Dr.Elephant logs purge
    via GitHub by shyamraj242
    ,
  • SRTM Service Connection Refused
    via GitHub by Andy1605
    ,
  • ik Connection refused
    via GitHub by zhaoxuan
    ,
    • java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at tachyon.master.ServiceSocketBindIntegrationTest.connectServices(ServiceSocketBindIntegrationTest.java:95) at tachyon.master.ServiceSocketBindIntegrationTest.listenEmptyTest(ServiceSocketBindIntegrationTest.java:109)

    Users with the same issue

    batwalrus76
    batwalrus763 times, last one,
    slash
    slash2 times, last one,
    tvrmsmith
    tvrmsmith1 times, last one,
    musketyr
    musketyr2 times, last one,
    Unknown visitor1 times, last one,
    290 more bugmates