java.net.SocketException: 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

Solutions on the web

via coderanch.com by Unknown author, 11 months ago
via coderanch.com by Unknown author, 1 year ago
via coderanch.com by Unknown author, 1 year ago
via Oracle Community by 807598, 1 year ago
java.net.ConnectException: Connection refused: connect
via sourceforge.net by Unknown author, 1 year ago
java.net.ConnectException: Connection refused: connect
via mysql.com by Unknown author, 1 year ago
java.net.ConnectException: Connection refused
java.net.SocketException: java.net.ConnectException: Connection refused: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:280)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765)
at com.mysql.jdbc.Connection.(Connection.java:430)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.DBConnection.getConnection(DBConnection.java:56)
at test.Test.main(Test.java:14)

Users with the same issue

6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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