org.springframework.web.client.ResourceAccessException: I/O error: Connection refused; nested exception is java.net.ConnectException: Connection refused

SpringSource Issue Tracker | Nieraj Singh (c) | 5 years ago
  1. 0

    - Create a micro cloud server in the Servers view. - Deploy an application. - Shut down the micro cloud server outside of STS (shutdown the VM) - Right click on the deployed app in the Servers view. - STS hangs for a minute while populating the context menu actions due to ConnectException. If possible, reduce or avoid STS hang. Note that right clicking on the micro cloud server instance does not result in the same freeze, even though the server is down. org.springframework.web.client.ResourceAccessException: I/O error: Connection refused; nested exception is java.net.ConnectException: Connection refused at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:453) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:199) at org.cloudfoundry.client.lib.CloudFoundryClient.getApplications(CloudFoundryClient.java:219) at com.vmware.appcloud.client.cloudfoundry.UaaAwareCloudFoundryClient.getApplications(UaaAwareCloudFoundryClient.java:331) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour.doRefreshModules(CloudFoundryServerBehaviour.java:698) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$15.doRun(CloudFoundryServerBehaviour.java:355) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$15.doRun(CloudFoundryServerBehaviour.java:1) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$Request.run(CloudFoundryServerBehaviour.java:1003) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour.refreshModules(CloudFoundryServerBehaviour.java:358) at com.cloudfoundry.sts.internal.server.core.RefreshJob.run(RefreshJob.java:54) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 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:432) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:395) at sun.net.www.http.HttpClient.openServer(HttpClient.java:530) at sun.net.www.http.HttpClient.<init>(HttpClient.java:234) at sun.net.www.http.HttpClient.New(HttpClient.java:307) at sun.net.www.http.HttpClient.New(HttpClient.java:324) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:949) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836) at org.springframework.http.client.SimpleClientHttpRequest.executeInternal(SimpleClientHttpRequest.java:69) at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:438)

    SpringSource Issue Tracker | 5 years ago | Nieraj Singh (c)
    org.springframework.web.client.ResourceAccessException: I/O error: Connection refused; nested exception is java.net.ConnectException: Connection refused
  2. 0

    - Create a micro cloud server in the Servers view. - Deploy an application. - Shut down the micro cloud server outside of STS (shutdown the VM) - Right click on the deployed app in the Servers view. - STS hangs for a minute while populating the context menu actions due to ConnectException. If possible, reduce or avoid STS hang. Note that right clicking on the micro cloud server instance does not result in the same freeze, even though the server is down. org.springframework.web.client.ResourceAccessException: I/O error: Connection refused; nested exception is java.net.ConnectException: Connection refused at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:453) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:199) at org.cloudfoundry.client.lib.CloudFoundryClient.getApplications(CloudFoundryClient.java:219) at com.vmware.appcloud.client.cloudfoundry.UaaAwareCloudFoundryClient.getApplications(UaaAwareCloudFoundryClient.java:331) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour.doRefreshModules(CloudFoundryServerBehaviour.java:698) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$15.doRun(CloudFoundryServerBehaviour.java:355) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$15.doRun(CloudFoundryServerBehaviour.java:1) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour$Request.run(CloudFoundryServerBehaviour.java:1003) at com.cloudfoundry.sts.internal.server.core.CloudFoundryServerBehaviour.refreshModules(CloudFoundryServerBehaviour.java:358) at com.cloudfoundry.sts.internal.server.core.RefreshJob.run(RefreshJob.java:54) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 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:432) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:395) at sun.net.www.http.HttpClient.openServer(HttpClient.java:530) at sun.net.www.http.HttpClient.<init>(HttpClient.java:234) at sun.net.www.http.HttpClient.New(HttpClient.java:307) at sun.net.www.http.HttpClient.New(HttpClient.java:324) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:949) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836) at org.springframework.http.client.SimpleClientHttpRequest.executeInternal(SimpleClientHttpRequest.java:69) at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:438)

    SpringSource Issue Tracker | 5 years ago | Nieraj Singh (c)
    org.springframework.web.client.ResourceAccessException: I/O error: Connection refused; nested exception is java.net.ConnectException: Connection refused
  3. 0

    Activator fails to start when port 8888 is already bound.

    GitHub | 3 years ago | senia-psm
    java.net.ConnectException: Connection refused
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [elasticsearch 1.1] Marvel preventing cluster restart.

    GitHub | 3 years ago | hjz
    java.net.ConnectException: Connection refused
  6. 0

    Delay startup of marvel plugin

    GitHub | 3 years ago | markwalkom
    java.net.ConnectException: Connection refused

  1. Malcshour 1 times, last 6 months ago
  2. tvrmsmith 1 times, last 3 weeks ago
  3. musketyr 2 times, last 2 months ago
25 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection refused

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    HttpURLConnection.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    3. java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    4. java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
    6. java.net.Socket.connect(Socket.java:529)
    7. java.net.Socket.connect(Socket.java:478)
    8. sun.net.NetworkClient.doConnect(NetworkClient.java:163)
    9. sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
    10. sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
    11. sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
    12. sun.net.www.http.HttpClient.New(HttpClient.java:307)
    13. sun.net.www.http.HttpClient.New(HttpClient.java:324)
    14. sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
    15. sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:949)
    16. sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
    16 frames
  3. Spring
    RestTemplate.doExecute
    1. org.springframework.http.client.SimpleClientHttpRequest.executeInternal(SimpleClientHttpRequest.java:69)
    2. org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52)
    3. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:438)
    3 frames