wise-coders / dbschema

DbSchema Database Designer
https://dbschema.com
72 stars 3 forks source link

SSH Tunnel to AWS RDS/Aurora Does not work #34

Closed darkredz closed 1 year ago

darkredz commented 3 years ago

DBSchema is not able to connect to Mysql database when using a connection with SSH Tunnel to AWS RDS/Aurora through a jump server in EC2 with port 3306 allowed.

When connect it will throw the following error com.jcraft.jsch.JSchException: PortForwardingL: local port 127.0.0.1:3306 cannot be bound. at com.jcraft.jsch.PortWatcher.(PortWatcher.java:158) at com.jcraft.jsch.PortWatcher.addPort(PortWatcher.java:110) at com.jcraft.jsch.Session.setPortForwardingL(Session.java:1847) at com.jcraft.jsch.Session.setPortForwardingL(Session.java:1828) at com.jcraft.jsch.Session.setPortForwardingL(Session.java:1809) at com.jcraft.jsch.Session.setPortForwardingL(Session.java:1792) at com.wisecoders.dbs.schema.Connector.d(Connector.java:912) at com.wisecoders.dbs.schema.Connector.setupSSHTunnel(Connector.java:784) at com.wisecoders.dbs.rdbms.connect.model.FxPingTask.a(FxPingTask.java:32) at com.wisecoders.dbs.rdbms.connect.model.FxPingTask.call(FxPingTask.java:13) ...

  1. Please include the DbSchema version, operating system and used database v8.3.2 Mac OS Catalina, MySQL 5.6.1

  2. The steps to reproduce this issue

    • Setup a SSH Tunnel in the connection pointing to the EC2 instance within the same VPC as RDS, eg. ec2-11-111-111.us-east-2.compute.amazonaws.com and use a private key file
    • Set JDBC URL to Remote computer and put in the RDS/Aurora hostname eg. dbname.cluster-xxxxxx.us-east-2.rds.amazonaws.com
Mano7799 commented 2 years ago

I am kinda facing the same issue. I am trying to connect AWS Redshift database using SSH. But it wont connect. It throws "connection time out". Any work around to resolve this?

wise-coders commented 2 years ago

We didn't check this recently, but could you please first check if is any setting in AWS for enabling remote connectivity? Please stop any local MySql instance (running on your computer), this can lead to port conflicts. Please let me know if any of this does help, and if not I will create a ticket for the team.

wise-coders commented 2 years ago

Did you got connected? Please let me know, I would close the issue.

darkredz commented 2 years ago

yes it works

On Wed, Nov 17, 2021 at 3:55 AM Wise Coders @.***> wrote:

Did you got connected? Please let me know, I would close the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wise-coders/dbschema/issues/34#issuecomment-970628265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABH5WAZCO6VPI5GUH4QKETUMKZJ5ANCNFSM4SZZCNNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Mano7799 commented 2 years ago

No, For me it didn't get connected. It says "Connection Time out".

wise-coders commented 2 years ago

For Mano: please contact us using the Help / Report a bug dialog from DbSchema. Let's set up a web meeting and check this together. Is this ok for you?

Mano7799 commented 2 years ago

We can! But wanted to clarify one thing prior, Is it mandatory to make the Redshift Database public access enabled? Becoz, Our Database isn't.

wise-coders commented 2 years ago

I think yes, you should make it public, but you can do this only for a certain client host or network. Could you please also ask AWS support by creating a ticket? They know the best about this. The technical support should be free for you. We have only a limited AWS plan.

Please write us as well about what answer you got.