User guide
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
You can set keep-alive behavior at the DSN level if you choose.You do this by adding or modifying the
following parameters in the odbc.ini file:
KeepAlivesCount
The number of TCP keep-alive packets that can be lost before the connection is considered broken.
KeepAlivesIdle
The number of seconds of inactivity before the driver sends a TCP keep-alive packet.
KeepAlivesInterval
The number of seconds between each TCP keep-alive retransmission.
On Windows, you modify these parameters in the registry by adding or changing keys in
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\your_DSN. On Linux and Mac OS, you add
or modify these parameters in the target DSN entry directly in the odbc.ini file. For more information on
modifying the odbc.ini file on Linux and Mac OS computers, see Configure the ODBC Driver on Linux
and Mac OS X Operating Systems (p. 151).
If these parameters don't exist, or if they have a value of 0, the system will use the keep-alive parameters
specified for TCP/IP to determine DSN keep-alive behavior. On Windows, the TCP/IP parameters can
be found in the registry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\. On Linux and Mac
OS, the TCP/IP parameters can be found in the sysctl.conf file.
The Connection Is Refused or Fails
Example errors:
• "Failed to establish a connection to <endpoint>."
• "Could not connect to server: Connection timed out. Is the server running on host '<endpoint>' and
accepting TCP/IP connections on port '<port>'?"
• "Connection refused. Check that the hostname and port are correct and that the postmaster is accepting
TCP/IP connections."
Possible solutions:
Generally, when you receive an error message indicating that there is a failure to establish a connection,
it is an issue with permission to access the cluster.
If you attempt to connect to the cluster from a client tool outside of the network that the cluster is in, you
must add an ingress rule to the cluster security group for the CIDR/IP that you are connecting from:
API Version 2012-12-01
175
Amazon Redshift Management Guide
Troubleshooting Connection Issues in Amazon Redshift