java.sql.SQLTransientConnectionException

java.net.ConnectException: Connection refused: connect2015-04-27 11:42:02,306 INFO [Thread-2] server.DatabaseWorker (DatabaseWorker.java:20) - Database server is Running

Samebug tips3

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


rafaelrafael

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.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2191

  • via Stack Overflow by chntgomez
    ,
  • Stack trace

    • java.sql.SQLTransientConnectionException: java.net.ConnectException: Connection refused: connect2015-04-27 11:42:02,306 INFO [Thread-2] server.DatabaseWorker (DatabaseWorker.java:20) - Database server is Running at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at rideabike.server.DatabaseManager.getDBConn(DatabaseManager.java:37) at rideabike.server.DatabaseWorker.run(DatabaseWorker.java:18) Caused by: org.hsqldb.HsqlException: java.net.ConnectException: Connection refused: connect at org.hsqldb.ClientConnection.openConnection(Unknown Source) at org.hsqldb.ClientConnection.initConnection(Unknown Source) at org.hsqldb.ClientConnection.<init>(Unknown Source) ... 7 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:211) at org.hsqldb.server.HsqlSocketFactory.createSocket(Unknown Source) ... 10 more

    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

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    765 more bugmates