Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to fix: can’t connect to Amazon Redshift cluster

by | Aug 8, 2021

Can’t connect to Amazon Redshift cluster’? We can help you with this!

Here, at Bobcares, we often receive similar queries from our AWS customers as a part of our AWS Support Services.

Today let’s see how our Support Engineers resolve the unable to connect to the  Amazon Redshift cluster issue.

 

Can’t connect to Amazon Redshift cluster

 
There are certain points to be noted while connecting to the Amazon Redshift cluster. Otherwise, it may trigger connection errors.

1. We are having a redshift cluster in a public subnet and wish to connect to it over the internet from a local computer. For that, we must enable the option Publicly accessible.
2. If we have a cluster in a private subnet, then we need to use a NAT gateway in the public subnet to access the internet.
3. If we want to access the cluster from an AWS EC2 instance in a different VPC, we should create a VPC peering connection.

Now let’s discuss the steps followed by our Support Techs to resolve the connection issues in each scenario.
 

Cluster in a public subnet

 
If we want to access a cluster that is in a public subnet from a local computer, we should modify the option Publicly accessible to Yes.

  1. Log in to the Amazon Management Console and then open Amazon Redshift Console.
  2. Select Clusters and then select the cluster to modify.
  3. Select Actions and then select Modify publicly accessible setting.
  4. Then Enable the option publicly accessible.
  5. Select Confirm to save your changes.

 

Cluster is in a private subnet

 
Now, let’s see how to access a cluster that is in a private subnet from a local computer:

  1. Log in to the Amazon Management Console and then open Amazon Redshift Console.
  2. Select Clusters and then select the cluster to modify.
  3. Then select the Configuration tab to open the Cluster Properties page.
  4. Select View VPC’s to open the VPC Console.
  5. Then select Your VPC’s and then select the VPC.
  6. Then select the Route Tables.
  7. On the Routes tab, click Edit routes.
  8. Select Add route and enter the values for IPv4 and IPv6 traffic and click Save.

For IPv4, enter “0.0.0.0/0” and for IPv6, enter “::/0” in the destination field, and then select the internet gateway ID for the Target.

Access the cluster from an AWS EC2 instance in a different VPC

If we want to access the cluster from an AWS EC2 instance in a different VPC, we should create a VPC peering connection. This allows two VPCs to communicate with each other using private IP addresses.

  1. The first step is Creating and accepting a VPC peering connection.
  • Open the Amazon VPC console.
  • Select Peering Connections, Create Peering Connection.
  • Configure the information like Peering connection name tag, VPC (Requester).
  • Then under Select another VPC to peer with: Ensure My account is selected, and select another VPCs.
  • Select OK in the confirmation box.
  • Select the VPC peering connection that created, and select Actions, Accept Request.
  • Then in the confirmation box, select Yes, Accept.
  • A second confirmation box shows, select Modify my route tables now to go directly to the route tables page.

2. Then update both route tables.

3. Update the security groups to reference peer VPC groups.

4. On the EC2 instance, test the VPC peering connection using a networking utility.

nc -zv <hostname> <port>

If the connection is successful, the output of the above command will look like following:

$ nc -zv  <hostname> <port>
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif en0
src xx.xxx.xxx.xx port <port>
dst xx.xxx.xxx.xxx port <port>
rank info not available
TCP aux info available

Connection to <hostname> port <port> [tcp/*] succeeded!

[Need help with more AWS queries? We’d be happy to assist]
 

Conclusion

 
To conclude, today we discussed how our Support Engineers resolve the ‘can’t connect to Amazon Redshift cluster‘ issue.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF