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

Solutions on the web

via Oracle Community by 513516, 1 year ago
via Oracle Community by 513516, 1 year ago
via Oracle Community by 513516, 1 year ago
via Oracle Community by 807597, 1 year ago
via Oracle Community by 807581, 1 year ago
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.connect(Socket.java:428)
at java.net.Socket.(Socket.java:335)
at java.net.Socket.(Socket.java:179)
at HTTPClient.HTTPConnection.getSocket(HTTPConnection.java:1912)
at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:2922)
at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2150)
at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:3561)
at HTTPClient.HTTPConnection.Post(HTTPConnection.java:2494)
at HTTPClient.HTTPConnection.Post(HTTPConnection.java:2621)
at HTTPClient.HTTPConnection.Post(HTTPConnection.java:2515)

Users with the same issue

8 times, 1 hour ago
14 times, 3 hours ago
552 times, 8 hours ago
11 times, 2 days ago
26943 times, 3 days ago

Write tip

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