FTP Download - Downloads Repeatedly

Hello, may I ask for someone to help me please.

I am trying to FTP download a file from a server, using the "node-red-contrib-ftp-download" node.

The file downloads, but it downloads many (continuously) times until the reports an error.

Here is my code.

Any reason why it does not download only one time? Is there a better node to use?

Thank you in advance

[{"id":"a94e2078d9197b3d","type":"inject","z":"2ddcf8fe.bd73c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":90,"y":2360,"wires":[["649943a096fc48a1"]]},{"id":"649943a096fc48a1","type":"ftp-download","z":"2ddcf8fe.bd73c8","server":"f7ed700bee3c9a12","files":"/anon/gen/fwo/IDN60004.html","directory":"BOM","name":"","output":"payload","filesType":"str","directoryType":"str","x":280,"y":2360,"wires":[["c703b06d013387a7"]]},{"id":"c703b06d013387a7","type":"file in","z":"2ddcf8fe.bd73c8","name":"","filename":"BOM/IDN60004.html","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":200,"y":2420,"wires":[["c2f4d5bcb3a18d2c"]]},{"id":"c2f4d5bcb3a18d2c","type":"debug","z":"2ddcf8fe.bd73c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":2420,"wires":},{"id":"f7ed700bee3c9a12","type":"ftp-download-server","host":"ftp2.bom.gov.au","port":"21","user":"","connTimeout":"10000","pasvTimeout":"10000","keepalive":"10000","name":""}]

Welcome to the forum @RichdeCrep

In order to make code more readable and importable it is important to surround your code with three backticks
```
like this
```

You can edit and correct your post by clicking the pencil icon.

See this post for more details - How to share code or flow json

Please add a Catch node linked to the FTP node to make sure it is not failing and automatically re-trying. Also add a debug node showing what is coming out of the FTP node.

If that doesn't help, please stop node-red then start it again, in a terminal, and post the full output here please, including anything you see when you click the inject node. When posting please use the same technique as for posting flows, so the forum does not mess with it.

That node (node-red-contrib-ftp-download) hasn't been updated since October 2017 and there are some issues with it. You might want to look at one of the other FTP nodes.

Why do you have a file-in node right after the FTP node?

The node downloads to a file, it doesn't send it in the payload. To access the contents it is necessary to read it in.
The node does work as expected for me.

@RichdeCrep what is the error you see and put a debug node on the output of the ftp node and see what it shows. If more than one msg comes out, the file-in node will run each time.

Hi all,

Thanks for your help. Thanks also for guidance on the ``` when submitting code.

I was drawn away for a few days and revisited it and fixed it today.

  1. I was also concerned that the Node was old, and I now suspect that it has errors. So I do not recommend "node-red-contrib-ftp-download".

  2. That node was reporting intenal errors, that I thought was my fault. The Catch node produced no joy.

  3. I installed an alternate FTP node called "node-red-contrib-ftp-sftp" .
    THIS FIXED THE PROBLEM

Thanks again to all who contributed to fix my problems.

Rich

1 Like

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