2

I'm using Apache Camel to read files from an FTP server. It has to be listening for new files without being restarted by several days. Some days there are files to download, other days there aren't.

The first issue I had was that when I put files in the FTP folder after a long period of inactivity (a day for example), the files were not picked by Apache Camel and I had to restart it to make it work.

So I thought that the disconnect flag could be useful for this case. However, when I use the disconnect flag I get the following error:

org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: null Connection is not open. Code: 221

The files are download and left in the preMove folder, but they are not moved to the final archive folder specified in move. So my guess was that the connection is closed after the file is read and moved to the preMove folder, but when it tries to move to the archive folder it fails. However I tried removing the preMove option and it still fails, which makes me think the move flag is what's causing the problem.

Is there a way to workaround this issue?

dgaviola
  • 2,421
  • 2
  • 26
  • 37
  • What version of Camel do you use? Try upgrading as we fixed something about this I think. – Claus Ibsen Sep 19 '15 at 08:00
  • 1
    We are using Apache Camel 2.15.2. What I ended up doing to workaround the issue was using just preMove and not move. So I pre move to the archive folder and then read. That has some disadvantages but it is good enough for us. – dgaviola Sep 19 '15 at 17:16

0 Answers0