java.sql.SQLException

tip

To restart the Selenium Webdriver mock browser in a testcase, first use 'driver.close()' and then reinstantiate the driver.

tip

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


rafael
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.


rafael
tip

spring-data-redis requires redis 2.6+ to work properly.

tip

Check if your MongoDB is available.


rp
tip

host port isnt set

tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • "Connection refused" while using the Java API
    via by Unknown author,
  • Java Connection Refused
    via GitHub by 17thatch
    ,
  • Exception on WSO2 CEP 3.1
    via Stack Overflow by youngwoo
    ,
    • java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10001/;ssl=true;sslTrustSto re=truststore.jks;trustStorePassword=HiveJdbc: Could not connect to localhost on port 10001 at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:212) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:160) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:187) at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:138) at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:179) at org.apache.hive.beeline.Commands.connect(Commands.java:1078) at org.apache.hive.beeline.Commands.connect(Commands.java:999) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:45) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:911) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:776) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:738) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:469) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:452) Caused by: org.apache.thrift.transport.TTransportException: Could not connect to localhost on port 10001 at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212) at org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166) at org.apache.hive.service.auth.HiveAuthFactory.getSSLSocket(HiveAuthFactory.java:214) at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:385) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:184) ... 18 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:407) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)

    Users with the same issue

    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    dth8030
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    388 more bugmates