Re: Problems with sftp in Camel 2.11.0
Sorry, I just didn't have the time to test the RC's this time. However, I agree with David that having the RC's in central would be convenient. and might help making testing less of an effort. /Bengt 2013/4/29 David Karlsen > Probably if the RC's are available off central the testing/use of them > would increase. > > > 2013/4/29 Claus Ibsen > > > Hi Bengt > > > > Thanks for the patches et. all. > > > > I just want to remind you and others listening that we did 4 RC rounds > > of the 2.11.0 release, so it would be ideal if people had tested the > > RC's. Otherwise there is less points in us doing all the RC rounds if > > the community dont react and help test it. After all its going to run > > in *YOUR* business. So take action and help test the software. > > > > There is a 2.10 patch release scheduled to be released first. So the > > 1st patch for 2.11 is scheduled sometime after this release. > > > > > > > > > > On Thu, Apr 25, 2013 at 9:38 AM, Bengt Rodehav > wrote: > > > I have now uploaded patches for fixing FileUtil and for testing the > error > > > in FileUtilTest. > > > > > > Like I wrote before, I think this is a really serious error since it > > > affects (at least) ftp, ftps and sftp. I would really appreciate if a > > > 2.11.1 bugfix release could happen real soon. I don't think that > > > ftp/ftps/sftp can be safely used at all in 2.11.0. > > > > > > /Bengt > > > > > > > > > > > > > > > 2013/4/24 Christian Müller > > > > > >> Hey Guys, > > >> > > >> thanks for reporting. > > >> Could you provide a unit test which shows this issue (may directly for > > the > > >> FileUtil class). Ans like always, patches are welcome and help us to > fix > > >> this issue soon. > > >> > > >> http://camel.apache.org/contributing.html > > >> > > >> Best, > > >> Christian > > >> > > >> > > >> On Wed, Apr 24, 2013 at 11:28 AM, Bengt Rodehav > > wrote: > > >> > > >> > I created a JIRA for this: > > >> > > > >> > https://issues.apache.org/jira/browse/CAMEL-6309 > > >> > > > >> > /Bengt > > >> > > > >> > > > >> > 2013/4/24 Bengt Rodehav > > >> > > > >> > > Also, note that the "stepwise" option does not affect the bug I > have > > >> > > enountered. What happens for me is that Camel traverses the path > to > > get > > >> > > down to the subdirectory in order to verity that the subdirectory > > >> exists > > >> > > (or create it). Then when Camel tries to return to the original > > >> directory > > >> > > the error happens since it thinks that the original directory is > > "//" > > >> and > > >> > > not "/" as it should be. > > >> > > > > >> > > /Bengt > > >> > > > > >> > > > > >> > > 2013/4/24 Bengt Rodehav > > >> > > > > >> > >> Hello Diether, > > >> > >> > > >> > >> The error you mention looks very similar to mine. However, you > use > > ftp > > >> > >> (and thus FtpOperations) while I use sftp (and SftpOperations). I > > >> > haven't > > >> > >> checked if they handle subdirectories in a similar way. I'm > afraid > > >> that > > >> > the > > >> > >> bug might affect many components since it is in camel-core > > (FileUtil > > >> > >> class). Have you tried Camel 2.11.0 to verify if it works for > you? > > >> > >> > > >> > >> I think whati will cause my problem is if you upload to a > > subdirectory > > >> > >> via sftp and the home directory (where you end up after login) is > > "/" > > >> > (or > > >> > >> "\" on windows). > > >> > >> > > >> > >> /Bengt > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> 2013/4/24 Diether > > >> > >> > > >> > >>> > > &
Re: Problems with sftp in Camel 2.11.0
Probably if the RC's are available off central the testing/use of them would increase. 2013/4/29 Claus Ibsen > Hi Bengt > > Thanks for the patches et. all. > > I just want to remind you and others listening that we did 4 RC rounds > of the 2.11.0 release, so it would be ideal if people had tested the > RC's. Otherwise there is less points in us doing all the RC rounds if > the community dont react and help test it. After all its going to run > in *YOUR* business. So take action and help test the software. > > There is a 2.10 patch release scheduled to be released first. So the > 1st patch for 2.11 is scheduled sometime after this release. > > > > > On Thu, Apr 25, 2013 at 9:38 AM, Bengt Rodehav wrote: > > I have now uploaded patches for fixing FileUtil and for testing the error > > in FileUtilTest. > > > > Like I wrote before, I think this is a really serious error since it > > affects (at least) ftp, ftps and sftp. I would really appreciate if a > > 2.11.1 bugfix release could happen real soon. I don't think that > > ftp/ftps/sftp can be safely used at all in 2.11.0. > > > > /Bengt > > > > > > > > > > 2013/4/24 Christian Müller > > > >> Hey Guys, > >> > >> thanks for reporting. > >> Could you provide a unit test which shows this issue (may directly for > the > >> FileUtil class). Ans like always, patches are welcome and help us to fix > >> this issue soon. > >> > >> http://camel.apache.org/contributing.html > >> > >> Best, > >> Christian > >> > >> > >> On Wed, Apr 24, 2013 at 11:28 AM, Bengt Rodehav > wrote: > >> > >> > I created a JIRA for this: > >> > > >> > https://issues.apache.org/jira/browse/CAMEL-6309 > >> > > >> > /Bengt > >> > > >> > > >> > 2013/4/24 Bengt Rodehav > >> > > >> > > Also, note that the "stepwise" option does not affect the bug I have > >> > > enountered. What happens for me is that Camel traverses the path to > get > >> > > down to the subdirectory in order to verity that the subdirectory > >> exists > >> > > (or create it). Then when Camel tries to return to the original > >> directory > >> > > the error happens since it thinks that the original directory is > "//" > >> and > >> > > not "/" as it should be. > >> > > > >> > > /Bengt > >> > > > >> > > > >> > > 2013/4/24 Bengt Rodehav > >> > > > >> > >> Hello Diether, > >> > >> > >> > >> The error you mention looks very similar to mine. However, you use > ftp > >> > >> (and thus FtpOperations) while I use sftp (and SftpOperations). I > >> > haven't > >> > >> checked if they handle subdirectories in a similar way. I'm afraid > >> that > >> > the > >> > >> bug might affect many components since it is in camel-core > (FileUtil > >> > >> class). Have you tried Camel 2.11.0 to verify if it works for you? > >> > >> > >> > >> I think whati will cause my problem is if you upload to a > subdirectory > >> > >> via sftp and the home directory (where you end up after login) is > "/" > >> > (or > >> > >> "\" on windows). > >> > >> > >> > >> /Bengt > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> 2013/4/24 Diether > >> > >> > >> > >>> > >> > >>> This problem has been mentioned before: > >> > >>> > >> > >>> > >> > > >> > http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html > >> > >>> > >> > >>> But it seems like still no fix has been implemented then. > >> > >>> For us it was working in 2.10.2 though, but not in 2.10.3 > >> > >>> > >> > >>> Regards, > >> > >>> Diether > >> > >>> > >> > >>> > >> > >>> Van: Bengt Rodehav [via Camel] [ > >> > ml-node+s465427n5731408...@n5.nabble.com > >> > &
Re: Problems with sftp in Camel 2.11.0
Hi Bengt Thanks for the patches et. all. I just want to remind you and others listening that we did 4 RC rounds of the 2.11.0 release, so it would be ideal if people had tested the RC's. Otherwise there is less points in us doing all the RC rounds if the community dont react and help test it. After all its going to run in *YOUR* business. So take action and help test the software. There is a 2.10 patch release scheduled to be released first. So the 1st patch for 2.11 is scheduled sometime after this release. On Thu, Apr 25, 2013 at 9:38 AM, Bengt Rodehav wrote: > I have now uploaded patches for fixing FileUtil and for testing the error > in FileUtilTest. > > Like I wrote before, I think this is a really serious error since it > affects (at least) ftp, ftps and sftp. I would really appreciate if a > 2.11.1 bugfix release could happen real soon. I don't think that > ftp/ftps/sftp can be safely used at all in 2.11.0. > > /Bengt > > > > > 2013/4/24 Christian Müller > >> Hey Guys, >> >> thanks for reporting. >> Could you provide a unit test which shows this issue (may directly for the >> FileUtil class). Ans like always, patches are welcome and help us to fix >> this issue soon. >> >> http://camel.apache.org/contributing.html >> >> Best, >> Christian >> >> >> On Wed, Apr 24, 2013 at 11:28 AM, Bengt Rodehav wrote: >> >> > I created a JIRA for this: >> > >> > https://issues.apache.org/jira/browse/CAMEL-6309 >> > >> > /Bengt >> > >> > >> > 2013/4/24 Bengt Rodehav >> > >> > > Also, note that the "stepwise" option does not affect the bug I have >> > > enountered. What happens for me is that Camel traverses the path to get >> > > down to the subdirectory in order to verity that the subdirectory >> exists >> > > (or create it). Then when Camel tries to return to the original >> directory >> > > the error happens since it thinks that the original directory is "//" >> and >> > > not "/" as it should be. >> > > >> > > /Bengt >> > > >> > > >> > > 2013/4/24 Bengt Rodehav >> > > >> > >> Hello Diether, >> > >> >> > >> The error you mention looks very similar to mine. However, you use ftp >> > >> (and thus FtpOperations) while I use sftp (and SftpOperations). I >> > haven't >> > >> checked if they handle subdirectories in a similar way. I'm afraid >> that >> > the >> > >> bug might affect many components since it is in camel-core (FileUtil >> > >> class). Have you tried Camel 2.11.0 to verify if it works for you? >> > >> >> > >> I think whati will cause my problem is if you upload to a subdirectory >> > >> via sftp and the home directory (where you end up after login) is "/" >> > (or >> > >> "\" on windows). >> > >> >> > >> /Bengt >> > >> >> > >> >> > >> >> > >> >> > >> 2013/4/24 Diether >> > >> >> > >>> >> > >>> This problem has been mentioned before: >> > >>> >> > >>> >> > >> http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html >> > >>> >> > >>> But it seems like still no fix has been implemented then. >> > >>> For us it was working in 2.10.2 though, but not in 2.10.3 >> > >>> >> > >>> Regards, >> > >>> Diether >> > >>> >> > >>> >> > >>> Van: Bengt Rodehav [via Camel] [ >> > ml-node+s465427n5731408...@n5.nabble.com >> > >>> ] >> > >>> Verzonden: woensdag 24 april 2013 10:28 >> > >>> To: Wuyts Diether >> > >>> Onderwerp: Re: Problems with sftp in Camel 2.11.0 >> > >>> >> > >>> I investigated this further and found a serious bug in the >> > >>> FileUtil.compactPath() method. If the path only contains a "/" (or >> "\" >> > on >> > >>> Windows) the compactPath() method will: >> > >>> >> > >>> - Determine that the path both starts and ends with a slash. >> > >>> - First output a slash because the path
Re: Problems with sftp in Camel 2.11.0
I have now uploaded patches for fixing FileUtil and for testing the error in FileUtilTest. Like I wrote before, I think this is a really serious error since it affects (at least) ftp, ftps and sftp. I would really appreciate if a 2.11.1 bugfix release could happen real soon. I don't think that ftp/ftps/sftp can be safely used at all in 2.11.0. /Bengt 2013/4/24 Christian Müller > Hey Guys, > > thanks for reporting. > Could you provide a unit test which shows this issue (may directly for the > FileUtil class). Ans like always, patches are welcome and help us to fix > this issue soon. > > http://camel.apache.org/contributing.html > > Best, > Christian > > > On Wed, Apr 24, 2013 at 11:28 AM, Bengt Rodehav wrote: > > > I created a JIRA for this: > > > > https://issues.apache.org/jira/browse/CAMEL-6309 > > > > /Bengt > > > > > > 2013/4/24 Bengt Rodehav > > > > > Also, note that the "stepwise" option does not affect the bug I have > > > enountered. What happens for me is that Camel traverses the path to get > > > down to the subdirectory in order to verity that the subdirectory > exists > > > (or create it). Then when Camel tries to return to the original > directory > > > the error happens since it thinks that the original directory is "//" > and > > > not "/" as it should be. > > > > > > /Bengt > > > > > > > > > 2013/4/24 Bengt Rodehav > > > > > >> Hello Diether, > > >> > > >> The error you mention looks very similar to mine. However, you use ftp > > >> (and thus FtpOperations) while I use sftp (and SftpOperations). I > > haven't > > >> checked if they handle subdirectories in a similar way. I'm afraid > that > > the > > >> bug might affect many components since it is in camel-core (FileUtil > > >> class). Have you tried Camel 2.11.0 to verify if it works for you? > > >> > > >> I think whati will cause my problem is if you upload to a subdirectory > > >> via sftp and the home directory (where you end up after login) is "/" > > (or > > >> "\" on windows). > > >> > > >> /Bengt > > >> > > >> > > >> > > >> > > >> 2013/4/24 Diether > > >> > > >>> > > >>> This problem has been mentioned before: > > >>> > > >>> > > > http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html > > >>> > > >>> But it seems like still no fix has been implemented then. > > >>> For us it was working in 2.10.2 though, but not in 2.10.3 > > >>> > > >>> Regards, > > >>> Diether > > >>> > > >>> > > >>> Van: Bengt Rodehav [via Camel] [ > > ml-node+s465427n5731408...@n5.nabble.com > > >>> ] > > >>> Verzonden: woensdag 24 april 2013 10:28 > > >>> To: Wuyts Diether > > >>> Onderwerp: Re: Problems with sftp in Camel 2.11.0 > > >>> > > >>> I investigated this further and found a serious bug in the > > >>> FileUtil.compactPath() method. If the path only contains a "/" (or > "\" > > on > > >>> Windows) the compactPath() method will: > > >>> > > >>> - Determine that the path both starts and ends with a slash. > > >>> - First output a slash because the path starts with a slash > > >>> - Then output whatever comes after the leading slash (in this case > > >>> nothing) > > >>> - Last output a slash because the path ends with a slash, thus ending > > up > > >>> with two slashes which is incorrect > > >>> > > >>> The logic always assume that there is some other content in between > the > > >>> starting and ending slash. This will of course fail if the path only > > >>> consists of a single slash (or backslash). > > >>> > > >>> From what I can see this error was introduced in revision 1389069 on > > >>> September 23, 2012. This means that it probably doesn't work on any > > >>> version from (and including) Camel 2.10.2. The version we have in > > >>> production is Camel 2.7.1 which is why I haven't seen this problem > > >>> before.
Re: Problems with sftp in Camel 2.11.0
Hey Guys, thanks for reporting. Could you provide a unit test which shows this issue (may directly for the FileUtil class). Ans like always, patches are welcome and help us to fix this issue soon. http://camel.apache.org/contributing.html Best, Christian On Wed, Apr 24, 2013 at 11:28 AM, Bengt Rodehav wrote: > I created a JIRA for this: > > https://issues.apache.org/jira/browse/CAMEL-6309 > > /Bengt > > > 2013/4/24 Bengt Rodehav > > > Also, note that the "stepwise" option does not affect the bug I have > > enountered. What happens for me is that Camel traverses the path to get > > down to the subdirectory in order to verity that the subdirectory exists > > (or create it). Then when Camel tries to return to the original directory > > the error happens since it thinks that the original directory is "//" and > > not "/" as it should be. > > > > /Bengt > > > > > > 2013/4/24 Bengt Rodehav > > > >> Hello Diether, > >> > >> The error you mention looks very similar to mine. However, you use ftp > >> (and thus FtpOperations) while I use sftp (and SftpOperations). I > haven't > >> checked if they handle subdirectories in a similar way. I'm afraid that > the > >> bug might affect many components since it is in camel-core (FileUtil > >> class). Have you tried Camel 2.11.0 to verify if it works for you? > >> > >> I think whati will cause my problem is if you upload to a subdirectory > >> via sftp and the home directory (where you end up after login) is "/" > (or > >> "\" on windows). > >> > >> /Bengt > >> > >> > >> > >> > >> 2013/4/24 Diether > >> > >>> > >>> This problem has been mentioned before: > >>> > >>> > http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html > >>> > >>> But it seems like still no fix has been implemented then. > >>> For us it was working in 2.10.2 though, but not in 2.10.3 > >>> > >>> Regards, > >>> Diether > >>> > >>> > >>> Van: Bengt Rodehav [via Camel] [ > ml-node+s465427n5731408...@n5.nabble.com > >>> ] > >>> Verzonden: woensdag 24 april 2013 10:28 > >>> To: Wuyts Diether > >>> Onderwerp: Re: Problems with sftp in Camel 2.11.0 > >>> > >>> I investigated this further and found a serious bug in the > >>> FileUtil.compactPath() method. If the path only contains a "/" (or "\" > on > >>> Windows) the compactPath() method will: > >>> > >>> - Determine that the path both starts and ends with a slash. > >>> - First output a slash because the path starts with a slash > >>> - Then output whatever comes after the leading slash (in this case > >>> nothing) > >>> - Last output a slash because the path ends with a slash, thus ending > up > >>> with two slashes which is incorrect > >>> > >>> The logic always assume that there is some other content in between the > >>> starting and ending slash. This will of course fail if the path only > >>> consists of a single slash (or backslash). > >>> > >>> From what I can see this error was introduced in revision 1389069 on > >>> September 23, 2012. This means that it probably doesn't work on any > >>> version from (and including) Camel 2.10.2. The version we have in > >>> production is Camel 2.7.1 which is why I haven't seen this problem > >>> before. > >>> I was now hoping to upgrade to the latest Camel (2.11.0) which is when > I > >>> ran into this problem. > >>> > >>> This seems like a major blocker to me. I suspect that most people > >>> uploading > >>> files with sftp will encounter this problem since you normally have "/" > >>> as > >>> your home directory. Furthermore, the FileUtil class resides in > >>> camel-core > >>> which means that a lot of other components than sftp might be affected. > >>> > >>> Can anyone verify this? Is it possible to have a quick patch release > (if > >>> I'm right?) > >>> > >>> /Bengt > >>> > >>> > >>> 2013/4/24 Bengt Rodehav <[hidden email]> > >>> > >>> > The
Re: Problems with sftp in Camel 2.11.0
I created a JIRA for this: https://issues.apache.org/jira/browse/CAMEL-6309 /Bengt 2013/4/24 Bengt Rodehav > Also, note that the "stepwise" option does not affect the bug I have > enountered. What happens for me is that Camel traverses the path to get > down to the subdirectory in order to verity that the subdirectory exists > (or create it). Then when Camel tries to return to the original directory > the error happens since it thinks that the original directory is "//" and > not "/" as it should be. > > /Bengt > > > 2013/4/24 Bengt Rodehav > >> Hello Diether, >> >> The error you mention looks very similar to mine. However, you use ftp >> (and thus FtpOperations) while I use sftp (and SftpOperations). I haven't >> checked if they handle subdirectories in a similar way. I'm afraid that the >> bug might affect many components since it is in camel-core (FileUtil >> class). Have you tried Camel 2.11.0 to verify if it works for you? >> >> I think whati will cause my problem is if you upload to a subdirectory >> via sftp and the home directory (where you end up after login) is "/" (or >> "\" on windows). >> >> /Bengt >> >> >> >> >> 2013/4/24 Diether >> >>> >>> This problem has been mentioned before: >>> >>> http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html >>> >>> But it seems like still no fix has been implemented then. >>> For us it was working in 2.10.2 though, but not in 2.10.3 >>> >>> Regards, >>> Diether >>> >>> >>> Van: Bengt Rodehav [via Camel] [ml-node+s465427n5731408...@n5.nabble.com >>> ] >>> Verzonden: woensdag 24 april 2013 10:28 >>> To: Wuyts Diether >>> Onderwerp: Re: Problems with sftp in Camel 2.11.0 >>> >>> I investigated this further and found a serious bug in the >>> FileUtil.compactPath() method. If the path only contains a "/" (or "\" on >>> Windows) the compactPath() method will: >>> >>> - Determine that the path both starts and ends with a slash. >>> - First output a slash because the path starts with a slash >>> - Then output whatever comes after the leading slash (in this case >>> nothing) >>> - Last output a slash because the path ends with a slash, thus ending up >>> with two slashes which is incorrect >>> >>> The logic always assume that there is some other content in between the >>> starting and ending slash. This will of course fail if the path only >>> consists of a single slash (or backslash). >>> >>> From what I can see this error was introduced in revision 1389069 on >>> September 23, 2012. This means that it probably doesn't work on any >>> version from (and including) Camel 2.10.2. The version we have in >>> production is Camel 2.7.1 which is why I haven't seen this problem >>> before. >>> I was now hoping to upgrade to the latest Camel (2.11.0) which is when I >>> ran into this problem. >>> >>> This seems like a major blocker to me. I suspect that most people >>> uploading >>> files with sftp will encounter this problem since you normally have "/" >>> as >>> your home directory. Furthermore, the FileUtil class resides in >>> camel-core >>> which means that a lot of other components than sftp might be affected. >>> >>> Can anyone verify this? Is it possible to have a quick patch release (if >>> I'm right?) >>> >>> /Bengt >>> >>> >>> 2013/4/24 Bengt Rodehav <[hidden email]> >>> >>> > The following trace logging looks suspicious to me: >>> > >>> > 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations >>> > | onent.file.remote.SftpOperations 377 | Current dir: / >>> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >>> > | onent.file.remote.SftpOperations 385 | >>> > changeCurrentDirectory(/) >>> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >>> > | onent.file.remote.SftpOperations 396 | Compacted path: >>> / -> >>> > // using separator: / >>> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >>> > | onent.file.remote.SftpOperations 440 | Changing >&
Re: Problems with sftp in Camel 2.11.0
Also, note that the "stepwise" option does not affect the bug I have enountered. What happens for me is that Camel traverses the path to get down to the subdirectory in order to verity that the subdirectory exists (or create it). Then when Camel tries to return to the original directory the error happens since it thinks that the original directory is "//" and not "/" as it should be. /Bengt 2013/4/24 Bengt Rodehav > Hello Diether, > > The error you mention looks very similar to mine. However, you use ftp > (and thus FtpOperations) while I use sftp (and SftpOperations). I haven't > checked if they handle subdirectories in a similar way. I'm afraid that the > bug might affect many components since it is in camel-core (FileUtil > class). Have you tried Camel 2.11.0 to verify if it works for you? > > I think whati will cause my problem is if you upload to a subdirectory via > sftp and the home directory (where you end up after login) is "/" (or "\" > on windows). > > /Bengt > > > > > 2013/4/24 Diether > >> >> This problem has been mentioned before: >> >> http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html >> >> But it seems like still no fix has been implemented then. >> For us it was working in 2.10.2 though, but not in 2.10.3 >> >> Regards, >> Diether >> >> ____________ >> Van: Bengt Rodehav [via Camel] [ml-node+s465427n5731408...@n5.nabble.com] >> Verzonden: woensdag 24 april 2013 10:28 >> To: Wuyts Diether >> Onderwerp: Re: Problems with sftp in Camel 2.11.0 >> >> I investigated this further and found a serious bug in the >> FileUtil.compactPath() method. If the path only contains a "/" (or "\" on >> Windows) the compactPath() method will: >> >> - Determine that the path both starts and ends with a slash. >> - First output a slash because the path starts with a slash >> - Then output whatever comes after the leading slash (in this case >> nothing) >> - Last output a slash because the path ends with a slash, thus ending up >> with two slashes which is incorrect >> >> The logic always assume that there is some other content in between the >> starting and ending slash. This will of course fail if the path only >> consists of a single slash (or backslash). >> >> From what I can see this error was introduced in revision 1389069 on >> September 23, 2012. This means that it probably doesn't work on any >> version from (and including) Camel 2.10.2. The version we have in >> production is Camel 2.7.1 which is why I haven't seen this problem before. >> I was now hoping to upgrade to the latest Camel (2.11.0) which is when I >> ran into this problem. >> >> This seems like a major blocker to me. I suspect that most people >> uploading >> files with sftp will encounter this problem since you normally have "/" as >> your home directory. Furthermore, the FileUtil class resides in camel-core >> which means that a lot of other components than sftp might be affected. >> >> Can anyone verify this? Is it possible to have a quick patch release (if >> I'm right?) >> >> /Bengt >> >> >> 2013/4/24 Bengt Rodehav <[hidden email]> >> >> > The following trace logging looks suspicious to me: >> > >> > 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations >> > | onent.file.remote.SftpOperations 377 | Current dir: / >> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >> > | onent.file.remote.SftpOperations 385 | >> > changeCurrentDirectory(/) >> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >> > | onent.file.remote.SftpOperations 396 | Compacted path: / >> -> >> > // using separator: / >> > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations >> > | onent.file.remote.SftpOperations 440 | Changing >> directory: // >> > >> > So, it seems like Camel correctly determines that current directory is >> "/" >> > but it then changes the path to "//" which of course is incorrect. >> > >> > /Bengt >> > >> > >> > 2013/4/24 Bengt Rodehav <[hidden email]> >> > >> >> Some more information. I logged on the sftp server using cygwin (I'm >> >> running on Windows 7 BTW) and executed a "pwd" command just to see >&g
Re: Problems with sftp in Camel 2.11.0
Hello Diether, The error you mention looks very similar to mine. However, you use ftp (and thus FtpOperations) while I use sftp (and SftpOperations). I haven't checked if they handle subdirectories in a similar way. I'm afraid that the bug might affect many components since it is in camel-core (FileUtil class). Have you tried Camel 2.11.0 to verify if it works for you? I think whati will cause my problem is if you upload to a subdirectory via sftp and the home directory (where you end up after login) is "/" (or "\" on windows). /Bengt 2013/4/24 Diether > > This problem has been mentioned before: > > http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html > > But it seems like still no fix has been implemented then. > For us it was working in 2.10.2 though, but not in 2.10.3 > > Regards, > Diether > > > Van: Bengt Rodehav [via Camel] [ml-node+s465427n5731408...@n5.nabble.com] > Verzonden: woensdag 24 april 2013 10:28 > To: Wuyts Diether > Onderwerp: Re: Problems with sftp in Camel 2.11.0 > > I investigated this further and found a serious bug in the > FileUtil.compactPath() method. If the path only contains a "/" (or "\" on > Windows) the compactPath() method will: > > - Determine that the path both starts and ends with a slash. > - First output a slash because the path starts with a slash > - Then output whatever comes after the leading slash (in this case nothing) > - Last output a slash because the path ends with a slash, thus ending up > with two slashes which is incorrect > > The logic always assume that there is some other content in between the > starting and ending slash. This will of course fail if the path only > consists of a single slash (or backslash). > > From what I can see this error was introduced in revision 1389069 on > September 23, 2012. This means that it probably doesn't work on any > version from (and including) Camel 2.10.2. The version we have in > production is Camel 2.7.1 which is why I haven't seen this problem before. > I was now hoping to upgrade to the latest Camel (2.11.0) which is when I > ran into this problem. > > This seems like a major blocker to me. I suspect that most people uploading > files with sftp will encounter this problem since you normally have "/" as > your home directory. Furthermore, the FileUtil class resides in camel-core > which means that a lot of other components than sftp might be affected. > > Can anyone verify this? Is it possible to have a quick patch release (if > I'm right?) > > /Bengt > > > 2013/4/24 Bengt Rodehav <[hidden email]> > > > The following trace logging looks suspicious to me: > > > > 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations > > | onent.file.remote.SftpOperations 377 | Current dir: / > > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > > | onent.file.remote.SftpOperations 385 | > > changeCurrentDirectory(/) > > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > > | onent.file.remote.SftpOperations 396 | Compacted path: / > -> > > // using separator: / > > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > > | onent.file.remote.SftpOperations 440 | Changing > directory: // > > > > So, it seems like Camel correctly determines that current directory is > "/" > > but it then changes the path to "//" which of course is incorrect. > > > > /Bengt > > > > > > 2013/4/24 Bengt Rodehav <[hidden email]> > > > >> Some more information. I logged on the sftp server using cygwin (I'm > >> running on Windows 7 BTW) and executed a "pwd" command just to see what > the > >> server replied and it said: > >> > >> sftp> pwd > >> Remote working directory: / > >> > >> This looks perfectly fine to me and is a normal setup. I e my home > >> directory looks like the root folder to me since I'm not authorised to > >> anything but my home directory. Don't quite understand what causes my > >> problems. > >> > >> /Bengt > >> > >> > >> 2013/4/24 Bengt Rodehav <[hidden email]> > >> > >>> I've now checked this issue a bit further. It turned out that I hadn't > >>> tested this on Camel 2.10.3. What I had tested was the corresponding > >>> consumtion of files from the sftp server which also works with Camel > >>> 2
RE: Problems with sftp in Camel 2.11.0
This problem has been mentioned before: http://camel.465427.n5.nabble.com/Producing-files-to-ftp-now-working-in-2-10-3-td5726060.html But it seems like still no fix has been implemented then. For us it was working in 2.10.2 though, but not in 2.10.3 Regards, Diether Van: Bengt Rodehav [via Camel] [ml-node+s465427n5731408...@n5.nabble.com] Verzonden: woensdag 24 april 2013 10:28 To: Wuyts Diether Onderwerp: Re: Problems with sftp in Camel 2.11.0 I investigated this further and found a serious bug in the FileUtil.compactPath() method. If the path only contains a "/" (or "\" on Windows) the compactPath() method will: - Determine that the path both starts and ends with a slash. - First output a slash because the path starts with a slash - Then output whatever comes after the leading slash (in this case nothing) - Last output a slash because the path ends with a slash, thus ending up with two slashes which is incorrect The logic always assume that there is some other content in between the starting and ending slash. This will of course fail if the path only consists of a single slash (or backslash). >From what I can see this error was introduced in revision 1389069 on September 23, 2012. This means that it probably doesn't work on any version from (and including) Camel 2.10.2. The version we have in production is Camel 2.7.1 which is why I haven't seen this problem before. I was now hoping to upgrade to the latest Camel (2.11.0) which is when I ran into this problem. This seems like a major blocker to me. I suspect that most people uploading files with sftp will encounter this problem since you normally have "/" as your home directory. Furthermore, the FileUtil class resides in camel-core which means that a lot of other components than sftp might be affected. Can anyone verify this? Is it possible to have a quick patch release (if I'm right?) /Bengt 2013/4/24 Bengt Rodehav <[hidden email]> > The following trace logging looks suspicious to me: > > 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 377 | Current dir: / > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 385 | > changeCurrentDirectory(/) > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 396 | Compacted path: / -> > // using separator: / > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 440 | Changing directory: // > > So, it seems like Camel correctly determines that current directory is "/" > but it then changes the path to "//" which of course is incorrect. > > /Bengt > > > 2013/4/24 Bengt Rodehav <[hidden email]> > >> Some more information. I logged on the sftp server using cygwin (I'm >> running on Windows 7 BTW) and executed a "pwd" command just to see what the >> server replied and it said: >> >> sftp> pwd >> Remote working directory: / >> >> This looks perfectly fine to me and is a normal setup. I e my home >> directory looks like the root folder to me since I'm not authorised to >> anything but my home directory. Don't quite understand what causes my >> problems. >> >> /Bengt >> >> >> 2013/4/24 Bengt Rodehav <[hidden email]> >> >>> I've now checked this issue a bit further. It turned out that I hadn't >>> tested this on Camel 2.10.3. What I had tested was the corresponding >>> consumtion of files from the sftp server which also works with Camel >>> 2.11.0. So this is probably not a Camel 2.11.0 issue. The following >>> consuming route works fine: >>> >>> fromUri=sftp://myUser@myServer/subdir?password=myPassword&stepwise=false >>> >>> I think I had to use double "/" in Camel 2.10.3 but with Camel 2.11.0 it >>> works with a single "/". >>> >>> Looking at the code and the full stacktrace (I include it at the end of >>> the mail) it seems like what fails is the initial building of the >>> subdirectory. In the process, Camel is changing directory down to the >>> subdirectory and when done changes back to the starting/original directory. >>> However, for some reason, Camel thinks that the original directory is "//" >>> which is an incorrect path and fails. >>> >>> So it seems like it is the detection of the original directory that does >>> not work. I currently have no workaround for this. If I skip using a sub >>> directo
Re: Problems with sftp in Camel 2.11.0
I investigated this further and found a serious bug in the FileUtil.compactPath() method. If the path only contains a "/" (or "\" on Windows) the compactPath() method will: - Determine that the path both starts and ends with a slash. - First output a slash because the path starts with a slash - Then output whatever comes after the leading slash (in this case nothing) - Last output a slash because the path ends with a slash, thus ending up with two slashes which is incorrect The logic always assume that there is some other content in between the starting and ending slash. This will of course fail if the path only consists of a single slash (or backslash). >From what I can see this error was introduced in revision 1389069 on September 23, 2012. This means that it probably doesn't work on any version from (and including) Camel 2.10.2. The version we have in production is Camel 2.7.1 which is why I haven't seen this problem before. I was now hoping to upgrade to the latest Camel (2.11.0) which is when I ran into this problem. This seems like a major blocker to me. I suspect that most people uploading files with sftp will encounter this problem since you normally have "/" as your home directory. Furthermore, the FileUtil class resides in camel-core which means that a lot of other components than sftp might be affected. Can anyone verify this? Is it possible to have a quick patch release (if I'm right?) /Bengt 2013/4/24 Bengt Rodehav > The following trace logging looks suspicious to me: > > 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 377 | Current dir: / > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 385 | > changeCurrentDirectory(/) > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 396 | Compacted path: / -> > // using separator: / > 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations > | onent.file.remote.SftpOperations 440 | Changing directory: // > > So, it seems like Camel correctly determines that current directory is "/" > but it then changes the path to "//" which of course is incorrect. > > /Bengt > > > 2013/4/24 Bengt Rodehav > >> Some more information. I logged on the sftp server using cygwin (I'm >> running on Windows 7 BTW) and executed a "pwd" command just to see what the >> server replied and it said: >> >> sftp> pwd >> Remote working directory: / >> >> This looks perfectly fine to me and is a normal setup. I e my home >> directory looks like the root folder to me since I'm not authorised to >> anything but my home directory. Don't quite understand what causes my >> problems. >> >> /Bengt >> >> >> 2013/4/24 Bengt Rodehav >> >>> I've now checked this issue a bit further. It turned out that I hadn't >>> tested this on Camel 2.10.3. What I had tested was the corresponding >>> consumtion of files from the sftp server which also works with Camel >>> 2.11.0. So this is probably not a Camel 2.11.0 issue. The following >>> consuming route works fine: >>> >>> fromUri=sftp://myUser@myServer/subdir?password=myPassword&stepwise=false >>> >>> I think I had to use double "/" in Camel 2.10.3 but with Camel 2.11.0 it >>> works with a single "/". >>> >>> Looking at the code and the full stacktrace (I include it at the end of >>> the mail) it seems like what fails is the initial building of the >>> subdirectory. In the process, Camel is changing directory down to the >>> subdirectory and when done changes back to the starting/original directory. >>> However, for some reason, Camel thinks that the original directory is "//" >>> which is an incorrect path and fails. >>> >>> So it seems like it is the detection of the original directory that does >>> not work. I currently have no workaround for this. If I skip using a sub >>> directory it works. E g: >>> >>> sftp://myUser@myServer/?password=myPassword&stepwise=false >>> >>> In that case Camel does not need to change directory to the subdirectory >>> and therefore does not need to change back either. Unfortunately I am not >>> in control of the directory structure. I need to be able to poll files from >>> one subdirectory (which works) and write files to another subdirectory >>> (which doesn't work). >>> >>> Here is the stacktrace: >>> >>> 2013-04-24 08:34:38,533 | ERROR | terfaces/nfm/out | DefaultErrorHandler >>> | rg.apache.camel.util.CamelLogger 215 | Failed delivery for >>> (MessageId: ID-IT-D-FQR815J-62818-1366717659819-18-1 on ExchangeId: >>> ID-IT-D-FQR815J-62818-1366717659819-18-2). Exhausted after delivery >>> attempt: 1 caught: >>> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot >>> change directory to: //. Processed by failure processor: >>> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba
Re: Problems with sftp in Camel 2.11.0
The following trace logging looks suspicious to me: 2013-04-24 09:34:40,776 | TRACE | terfaces/nfm/out | SftpOperations | onent.file.remote.SftpOperations 377 | Current dir: / 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations | onent.file.remote.SftpOperations 385 | changeCurrentDirectory(/) 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations | onent.file.remote.SftpOperations 396 | Compacted path: / -> // using separator: / 2013-04-24 09:34:40,782 | TRACE | terfaces/nfm/out | SftpOperations | onent.file.remote.SftpOperations 440 | Changing directory: // So, it seems like Camel correctly determines that current directory is "/" but it then changes the path to "//" which of course is incorrect. /Bengt 2013/4/24 Bengt Rodehav > Some more information. I logged on the sftp server using cygwin (I'm > running on Windows 7 BTW) and executed a "pwd" command just to see what the > server replied and it said: > > sftp> pwd > Remote working directory: / > > This looks perfectly fine to me and is a normal setup. I e my home > directory looks like the root folder to me since I'm not authorised to > anything but my home directory. Don't quite understand what causes my > problems. > > /Bengt > > > 2013/4/24 Bengt Rodehav > >> I've now checked this issue a bit further. It turned out that I hadn't >> tested this on Camel 2.10.3. What I had tested was the corresponding >> consumtion of files from the sftp server which also works with Camel >> 2.11.0. So this is probably not a Camel 2.11.0 issue. The following >> consuming route works fine: >> >> fromUri=sftp://myUser@myServer/subdir?password=myPassword&stepwise=false >> >> I think I had to use double "/" in Camel 2.10.3 but with Camel 2.11.0 it >> works with a single "/". >> >> Looking at the code and the full stacktrace (I include it at the end of >> the mail) it seems like what fails is the initial building of the >> subdirectory. In the process, Camel is changing directory down to the >> subdirectory and when done changes back to the starting/original directory. >> However, for some reason, Camel thinks that the original directory is "//" >> which is an incorrect path and fails. >> >> So it seems like it is the detection of the original directory that does >> not work. I currently have no workaround for this. If I skip using a sub >> directory it works. E g: >> >> sftp://myUser@myServer/?password=myPassword&stepwise=false >> >> In that case Camel does not need to change directory to the subdirectory >> and therefore does not need to change back either. Unfortunately I am not >> in control of the directory structure. I need to be able to poll files from >> one subdirectory (which works) and write files to another subdirectory >> (which doesn't work). >> >> Here is the stacktrace: >> >> 2013-04-24 08:34:38,533 | ERROR | terfaces/nfm/out | DefaultErrorHandler >> | rg.apache.camel.util.CamelLogger 215 | Failed delivery for >> (MessageId: ID-IT-D-FQR815J-62818-1366717659819-18-1 on ExchangeId: >> ID-IT-D-FQR815J-62818-1366717659819-18-2). Exhausted after delivery >> attempt: 1 caught: >> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot >> change directory to: //. Processed by failure processor: >> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c] >> -> >> se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c >> ]] >> org.apache.camel.component.file.GenericFileOperationFailedException: >> Cannot change directory to: // >> at >> org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:444)[126:org.apache.camel.camel-ftp:2.11.0] >> at >> org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:401)[126:org.apache.camel.camel-ftp:2.11.0] >> at >> org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:340)[126:org.apache.camel.camel-ftp:2.11.0] >> at >> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:246)[105:org.apache.camel.camel-core:2.11.0] >> at >> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:159)[105:org.apache.camel.camel-core:2.11.0] >> at >> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[126:org.apache.camel.camel-ftp:2.11.0] >> at >> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[105:org.apache.camel.camel-core:2.11.0] >> at >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] >> at >> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[105:org.apache.camel.camel-core:2.11.0] >> at >> org.apache.camel.impl
Re: Problems with sftp in Camel 2.11.0
Some more information. I logged on the sftp server using cygwin (I'm running on Windows 7 BTW) and executed a "pwd" command just to see what the server replied and it said: sftp> pwd Remote working directory: / This looks perfectly fine to me and is a normal setup. I e my home directory looks like the root folder to me since I'm not authorised to anything but my home directory. Don't quite understand what causes my problems. /Bengt 2013/4/24 Bengt Rodehav > I've now checked this issue a bit further. It turned out that I hadn't > tested this on Camel 2.10.3. What I had tested was the corresponding > consumtion of files from the sftp server which also works with Camel > 2.11.0. So this is probably not a Camel 2.11.0 issue. The following > consuming route works fine: > > fromUri=sftp://myUser@myServer/subdir?password=myPassword&stepwise=false > > I think I had to use double "/" in Camel 2.10.3 but with Camel 2.11.0 it > works with a single "/". > > Looking at the code and the full stacktrace (I include it at the end of > the mail) it seems like what fails is the initial building of the > subdirectory. In the process, Camel is changing directory down to the > subdirectory and when done changes back to the starting/original directory. > However, for some reason, Camel thinks that the original directory is "//" > which is an incorrect path and fails. > > So it seems like it is the detection of the original directory that does > not work. I currently have no workaround for this. If I skip using a sub > directory it works. E g: > > sftp://myUser@myServer/?password=myPassword&stepwise=false > > In that case Camel does not need to change directory to the subdirectory > and therefore does not need to change back either. Unfortunately I am not > in control of the directory structure. I need to be able to poll files from > one subdirectory (which works) and write files to another subdirectory > (which doesn't work). > > Here is the stacktrace: > > 2013-04-24 08:34:38,533 | ERROR | terfaces/nfm/out | DefaultErrorHandler >| rg.apache.camel.util.CamelLogger 215 | Failed delivery for > (MessageId: ID-IT-D-FQR815J-62818-1366717659819-18-1 on ExchangeId: > ID-IT-D-FQR815J-62818-1366717659819-18-2). Exhausted after delivery > attempt: 1 caught: > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > change directory to: //. Processed by failure processor: > FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c] > -> > se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c > ]] > org.apache.camel.component.file.GenericFileOperationFailedException: > Cannot change directory to: // > at > org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:444)[126:org.apache.camel.camel-ftp:2.11.0] > at > org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:401)[126:org.apache.camel.camel-ftp:2.11.0] > at > org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:340)[126:org.apache.camel.camel-ftp:2.11.0] > at > org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:246)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:159)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[126:org.apache.camel.camel-ftp:2.11.0] > at > org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] > at > org.apache.c
Re: Problems with sftp in Camel 2.11.0
I've now checked this issue a bit further. It turned out that I hadn't tested this on Camel 2.10.3. What I had tested was the corresponding consumtion of files from the sftp server which also works with Camel 2.11.0. So this is probably not a Camel 2.11.0 issue. The following consuming route works fine: fromUri=sftp://myUser@myServer/subdir?password=myPassword&stepwise=false I think I had to use double "/" in Camel 2.10.3 but with Camel 2.11.0 it works with a single "/". Looking at the code and the full stacktrace (I include it at the end of the mail) it seems like what fails is the initial building of the subdirectory. In the process, Camel is changing directory down to the subdirectory and when done changes back to the starting/original directory. However, for some reason, Camel thinks that the original directory is "//" which is an incorrect path and fails. So it seems like it is the detection of the original directory that does not work. I currently have no workaround for this. If I skip using a sub directory it works. E g: sftp://myUser@myServer/?password=myPassword&stepwise=false In that case Camel does not need to change directory to the subdirectory and therefore does not need to change back either. Unfortunately I am not in control of the directory structure. I need to be able to poll files from one subdirectory (which works) and write files to another subdirectory (which doesn't work). Here is the stacktrace: 2013-04-24 08:34:38,533 | ERROR | terfaces/nfm/out | DefaultErrorHandler | rg.apache.camel.util.CamelLogger 215 | Failed delivery for (MessageId: ID-IT-D-FQR815J-62818-1366717659819-18-1 on ExchangeId: ID-IT-D-FQR815J-62818-1366717659819-18-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: //. Processed by failure processor: FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c] -> se.digia.connect.service.filetransfer.FileTransferService$NotificationProcessor@2ba6ac4c ]] org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: // at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:444)[126:org.apache.camel.camel-ftp:2.11.0] at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:401)[126:org.apache.camel.camel-ftp:2.11.0] at org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:340)[126:org.apache.camel.camel-ftp:2.11.0] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:246)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:159)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[126:org.apache.camel.camel-ftp:2.11.0] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.interceptor.BacklogTracerInterceptor.process(BacklogTracerInterceptor.java:84)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[105:org.apache.camel.camel-core:2.11.0] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[
Re: Problems with sftp in Camel 2.11.0
Thanks for both your answers Chris and mdo, I will try to move the username as you both suggest but according to the documentation this should still be valid syntax. What puzzles me is the "...Cannot change directory to: //" since it sounds like Camel is actually trying to change directory despite the "stepwise=false". Will try tomorrow when I'm back at work. Thanks, /Bengt 2013/4/23 mdo > > BTW: I'm using URIs like this successfully with 2.11: > sftp://192.168.1.2:22//home/user/ > sftp://localhost//tmp/subdir/ > > Both being absolute paths. Login name and passwords appended along with > other options. > > Regards, mdo. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problems-with-sftp-in-Camel-2-11-0-tp5731359p5731372.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
Re: Problems with sftp in Camel 2.11.0
BTW: I'm using URIs like this successfully with 2.11: sftp://192.168.1.2:22//home/user/ sftp://localhost//tmp/subdir/ Both being absolute paths. Login name and passwords appended along with other options. Regards, mdo. -- View this message in context: http://camel.465427.n5.nabble.com/Problems-with-sftp-in-Camel-2-11-0-tp5731359p5731372.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problems with sftp in Camel 2.11.0
Bengt Rodehav wrote > sftp://myUser@myServer//subdir?password=myPassword&stepwise=false > > This worked fine in Camel 2.10.3. Note that I had to use double "/" to get > it to work. Using Camel 2.11.0 I get the following error: The first slash is treated as separator between the authority part of your URI and the path element (/subdir). If you omit the "second" slash the SFTP component (or Jsch) would try to change to the directory "subdir" relative to the current working dir your SFTP session is started in. So using the second slash is necessary in order to define an absolute URI which I assume is what you want to do. Regards, mdo. -- View this message in context: http://camel.465427.n5.nabble.com/Problems-with-sftp-in-Camel-2-11-0-tp5731359p5731370.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problems with sftp in Camel 2.11.0
What happens if you specify the username as query parameter? sftp://myServer/subdir?username=myUser&password=myPassword&stepwise=false (I didn't upgrade, so I can't try it) On Tue, Apr 23, 2013 at 8:33 AM, Bengt Rodehav wrote: > I just upgraded from Camel 2.10.3 to 2.11.0 and I now cannot get my sftp > routes to work. > > I used to specify the sftp endpont as follows: > > sftp://myUser@myServer//subdir?password=myPassword&stepwise=false > > This worked fine in Camel 2.10.3. Note that I had to use double "/" to get > it to work. Using Camel 2.11.0 I get the following error: > > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > change directory to: // > > I tried removing the double "/", changing stepwise back and forth and also > tried changin the separator to UNIX/Windows. Nothing helps. I can't find > any combination that works. > > Does anyone have an idea what is happening and what has changed regarding > this in Camel 2.11.0. > > /Bengt
Problems with sftp in Camel 2.11.0
I just upgraded from Camel 2.10.3 to 2.11.0 and I now cannot get my sftp routes to work. I used to specify the sftp endpont as follows: sftp://myUser@myServer//subdir?password=myPassword&stepwise=false This worked fine in Camel 2.10.3. Note that I had to use double "/" to get it to work. Using Camel 2.11.0 I get the following error: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: // I tried removing the double "/", changing stepwise back and forth and also tried changin the separator to UNIX/Windows. Nothing helps. I can't find any combination that works. Does anyone have an idea what is happening and what has changed regarding this in Camel 2.11.0. /Bengt