0
votes

I cannot connect to a aws Redshift cluster, but I am able to connect with exactly the same configuration when I'm using a different Wifi. Here are some details: I use mac with SQL Workbench/J with AWS Redshift driver.

The error I'm getting: [Amazon] (500150) Error setting/closing connection: Operation timed out.

Using Wireshark I see outbound TCP request with no answer.

When I set my smart phone as a hot spot (instead of using my home Wifi) - the same connection works fine.

Here are my security group details:

Inbound: Redshift TCP 5439 0.0.0.0/0 Outbound: All traffic All All 0.0.0.0/0

Also, I tested this on two different aws accounts - same problem on both.

Any idea would be of great help

1

1 Answers

0
votes

found an answer here: http://docs.aws.amazon.com/redshift/latest/mgmt/connecting-firewall-guidance.html

Idle connections are terminated by an intermediate network component (e.g firewall). To solve (on mac):

sudo sysctl net.inet.tcp.keepintvl=20000
sudo sysctl net.inet.tcp.keepidle=20000 
sudo sysctl net.inet.tcp.keepinit=20000
sudo sysctl net.inet.tcp.always_keepalive=1

If this works, add the following to /etc/sysctl.conf to persist:

net.inet.tcp.keepidle=20000 
net.inet.tcp.keepintvl=20000 
net.inet.tcp.keepinit=20000 
net.inet.tcp.always_keepalive=1                  

And after restart, to test:

sysctl net.inet.tcp.keepidle
sysctl net.inet.tcp.keepintvl
sysctl net.inet.tcp.keepinit
sysctl net.inet.tcp.always_keepalive

To change DSN timeout settings