I created a redshift in aws console. the I went to cluster created and based on the information I got in the console I used them in SQL Workbench/J.
To set up sql workbench/J I used the following:
https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html
So here is my setup:
Now when I try to connect to it I get the following:
Any idea how I can fix it or what is going on?
UPDATE
I also gave inbound security group of the VPC which I had my redshift in full access to the IP address I am conncting and the same issue
Also here is the full logs:
2018-01-18 16:39:36 ERROR Error connecting to the database using
URL=jdbc:redshift://hamedtest.cb1dy4xxxxxxxxxxx [Amazon](500150) Error
setting/closing connection: Connection timed out: connect. [SQL
State=HY000, DB Errorcode=500150]
java.sql.SQLException: [Amazon](500150) Error setting/closing
connection: Connection timed out: connect.
at com.amazon.redshift.client.PGClient.connect(Unknown Source)
at com.amazon.redshift.client.PGClient.<init>(Unknown Source)
at com.amazon.redshift.core.PGJDBCConnection.connect(Unknown Source)
at com.amazon.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.amazon.jdbc.common.AbstractDriver.connect(Unknown Source)
at com.amazon.redshift.jdbc.Driver.connect(Unknown Source)
at workbench.db.DbDriver.connect(DbDriver.java:513)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:255)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:182)
at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:22
7)
Caused by: com.amazon.support.exceptions.GeneralException: [Amazon](500150)
Error setting/closing connection: Connection timed out: connect.
Did you choose "Publicly accessible" YES (radio button) when creating your cluster? If that is set to NO then you can only access the cluster from inside your VPC.
You easily change this in the console by navigating to the cluster, clicking the Cluster ˅ button, clicking Modify. Then change the "Publicly accessible" selection and click the blue Modify button.
Related
Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to connect Network error has occurred, Application-Detailed-Message: RetCode: SQL_ERROR SqlState: 08001 NativeError: 101 Message: [unixODBC]could not connect to server: No route to host Is the server running on host "xxx.ap-southeast-1.rds.amazonaws.com" (192.168.0.31) and accepting TCP/IP connections on port 5432?
I researched from the latest topic about this issue and documentations.
I'm sure you gonna ask me to check networking things.
I have checked everything try to provision the ec2 to check the connectivity such as rtb, sg, acl.
Sure my ec2 can connect to RDS.
I tested further by provision DMS instance v3.4.7 in the same subnet, same sg as the ec2 that I have tested. So it always show the error that I mention earlier.
The db is a source endpoint with RDS postges 12. I do this the same with RDS aurora postges 13 compatible.
Now I have no idea and need some help if someone has the same issue here.
Thanks.
I am having a lot of trouble with this and can't find any solution online that will fix my issue.
The goal is to setup an AWS Pipeline to take CSV data from an S3 bucket and put it into an RDS instance. I have two activies inside of my pipeline: create a table if it doesn't exist, and copy the data to the table. However, the pipeline always fails after it tries to create the table in the RDS instance because it can't connect to it. Here is the error:
errorId: ActivityFailed:NullPointerException
amazonaws.datapipeline.taskrunner.TaskExecutionException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. at amazonaws.datapipeline.activity.SqlActivity.runActivity(SqlActivity.java:71) at amazonaws.datapipeline.objects.AbstractActivity.run(AbstractActivity.java:16) at amazonaws.datapipeline.taskrunner.TaskPoller.executeRemoteRunner(TaskPoller.java:136) at amazonaws.datapipeline.taskrunner.TaskPoller.executeTask(TaskPoller.java:105) at amazonaws.datapipeline.taskrunner.TaskPoller$1.run(TaskPoller.java:81) at private.com.amazonaws.services.datapipeline.poller.PollWorker.executeWork(PollWorker.java:76) at private.com.amazonaws.services.datapipeline.poller.PollWorker.run(PollWorker.java:53) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. at private.com.google.common.base.Throwables.propagate(Unknown Source) at amazonaws.datapipeline.database.ConnectionFactory.getConnection(ConnectionFactory.java:192) at amazonaws.datapipeline.database.ConnectionFactory.getConnection(ConnectionFactory.java:177) at amazonaws.datapipeline.database.ConnectionFactory.getRdsDatabaseConnection(ConnectionFactory.java:161) at amazonaws.datapipeline.database.ConnectionFactory.getConnection(ConnectionFactory.java:73) at amazonaws.datapipeline.activity.SqlActivity.runActivity(SqlActivity.java:63) ... 7 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:527) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.Util.getInstance(Util.java:387) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2330) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:527) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328) at private.com.amazonaws.services.datapipeline.database.DriverShim.connect(DriverShim.java:26) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:187) at amazonaws.datapipeline.database.ConnectionFactory.connect(ConnectionFactory.java:203) at amazonaws.datapipeline.database.ConnectionFactory.getConnection(ConnectionFactory.java:187) ... 11 more Caused by: java.lang.NullPointerException at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:2997) at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1865) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1228) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253) at com.mysql.jdbc.Co
One thing to note is that the pipeline is setup in us-east-1, but I have the RDS and EC2 going into us-east-2. I thought I set it up correctly though.
The ec2 instance that is created by the pipeline is set to go into the same subnet as the rds instance. The rds instance has a security group that allows all incoming traffic from the security group of the ec2 instance. The ec2 instance is created with a security group that allows all outgoing traffic. I also made sure the Ec2 instance that is created ends up in the same region as the rds.
It doesn't make much sense to me that this doesn't work because I can manually create an ec2 instance with the same security & subnet settings and connect to the database using telnet <rds endpoint> 3306.
I do not have much experience with AWS so any help is appreciated. Thanks.
I'm trying to connect to my Redshift Cluster by using SQL Workbench/J. Followed all the instructions:
Downloaded and set Amazon Redshift JDBC 4.2 Driver in the connection profile
Copy & paste Database JDBC URL
Set Database Username & pwd
Created Inbound Rule in my VPC Security Group: Redshift - TCP - 5439 - MyIP
Tested the connection and got the "500150 Error setting connection: Connection timed out: connect" message. I made sure the JDBC URL, the Port and the USR&PWD are correct.
Did some research (question1, question2, question3, question4), and none of the proposed solutions work for me. Any hint?
I have a problem with the cf log. If I'm using cf logs, I get the following error
C:\Users\Z003PCEU> cf logs hello-spring-cloud FAILED Error dialing
traffic controller server: dial tcp 139.25.25.200:4443: connectex: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed
because connected hos t has failed to respond.. Please ask your Cloud
Foundry Operator to check the platform configuration (traffic
controller is wss://doppler.sys.de.c
loudfoundry.it-platforms.net:4443).
Using Curl to get access provides the following info
Proxy error
503
the proxy is only needed for communication outside the company. Cf should net use it.
Removing the proxy from console results in
Failed to connect to 10.0.0.17 port 4443: Connection refused
10.X.X.X is the cloud internal network.
Anyone an Idea?
It was a firewall problem. The port 4443 was not open. After changing the configuration within the firewall it works
I keep getting the following error while trying to connect o my AWS instance ,I followed the links below and added my local machine's IP to the list of inbound rules in the active security group but still see the problem,can anyone provide assistance on how to debug and overcome this problem?
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectionTimeout
Possible reasons for timeout when trying to access EC2 instance
Error connecting to ec2-52-39-2-81.us-west-2.compute.amazonaws.com, reason:
-> Connection timed out: no further information