airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

SSH control host port setting not used when tunneling

Open wesen opened this issue 3 years ago • 12 comments

Environment

  • OS Version / Instance: cloud.airbyte.io
  • Deployment: cloud.airbyte.io
  • Source Connector and version: airbyte/source-mysql-strict-encrypt 0.5.10
  • Destination Connector and version: airbyte/destination-postgres-strict-encrypt 0.1.6
  • Step where error happened: Sync job

Current Behavior

The sync script does not use the tunnel_port setting. This happens in sshtunneling.sh I believe. We have ssh running on port 2222 but the script connects to port 22.

Expected Behavior

The sync script should setup the ssh tunnel to the correct port.

Logs

logs-241062.txt

Steps to Reproduce

  1. Configure a ssh tunnel port for a mysql source/postgresql destination
  2. Sync
  3. Fail

Are you willing to submit a PR?

Yes. Patch attached. ssh-tunnel-port.patch.txt

wesen avatar Jun 14 '22 14:06 wesen

Thanks for reporting this @wesen, are you going to submit a PR to fix it? The issue happens when you use. a custom port different from 22 right?

marcosmarxm avatar Jun 14 '22 20:06 marcosmarxm

@marcosmarxm I can make a PR. The thing is that I don't really have time to set up airbyte locally for testing, I wanted to use the SaaS version (because I don't have the time). Do you want me to open a PR still?

wesen avatar Jun 14 '22 20:06 wesen

SaaS = Airbyte Cloud? I think it's valid to you open the PR, team can help reviewing and doing the test.

marcosmarxm avatar Jun 14 '22 20:06 marcosmarxm

@marcosmarxm thanks, will do

wesen avatar Jun 14 '22 20:06 wesen

@wesen do you mind sending a message in Intercom to get help from our cloud support team?

marcosmarxm avatar Jun 14 '22 20:06 marcosmarxm

@wesen I have created a cloud ticket for our engineers to dig into when this connector is prioritized! It is currently in the alpha stages so I do not have an ETA but if I have any updates I will reach out!

Also, thank you so much for your investigation! As Marcos mentioned, if you ever have question or need help investigating Airbyte cloud issues please do not hesitate to reach out to the Cloud support team by select "Support" in the bottom left corner of the platform and chatting in or opening a case!

erica-airbyte avatar Jun 14 '22 20:06 erica-airbyte

@alexandr-shegeda moving this to JGL team. The tasks here are:

  • reproduce the problem with MySQL source
  • check if the problem is reproducible with Postgres Source
  • check if the problem is reproducible with MS SQL Source
  • fix (might want to start with the patch uploaded by @wesen)

grishick avatar Jun 15 '22 21:06 grishick

thanks a lot @erica-airbyte and @grishick! Is there anything else you might need from me right now?

wesen avatar Jun 20 '22 12:06 wesen

@wesen Not at the moment! You can follow along here or I can circle back when there is an update!

erica-airbyte avatar Jun 21 '22 13:06 erica-airbyte

https://github.com/airbytehq/airbyte/pull/14295

kimerinn avatar Jun 30 '22 12:06 kimerinn

With last update from master normalization and fix is working

kimerinn avatar Jul 27 '22 11:07 kimerinn

What is the best way to try this out? I rebased on master and ran the stack with docker-compose up, which then fetches airbyte/destination-postgres:0.3.21 which ultimately fails with the usual

2022-07-28 15:55:40 normalization > Running: ssh -f -N -M -o StrictHostKeyChecking=no -S {control socket} -i {key file} -l ubuntu -L 50001:XXXX.com:5432 control.thetreecenter.com
2022-07-28 15:56:22 normalization > ssh: connect to XXXX.com port 22: Connection refused
2022-07-28 15:56:40 normalization >            [--event-buffer-size EVENT_BUFFER_SIZE]
2022-07-28 15:56:40 normalization >   --event-buffer-size EVENT_BUFFER_SIZE
2022-07-28 15:56:40 normalization > 
2022-07-28 15:56:40 normalization > DBT >=1.0.0 detected; using 10K event buffer size
2022-07-28 15:56:40 normalization > 

Is there a way to point it to use another image? I tried to muck around with it a bit last week but sadly I don't know enough to figure out where that docker image value is set.

wesen avatar Jul 28 '22 15:07 wesen