Who suggested Redshift

Connection is rejected or fails

Error examples

  • "Error connecting to."

  • "Could not connect to the server: the connection timed out. Is the server running on the host? and accepting TCP / IP connections on the port? "

  • "Connection refused. Check that the host name and port are correct and that the postmaster accepts TCP / IP connections. "

Possible solutions

Generally, if you get an error that the connection cannot be made, it means that there is a problem with the permission to access the cluster.

To connect to the cluster from a client tool outside the network where the cluster is located, add an inbound rule. Add the rule to the cluster security group for the CIDR / IP you are connecting from:

  • If you've created your Amazon Redshift cluster in a Virtual Private Cloud (VPC) based on Amazon VPC, add your client CIDR / IP address to the VPC security group in Amazon VPC. For more information about how to configure VPC security groups for your cluster, see Managing Clusters in a VPC.

  • If you created your Amazon Redshift cluster outside of a VPC, add your client CIDR / IP address to the cluster security group in Amazon Redshift. For more information about how to configure cluster security groups, see Amazon Redshift Security Groups.

If you are trying to connect to the cluster from a client tool on an Amazon EC2 instance, add an access rule as well. If so, add the rule to the cluster security group for the Amazon EC2 security group associated with the Amazon EC2 instance. For more information about how to configure cluster security groups, see Amazon Redshift Security Groups.

In some cases, you might have a layer between the client and the server; B. a firewall. In these cases, make sure that the firewall accepts incoming connections on the port that you configured for your cluster.

Connection from outside Amazon EC2 - Firewall timeout issue
Client and driver are not compatible