Connection to Postgres destination via SSH

Summary

The user is trying to connect a Postgres destination to Postgres via SSH. The setup appears to be successful based on the logs, but the connection to Postgres failed. The user is questioning if increasing the liveness probe duration from 30s would help.


Question

Hi Team,
I am trying to connect a postgres destination to Postgres via SSH. Surprisingly, the log mentions that setup was successful.

2024-02-14 21:47:43 platform > 2024-02-14 21:47:43 INFO c.z.h.HikariDataSource(<init>):79 - HikariPool-1 - Starting...
2024-02-14 21:47:43 platform > 2024-02-14 21:47:43 INFO c.z.h.HikariDataSource(<init>):81 - HikariPool-1 - Start completed.
2024-02-14 21:47:51 platform > 2024-02-14 21:47:51 INFO c.z.h.HikariDataSource(close):349 - HikariPool-1 - Shutdown initiated...
2024-02-14 21:47:51 platform > 2024-02-14 21:47:51 INFO c.z.h.HikariDataSource(close):351 - HikariPool-1 - Shutdown completed.
2024-02-14 21:47:52 platform > 2024-02-14 21:47:52 INFO i.a.c.i.b.IntegrationRunner(runInternal):231 - Completed integration: io.airbyte.cdk.integrations.base.ssh.SshWrappedDestination
2024-02-14 21:47:52 platform > 2024-02-14 21:47:52 INFO i.a.i.d.p.PostgresDestination(main):139 - completed destination: class io.airbyte.integrations.destination.postgres.PostgresDestination
2024-02-14 21:47:53 INFO i.a.w.p.ExitCodeWatcher(persistExitCode):117 - Received exit code 0 for pod ion-postgres-check-96167fbc-3b66-44b8-87f4-05b9850e6655-0-sulwz
2024-02-14 21:47:53 platform > (pod: airbyte / ion-postgres-check-96167fbc-3b66-44b8-87f4-05b9850e6655-0-sulwz) - Closed all resources for pod
2024-02-14 21:47:53 platform > Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@280e2109[status=succeeded,message=<null>,additionalProperties={}]
2024-02-14 21:47:53 INFO i.a.c.t.HeartbeatUtils(withBackgroundHeartbeat):64 - Stopping temporal heartbeating...
2024-02-14 21:47:53 platform > 
2024-02-14 21:47:53 INFO i.a.c.t.HeartbeatUtils(withBackgroundHeartbeat):73 - Temporal heartbeating stopped.
2024-02-14 21:47:53 platform > ----- END CHECK -----
2024-02-14 21:47:53 platform > ```
Yet, the connection to postgres failed with error like this. We’ve liveness probe set to 30s. Do you think that should be higher than that?

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1707947702723139) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["postgres-destination", "ssh", "connection-failed", "liveness-probe"]
</sub>

I’m still unable to establish postgres connection. There is no log indicating the failure.

2024-02-15 13:52:20 platform &gt; 2024-02-15 13:52:20 INFO c.z.h.HikariDataSource(&lt;init&gt;):80 - HikariPool-1 - Starting...
2024-02-15 13:52:20 platform &gt; 2024-02-15 13:52:20 INFO c.z.h.HikariDataSource(&lt;init&gt;):82 - HikariPool-1 - Start completed.
2024-02-15 13:52:23 platform &gt; 2024-02-15 13:52:23 INFO c.z.h.HikariDataSource(close):350 - HikariPool-1 - Shutdown initiated...
2024-02-15 13:52:23 platform &gt; 2024-02-15 13:52:23 INFO c.z.h.HikariDataSource(close):352 - HikariPool-1 - Shutdown completed.
2024-02-15 13:52:23 platform &gt; 2024-02-15 13:52:23 INFO i.a.c.i.b.IntegrationRunner(runInternal):231 - Completed integration: io.airbyte.cdk.integrations.base.ssh.SshWrappedDestination
2024-02-15 13:52:23 platform &gt; 2024-02-15 13:52:23 INFO i.a.i.d.p.PostgresDestination(main):130 - completed destination: class io.airbyte.integrations.destination.postgres.PostgresDestination
2024-02-15 13:52:23 platform &gt; Destination process done (exit code 0)
2024-02-15 13:52:24 INFO i.a.w.p.ExitCodeWatcher(persistExitCode):117 - Received exit code 0 for pod ion-postgres-check-81ac9167-b147-47c6-b7c7-f0fcbf79ebb6-0-xloxo
2024-02-15 13:52:24 platform &gt; (pod: airbyte / ion-postgres-check-81ac9167-b147-47c6-b7c7-f0fcbf79ebb6-0-xloxo) - Closed all resources for pod
2024-02-15 13:52:24 platform &gt; Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@64341f9b[status=succeeded,message=&lt;null&gt;,additionalProperties={}]
2024-02-15 13:52:24 INFO i.a.c.t.HeartbeatUtils(withBackgroundHeartbeat):64 - Stopping temporal heartbeating...
2024-02-15 13:52:24 platform &gt; 
2024-02-15 13:52:24 INFO i.a.c.t.HeartbeatUtils(withBackgroundHeartbeat):73 - Temporal heartbeating stopped.
2024-02-15 13:52:24 platform &gt; ----- END CHECK -----
2024-02-15 13:52:24 platform &gt; ```

So, this issue appears to be coming because Pods didnt’ have resources. We increased the CPU and memory limit along with liveness probe and we were able to connect it.