Issue with Salesforce SFTP on Docker install

Describe the issue/error/question

I’m having an issue trying to connect to salesforce sftp server (ftp.s6.exacttarget.com), I need to download and upload files throught sftp, but got a timeout error on handshaking.

This issue happens only on docker version. I have both docker and npm versions on test enviroment, and it runs fine on npm, but i need it to work on docker because my production env runs only on docker.

Prod env is running Docker version 0.153.0
Test env Docker and npm 0.185.0

What is the error message (if any)?

ERROR: connect->getConnection: Timed out while waiting for handshake
Details
Stack
Error: connect->getConnection: Timed out while waiting for handshake
at fmtError (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/utils.js:55:18)
at SftpClient.connect (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/index.js:218:13)
at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:353:17)
at async Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:594:28)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:537:49

Please share the workflow

Share the output returned by the last node

ERROR: connect->getConnection: Timed out while waiting for handshake
Details
Stack
Error: connect->getConnection: Timed out while waiting for handshake
at fmtError (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/utils.js:55:18)
at SftpClient.connect (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/index.js:218:13)
at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:353:17)
at async Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:594:28)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:537:49

Information on your n8n setup

  • n8n version: 0.153.0
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hi @Edu, do you by any chance have a different firewall configuration in your docker environment? Timeouts are a typical indicator of this as firewalls usually just drop traffic without any warning when using a blocked port.

Hi @MutedJam, Thank you for your support.
I assumed that they had same rules since I can connect to sftp://test.rebex.net on both installs and they are in same vlan. I’ll double check that with infra team. But it appears to only happen with salesforce ftp server.

Hi @MutedJam, firewall rules are the same on both environments.

We have solved the issue increasing readyTimeout on ssh2-sftp-client config