Redshift connection fails

0

Trying to connect to redshift database in python shell jobs. Tried with packages like psycopg2, redshift connector and pg. All of them gave similar error, hence I'm assuming problem is to establish connection. I have my cluster publicly accessible and unblocked elastic ip address of redshift for port 5439 in security group. Still getting same error , would appreaciate any help. ps: I have vpc attached to cluster and this has route table with internet gateway Error details : InternalError: could not connect to server: Connection timed out Is the server running on host "workgroup.123.eu-central-1.redshift-serverless.amazonaws.com" (3.33.22.33) and accepting TCP/IP connections on port 5439?

1개 답변
4
수락된 답변

Hello,

could you please look into solution it will be helpful to you.

Check Security Group: Ensure that your Redshift cluster's security group allows inbound traffic on port 5439 from the IP address or range where your Python shell jobs are running.

Verify Public Accessibility: Double-check that your Redshift cluster is set to publicly accessible in the AWS Redshift console.

Confirm Endpoint: Use the correct endpoint for your Redshift cluster in your connection string.

Test Connectivity: Attempt to connect to your Redshift cluster using a database client like DBeaver or psql from the same network where your Python shell jobs are running to confirm if the issue is specific to your Python environment.

Check VPC and Subnet Configuration: Ensure that your VPC has an internet gateway configured in its route table, and if your Redshift cluster is in a private subnet, confirm that it has a NAT Gateway or NAT Instance for outbound internet access.

here if you get more information go through the AWS Documents Link. https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-refusal-failure-issues.html https://docs.aws.amazon.com/redshift/latest/mgmt/troubleshooting-connections.html

답변함 한 달 전
AWS
지원 엔지니어
검토됨 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인