Hi Can you try not to write the consumed FTP to a File endpoint. Instead just do
from(ftp?delete=true).to("log:foo"); Just to see that if you download and write to a file causes any mysterious issues. On Wed, Jul 7, 2010 at 12:39 PM, Morten Engel <m...@alpha-solutions.dk> wrote: > > Hi Claus, > > I've been doing some additional testing. First off, as the FTP server I need > to code against is external, I tried setting up a local FTP (using > FileZilla), and connect to that and transfer/delete files in the exact same > way. - This worked like a charm. > > I then proceded to try against the external FTP server again - which I found > to be a "Serv-U 6.4.0.5" server, asking their administrator to return the > log from their side to me. > > Snippet from my log (pattern repeated multiple times), including TRACE from > org.apache.camel.component.file: > > 11:47:49,500 | TRACE | 0: FtpComponent | FtpConsumer | > omponent.file.remote.FtpConsumer 48 | Polling directory: Export > 11:47:49,687 | DEBUG | 0: FtpComponent | FtpConsumer | > mponent.file.GenericFileConsumer 99 | Total 1 files to consume > 11:47:49,687 | TRACE | 0: FtpComponent | FtpConsumer | > mponent.file.GenericFileConsumer 215 | Processing file: > GenericFile[test3.txt] > 11:47:49,687 | TRACE | 0: FtpComponent | FtpConsumer | > mponent.file.GenericFileConsumer 239 | Retrieving file: Export/test3.txt > from: Endpoint[ftp://[us...@[host]/Export/?delete=true&password=[password]] > 11:47:49,906 | TRACE | 0: FtpComponent | FtpConsumer | > mponent.file.GenericFileConsumer 245 | Retrieved file: Export/test3.txt > from: Endpoint[ftp://[us...@[host]/Export/?delete=true&password=[password]] > 11:47:49,906 | DEBUG | 0: FtpComponent | FtpConsumer | > mponent.file.GenericFileConsumer 249 | About to process file: > GenericFile[test3.txt] using exchange: Exchange[GenericFileMessage with > file: GenericFile[test3.txt]] > 11:47:49,906 | TRACE | 0: FtpComponent | GenericFileProducer | > mponent.file.GenericFileProducer 69 | Processing Exchange[Message: > GenericFile[test3.txt]] > 11:47:49,906 | TRACE | 0: FtpComponent | GenericFileProducer | > mponent.file.GenericFileProducer 192 | About to write [C:\test\test3.txt] > to [Endpoint[file://C:/test]] from exchange [Exchange[Message: > GenericFile[test3.txt]]] > 11:47:49,906 | TRACE | 0: FtpComponent | FileOperations | > el.component.file.FileOperations 269 | Using InputStream to transfer from: > java.io.bytearrayinputstr...@19264e3 to: sun.nio.ch.filechanneli...@1d8867 > 11:47:49,906 | DEBUG | 0: FtpComponent | GenericFileProducer | > mponent.file.GenericFileProducer 200 | Wrote [C:\test\test3.txt] to > [Endpoint[file://C:/test]] > 11:47:49,906 | DEBUG | 0: FtpComponent | GenericFileOnCompletion | > ent.file.GenericFileOnCompletion 74 | Done processing file: > GenericFile[test3.txt] using exchange: Exchange[GenericFileMessage with > file: GenericFile[test3.txt]] > 11:47:49,906 | TRACE | 0: FtpComponent | GenericFileOnCompletion | > ent.file.GenericFileOnCompletion 120 | Commit file strategy: > org.apache.camel.component.file.strategy.genericfiledeleteprocessstrat...@1f6e3e9 > for file: GenericFile[test3.txt] > 11:47:49,906 | DEBUG | 0: FtpComponent | FtpOperations | > ponent.file.remote.FtpOperations 178 | Deleting file: Export/test3.txt > 11:47:50,125 | TRACE | 0: FtpComponent | GenericFileDeleteProcessStrategy | > GenericFileDeleteProcessStrategy 51 | File was not deleted at this attempt > will try again in 1 sec.: GenericFile[test3.txt] > 11:47:51,125 | DEBUG | 0: FtpComponent | FtpOperations | > ponent.file.remote.FtpOperations 178 | Deleting file: Export/test3.txt > 11:47:51,328 | TRACE | 0: FtpComponent | GenericFileDeleteProcessStrategy | > GenericFileDeleteProcessStrategy 51 | File was not deleted at this attempt > will try again in 1 sec.: GenericFile[test3.txt] > 11:47:52,328 | DEBUG | 0: FtpComponent | FtpOperations | > ponent.file.remote.FtpOperations 178 | Deleting file: Export/test3.txt > 11:47:52,531 | TRACE | 0: FtpComponent | GenericFileDeleteProcessStrategy | > GenericFileDeleteProcessStrategy 51 | File was not deleted at this attempt > will try again in 1 sec.: GenericFile[test3.txt] > 11:47:53,531 | ERROR | 0: FtpComponent | GenericFileOnCompletion | > rg.apache.camel.processor.Logger 248 | Caused by: > [org.apache.camel.component.file.GenericFileOperationFailedException - > Cannot delete file: GenericFile[test3.txt]] > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > delete file: GenericFile[test3.txt] > [stacktrace] > > Snippet from their log, showing one of the many attempts (it keeps on > polling the same, lonely, file - as it's not deleted in last poll) > > [5] Wed 07Jul10 11:46:48 - (025918) Connected to 89.150.143.147 (Local > address 192.168.255.15) > [5] Wed 07Jul10 11:46:48 - (025918) IP-Name: 0809DS4-BY.1.FULLRATE.DK > [5] Wed 07Jul10 11:46:48 - (025918) User PC061 logged in > [3] Wed 07Jul10 11:46:49 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:46:49 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (1.45 kB/sec - 49 Bytes) > [3] Wed 07Jul10 11:46:53 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:46:53 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (3.68 kB/sec - 49 Bytes) > [3] Wed 07Jul10 11:46:57 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:46:57 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (3.99 kB/sec - 49 Bytes) > [3] Wed 07Jul10 11:47:01 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:47:01 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (3.68 kB/sec - 49 Bytes) > [3] Wed 07Jul10 11:47:05 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:47:05 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (3.42 kB/sec - 49 Bytes) > [3] Wed 07Jul10 11:47:09 - (025918) Sending file > c:\ftp\pc061\export\test3.txt > [3] Wed 07Jul10 11:47:09 - (025918) Sent file c:\ftp\pc061\export\test3.txt > successfully (3.99 kB/sec - 49 Bytes) > [5] Wed 07Jul10 11:47:13 - (025918) Closing connection for user PC061 > (00:00:25 connected) > > > From the FTP hosts log, it seems (as their administrator has confirmed), > that I never send the delete request to their side. > My side is run from a windows server 2003, FUSE environment, coded in > java/camel 2.3.0. > > Any clues as to why the delete messages are not showing up remotely? > > Thank you, > Morten Engel > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problems-deleting-or-moving-files-from-FTP-source-tp911101p1044664.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus