Handshake Timeout - MySQL with SSH Tunnel

Describe the problem/error/question

I have a workflow that runs on an hourly schedule. The workflow runs fine if running it manually. When it runs based on the schedule trigger, the MySQL node errors out with a handshake timeout issue.

The MySQL database sits on a private network, so the connection is being tunneled via SSH using a private key. The connection tests successfully every time via the Credential editor.

What is the error message (if any)?

Error: Timed out while waiting for handshake at Timeout._onTimeout (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:1116:23) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.88.0 (self-hosted)
  • Database (default: SQLite): PostgresQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

I am also getting this, although when I’m editing a MySQL Node that had previously been set up without issue. The Values to Send section where columns are populated from the db gives the timeout error:

The error text is:

Issues:

  • There was a problem loading the parameter options from server: “Timed out while waiting for handshake”

While in the workflow editor, whether I’m working on the node directly or running the flow manually, I never experience this issue. Only when it’s running in background (as part of a scheduled process or via webhook).

Found the issue. When it was running in background, the outbound traffic was originating from a different IP address than the static IP assigned to the n8n server (mine is hosted via Railway). So it was a Railway issue, not n8n.

Everything is working fine now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.