Hi everyone,
I’m facing an issue with the Execute Command
node in my n8n workflow. The node connects via SSH to a remote server and executes a command. However, despite encountering an SSH connection error (as shown in stderr
), the workflow is marked as successful instead of failing.
(I can only share an image since this workflow is private)
I have configured the node to retry up to three times on failure, but even after three retries, the workflow still completes successfully. Here’s the relevant output from the node logs:
[
{
“exitCode”: 0,
“stderr”: “Connection closed by 11.111.111.11 port 22”,
“stdout”: “”
}
]
Questions:
-
We have some doubts regarding the
retry on fail
feature. Could it be that theretry on fail
is altering the process in a way that results in the output showed above? -
Did SSH successfully connect, but the server closed the session before the command could be executed successfully? In this case, the shell did not return the actual error, which may be why the workflow is not failing as expected.
Additional Information:
- In the past, this type of error would have returned a
command failed
error with the following log:
Command failed: ssh [email protected] startfcconsistgrp -prep -restore Cyber Connection closed by 11.111.111.111 port 22
Information on your n8n setup
- n8n version: 1.75.2
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Linux