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

Samebug tips

,

Check if your MongoDB is available.

,

Check if your MariaDB is running and available.

Solutions on the web

via Oracle Community by 807581, 1 year ago
via Coderanch by Favian Ee, 11 months ago
Connection refused
via Oracle Community by 408071, 1 year ago
via Google Groups by GooziK, 2 months ago
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.(Socket.java:290)
at java.net.Socket.(Socket.java:118)
at org.gjt.mm.mysql.MysqlIO.(MysqlIO.java:114)
at org.gjt.mm.mysql.Connection.(Connection.java:229)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at undefined.test.main(test.java:26)

Users with the same issue

4 times, 9 months ago
Once, 10 months ago
Once, 11 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
949 more bugmates

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