question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Amazon](500150) Error setting/closing connection: Connection timed out.

See original GitHub issue
java.sql.SQLException: [Amazon](500150) Error setting/closing connection: Connection timed out.
    at com.amazon.redshift.client.PGClient.connect(Unknown Source)
    at com.amazon.redshift.client.PGClient.<init>(Unknown Source)
    at com.amazon.redshift.core.PGJDBCConnection.connect(Unknown Source)
    at com.amazon.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.amazon.jdbc.common.AbstractDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:571)
    at java.sql.DriverManager.getConnection(DriverManager.java:187)
    at com.helpchat.Docs.getData(Docs.java:47)
Caused by: com.amazon.support.exceptions.GeneralException: [Amazon](500150) Error setting/closing connection: Connection timed out.
    ... 8 more
Caused by: java.net.ConnectException: Connection timed out
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:484)
    at sun.nio.ch.Net.connect(Net.java:476)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:675)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:98)
    at com.amazon.redshift.client.PGClient.connect(Unknown Source)
    at com.amazon.redshift.client.PGClient.<init>(Unknown Source)
    at com.amazon.redshift.core.PGJDBCConnection.connect(Unknown Source)
    at com.amazon.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.amazon.jdbc.common.AbstractDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:571)
    at java.sql.DriverManager.getConnection(DriverManager.java:187)
    at com.helpchat.Docs.getData(Docs.java:47)
    at com.helpchat.Docs.main(Docs.java:28)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
thanhpham310commented, Mar 3, 2017

This can you help you !

  1. Go into EC2 Management Console
  2. On the left navigation pane, look for Network & Security header and click on Security Groups. (https://us-west-2.console.aws.amazon.com/ec2/v2/home?region=us-west-2#SecurityGroups:sort=groupId)
  3. Notice the row with name “launch-wizard-1” in the Group Name’s column. Click that. Then select the Inbound tab, and click Edit.
  4. Add Rule: Type=Redshift, Source=MyIP. (auto-fill)
  5. Save it.
  6. Try to connect again from within SQLWorkbench/J.
0reactions
vikaskpathakcommented, May 3, 2019

It worked for me when I added “?ssl=true&sslfactory=com.amazon.redshift.ssl.NonValidatingFactory” the end of URL. https://blog.openbridge.com/definitive-guide-for-connecting-sql-workbench-j-to-amazon-redshift-57d06aa32805

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon AWS connection error - Stack Overflow
Amazon (500150) Error setting/closing connection: Connection timed out: connect. AWS Collective. amazon-web-services · amazon-redshift.
Read more >
[Amazon](500150) Error setting/closing connection - Search
The error is related to TCP Socket timeout. Most often the data is written in S3 and the failure happens when COPY command...
Read more >
Resolve "Connection timed out" error in AWS Glue
I'm trying to connect to Amazon Redshift or Amazon Relational Database Service (Amazon RDS) tables in AWS Glue. My test connection is successful ......
Read more >
[Amazon](500150) Error setting/closing connection
Tasks are failing in Talend Management Console with the error, "java.sql.SQLException: [Amazon](500150) Error setting/closing connection: ...
Read more >
I almost gave up AWS Redshift - LinkedIn
I was slapped with the following error message: "Amazon 500150 Error setting/closing connection: Connection timed out: connect".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found