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 sshtools by *anonymous
, 1 year ago
Connection refused: connect
via Coderanch by Suresh KumarPandey, 11 months ago
Connection refused: connect
via Google Groups by Unknown author, 1 month ago
Connection refused: connect
via Google Groups by Simon Kelly, 1 year ago
Connection refused: connect
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.Socket.connect(Unknown Source)
at com.sshtools.j2ssh.net.TransportProviderFactory.connectTransportProvider(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at undefined.PasswordConnect.main(PasswordConnect.java:77)

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
Once, 2 months ago
Once, 3 months ago
20 times, 3 months ago

Write tip

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