java.net.ConnectException: Connection refused: connect

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

,
Expert tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.

,
Expert tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.

Solutions on the web

via Oracle Community by 3070371, 1 year ago
via Stack Overflow by AliceIs Dead
, 2 years ago
via Stack Overflow by Question Asker
, 1 year ago
Connection refused: connect
via Stack Overflow by Bridget
, 2 years ago
Connection refused: connect
via GitHub by starguy
, 2 years ago
Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at Vdb.SlaveSocket.(SlaveSocket.java:49)
at Vdb.SlaveJvm.connectToMaster(SlaveJvm.java:89)
at Vdb.SlaveJvm.main(SlaveJvm.java:384)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
18 times, 1 year ago
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
884 more bugmates

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