title: Unable to create redshift connection
body: <p>I am trying to create the redshift connection using redshift jdbc driver which I downloaded from AWS redshift cluster console. Getting below exception</p>
  <pre><code>java.sql.SQLException: The connection attempt failed.
      at com.amazon.redshift.util.RedshiftException.getSQLException(RedshiftException.java:48)
      at com.amazon.redshift.Driver.connect(Driver.java:303)
      at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
      at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
      at com.redshift.jdbc.test.ConnectionTest.main(ConnectionTest.java:27)
  Caused by: java.net.SocketTimeoutException: connect timed out
      at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method)
      at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107)
      at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
      at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
      at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
      at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
      at java.base/java.net.Socket.connect(Socket.java:591)
      at com.amazon.redshift.core.RedshiftStream.&lt;init&gt;(RedshiftStream.java:86)
      at com.amazon.redshift.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:101)
      at com.amazon.redshift.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:214)
      at com.amazon.redshift.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
      at com.amazon.redshift.jdbc.RedshiftConnectionImpl.&lt;init&gt;(RedshiftConnectionImpl.java:288)
      at com.amazon.redshift.Driver.makeConnection(Driver.java:466)
      at com.amazon.redshift.Driver.connect(Driver.java:279)
      ... 3 more
  </code></pre>
  <p>code :</p>
  <pre><code>String jdbcURL = &quot;jdbc:redshift://host:5439/database&quot;;
      String user = &quot;*****&quot;;
      String password = &quot;****&quot;;
      
      String driver = &quot;com.amazon.redshift.jdbc42.Driver&quot;;
      Connection connection = null;
      Statement statement = null;
      try {
          Class.forName(driver);
          connection = DriverManager.getConnection(jdbcURL, user, password);
          if (connection != null) {
              System.out.println(&quot;Connection created!&quot;);
              
          }
      } catch (Exception ex) {
          ex.printStackTrace();
      } finally {
          try {
              if (connection != null)
                  connection.close();
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  <p>Can anyone please help me why I'm unable to make the connection?</p>