java.net.ConnectException: Connection refused: connect


Samebug tips10

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.


3 months ago
Expert tip

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.


3 months ago
Expert tip

Solutions on the web5739

Solution icon of oraclecommunity
via Oracle Community by 431393, 11 months ago
Connection refused: connect java.net.ConnectException: Connection refused: connect

Solution icon of googlegroups
via Google Groups by Stephen Neal, 1 year ago
Connection refused: connect java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
Connection refused: connect

Solution icon of coderanch
via Coderanch by Ajay Thacker, 1 year ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by Matthew McHale, 10 months ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by Hisham Farahat, 10 months ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by kaarthik asokkumar, 10 months ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by Preston Thornton, 1 year ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by Fouad Elm, 10 months ago
Connection refused: connect

Solution icon of coderanch
via Coderanch by Jonathan Blok, 10 months ago
Connection refused: connect

Stack trace

java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
	at sun.net.NetworkClient.doConnect(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
	at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 week ago
Once, 1 week ago
506 more bugmates