I have a simple workflow that backs up my workflows to FTP. When I start it manually, it works fine, but when it fires from CRON, the n8n API node is throwing an error.
What is the error message (if any)?
connect ECONNREFUSED 127.0.0.1:5678
Please share the workflow
Share the output returned by the last node
Information on your n8n setup
**n8n version:**0.197.1
Database you’re using (default: SQLite): Postgre
Running n8n with the execution process [own(default), main]: queue
Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker
Yes I just found out that there was a n8n node now.
But the error still remains:
connect ECONNREFUSED 127.0.0.1:5678 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)
Yes that was the solution!
Seems that when working in queue mode, you need to use the URL of the editor, when running in simple mode, then localhost seems to work as well. That is something to keep in mind when using the n8n API.
That makes sense the worker nodes don’t have the web interface only the main instance and webhook workers do. That might be something worth documenting.