Hello, I've been struggling to solve a situation in which a FTP poller was not working from time to time. I've got to the point where I think I know what the problem is.
I'm using Camel 2.6 in servicemix. *I've put up a test for this:* - three FTP file producers at different repeating period of time: 35s, 5min, 1h. Note that when starting servicemix they all put the first file at once. - the files ar put on the FTP in /in folder - one FTP (ftps) consumer which deletes the files after consuming them - the route is simply moving the file from input (ftps) to output (a local folder). *The problem*: - only the first produced file is consumed but is processed over and over again - the rest of the files (the rest of the first 3 files + the others that are added every 35s) are just ignored Possible problem: The FTP component is getting the list of the first 3 files from the FTP in a threaded manner which depends on the state of the current directory on the FTP server - it changes the current directory to /in - retrieves the file - it changes the current directory to / - the second (probably) thread changes the directory to /in - retreives the second file - the first (probably) thread sends a delete command but it sends it as if it were in the root folder but it is actually in the /in folder - the FTP gives an error that the file doesn't exist - somehow the FTP Component blocks itself on the first file... You can see the partial (useful) log below: (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 257 "/" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> CWD in (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 250 CWD successful. "/in" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> PASV (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 227 Entering Passive Mode (192,168,0,25,228,206) (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> RETR WS_1001_1.xml (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 150 Connection accepted (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> SSL connection for data connection established (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 226 Transfer OK (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> CWD / (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 250 CWD successful. "/" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> PWD (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 257 "/" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> CWD in (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 250 CWD successful. "/in" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> PASV (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 227 Entering Passive Mode (192,168,0,25,228,207) (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> RETR WS_1001_2.xml (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 150 Connection accepted (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> DELE in/WS_1001_1.xml (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 550 File not found (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> PASV (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 227 Entering Passive Mode (192,168,0,25,228,208) (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> NLST in (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 550 Directory not found (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> PWD (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 257 "/in" is current directory. (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> CWD in (002386)5/20/2011 17:07:03 PM - sftp-test (192.168.0.194)> 550 CWD failed. "/in/in": directory not found. For the whole logs go here: http://pastie.org/private/kknnkxpbyzqmai7gsm8z5g For the Servicemix log: http://pastie.org/private/eulookxiepan3nkjyu41a A workaround that seems to work is to use the maxMessagesPerPoll=1 option... Anyone has the same problem? Can this be fixed? Thank you for your time. Enjoy the weekend! Laurentiu Trica
