Getting timeout error when trying to establish a connection
See original GitHub issueDriver version
2.0.903
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.34691
Client Operating System
Darwin Nativs-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Python version
3.8.7
Problem description
- Expected behaviour: connection established
- Actual behaviour: timeout error
- More info: On the free trial period
- Error message/stack trace:
Traceback (most recent call last):
File "/Users/tom/Projects/my_proj/.venv/lib/python3.8/site-packages/redshift_connector/core.py", line 544, in __init__
self._usock.connect((host, port))
TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 2, in <module>
File "/Users/tom/Projects/my_proj/.venv/lib/python3.8/site-packages/redshift_connector/__init__.py", line 336, in connect
return Connection(
File "/Users/tom/Projects/my_proj/.venv/lib/python3.8/site-packages/redshift_connector/core.py", line 591, in __init__
raise InterfaceError("communication error", e)
redshift_connector.error.InterfaceError: ('communication error', TimeoutError(60, 'Operation timed out'))
Reproduction code
import redshift_connector
conn = redshift_connector.connect(
host='my-cluster.abc123.us-east-1.redshift.amazonaws.com',
database='dev',
user='awsuser',
password='pass'
)
What am I doing wrong?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Fix the ERR_CONNECTION_TIMED_OUT Error - Kinsta
Simply put, it's an indication that the system is unavailable and the time given for one to connect has elapsed, and now the...
Read more >11 Ways to Fix the ERR_CONNECTION_TIMED_OUT Error
Server timeout and error messages occur when a program attempts to connect to a non-existent server, either because it is down or because...
Read more >What Does a Server Connection Timeout Mean?
A server connection timeout means that a server is taking too long to reply to a data request made from another device. Timeouts...
Read more >Timeout expired messages when connecting to SQL Server
A timeout error means that a certain operation takes longer than needed. The client application stops the operation (instead of waiting ...
Read more >Server Connection Timeout Error Explained - Crazy Domains
9. Clear DNS cache and IP · On your computer, click Start. · Type cmd on the search box. · In the command...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the info - I followed the instructions in the link attached to your reply and succeeded.
THANKS!
Hey @ni-todo-spot ,
Thank you for this information. As psql is unable to connect to your cluster, I would recommend to check the following before trying to use redshift_connector, as the root issue is that your machine cannot connect to the cluster:
Also, Connection is refused or fails provides some references for troubleshooting this issue.