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

1 Like

How are you buddy, how are you?

I’m having the exact same problem as you with Salesforce sftp.

How exactly did you manage to configure Timeout in ssh2-sftp-client config?

I’m using docker and I don’t know what else to do.

Thanks for the help!

Hey @Luiz_Armando_Marucci,

I suspect they may have made their own image with a custom node in it, It seems like a good feature to add though.

Thanks for your reply friend!
I’m not a Developer and therefore I have some difficulty with some concepts.

In my case, it would certainly take a lot of effort before I could build the node.js image with n8n that actually works.

We will have to surrender to Visual Cron unfortunately…