camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean Francois LE BESCONT <jflebesc...@gmail.com>
Subject Re: Files cannot be moved on FTP
Date Wed, 20 Mar 2013 13:34:03 GMT
Hi all !

I have the same problem with ftp transfert ( 550 Failed to change
directory.)

I am working with the 2.10.5-SNAPSHOT

An anonymous transfert from public ftp like :

from("
ftp://ftp.mozilla.org/pub/mozilla.org/b2g/manifests/1.0.0/2012/08/2012-08-15?stepwise=false
")
  .to("file://C:/temp/")
  .log("Download => ${file:name}")
.end();

2013-03-20 14:24:55 - [fests/1.0.0/2012/08/2012-08-15] FtpConsumer
           INFO  Connected and logged in to:
ftp://anonymous@ftp.mozilla.org:21
2013-03-20 14:24:57 - [fests/1.0.0/2012/08/2012-08-15] MED_DOWNLOAD_CDR
          INFO  Download => source_emulator-arm_2012-08-15.xml
2013-03-20 14:24:58 - [fests/1.0.0/2012/08/2012-08-15] MED_DOWNLOAD_CDR
          INFO  Download => source_nexus-s_2012-08-15.xml
2013-03-20 14:24:59 - [fests/1.0.0/2012/08/2012-08-15] MED_DOWNLOAD_CDR
          INFO  Download => source_otoro_2012-08-15.xml
2013-03-20 14:24:59 - [fests/1.0.0/2012/08/2012-08-15] MED_DOWNLOAD_CDR
          INFO  Download => source_sgs2_2012-08-15.xml

Works good but when I try with my development ftp server ( solaris
accessible with winscp and which contains data ) a route :

from("ftp://devcyp05@192.168.0.203/tmp/JFL" + "?password=secret" +
"&separator=UNIX" + "&stepwise=false") .to("file://C:/temp/")
.log("Download => ${file:name}") .end();

No transfert are started, I just have :

2013-03-20 14:30:05 - [devcyp05@192.168.0.203/tmp/JFL] FtpConsumer
           INFO  Connected and logged in to: ftp://devcyp05@192.168.0.203:21

I have files in my /tmp/JFL directory :)

Any idea ?

Thanks


JF



2013/3/20 Claus Ibsen <claus.ibsen@gmail.com>

> Hi
>
> So what is the status of your test. Can you break it down more clearly
> what works and doesn't work for you?
> Also can you post how you have configured the Camel ftp endpoints.
>
>
>
> On Wed, Mar 20, 2013 at 11:42 AM, Lutter, Robin
> <Robin.Lutter@t-systems.com> wrote:
> > Hi Claus,
> >
> > Sorry for late response. Yes, I have successfully tested the patch in
> our environment. Thanks for applying it.
> > Yesterday exception was gone but files where not moved using both
> SNAPSHOT versions
> > Today my experience is, that using 2.10.5-SNAPSHOT with windows client
> and ftp server running on Linux or windows files will be moved.
> > But with 2.11-SNAPSHOT using it with Linux ftp server - the exception is
> back again:
> >
> > org.apache.camel.component.file.GenericFileOperationFailedException:
> File operation failed: 550 Failed to change directory.
> > Cannot change directory to: "/". Code: 550]
> > org.apache.camel.component.file.GenericFileOperationFailedException:
> File operation failed: 550 Failed to change directory.
> >  Cannot change directory to: "/". Code: 550
> >         at
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:748)
> >         at
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:704)
> >         at
> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:285)
> >         at
> org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:103)
> >         at
> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
> >         at
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:144)
> >         at
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)
> >         at
> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)
> >
> > Regards Robin
> > Tests using: camel-ftp-2.10.5-20130315.195903-8 and
> camel-ftp-2.11-20130320.060217-416
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> > Gesendet: Freitag, 15. März 2013 09:59
> > An: users@camel.apache.org
> > Betreff: Re: Files cannot be moved on FTP
> >
> > On Thu, Mar 14, 2013 at 8:31 PM, Lutter, Robin <
> Robin.Lutter@t-systems.com> wrote:
> >> Hi Claus and Filippo,
> >>
> >> Christian Schäfer had already filled a bug for this issue
> >> https://issues.apache.org/jira/browse/CAMEL-6056
> >>
> >> I attached a patch at it.
> >>
> >> Regards Robin
> >>
> >
> > Thanks for the patch. I am looking in that now.
> > I assume you have tested the patch on your system and have it working?
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> >> Gesendet: Mittwoch, 13. März 2013 08:11
> >> An: users@camel.apache.org
> >> Betreff: Re: Files cannot be moved on FTP
> >>
> >> On Tue, Mar 12, 2013 at 8:36 PM, Lutter, Robin <
> Robin.Lutter@t-systems.com> wrote:
> >>> Hi Claus,
> >>>
> >>> i think the error is in method  FileUtil.isWindows() because it
> determines the separator char for client os and not for server os. The
> given setting for separator is ignored at this place.
> >>> I would suggest to change FtpOperations line 656  to path =
> >>> FileUtil.compactPath(path,
> >>> endpoint.getConfiguration().getSeparator());
> >>>
> >>> Should I fill an jira ticket for 2.11?
> >>>
> >>
> >> Yeah this sounds right, that if you have configured an separator as
> wither unix or windows then we should use that from the configuration.
> >> If its AUTO we should not use any separator but leave the path slashes
> as is.
> >>
> >> Fell free to log a JIRA and attach a proposed patch.
> >>
> >>> Regards Robin
> >>> I think there is an similar thread from xuloo 'camel-ftp 2.10.4 fails
> to connect on windows'
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von: Lutter, Robin
> >>> Gesendet: Montag, 11. März 2013 15:57
> >>> An: users@camel.apache.org
> >>> Betreff: AW: Files cannot be moved on FTP
> >>>
> >>> Hi Claus,
> >>>
> >>> We are already using stepwise=false.
> >>> This is the ftp-uri I have in my testcase:
> >>> from("ftp://" + getFTPServerAddress() +
> >>>                         "/test?password=secret" +
> >>>                         "&ftpClient.dataTimeout=30000&stepwise=false"
+
> >>>                         "&passiveMode=true&binary=true" +
> >>>                         "&move=success&separator=UNIX" +
> >>>                         "&antInclude=FILE.TXT")
> >>>                         .log("${body}");
> >>>
> >>> Tracing file.remote turns out, that  FileUtil normalizePath is using
> >>> File.separator from local system and not the separator setting TRACE
> >>> org.apache.camel.component.file.remote.FtpOperations -
> >>> changeCurrentDirectory(/)
> >>> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
> >>> directory: \\
> >>>
> >>> With stepwise=true the extra escaped backslash is away:
> >>> TRACE org.apache.camel.component.file.remote.FtpOperations -
> >>> changeCurrentDirectory(/)
> >>> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
> >>> directory: \
> >>>
> >>> Regards Robin
> >>>
> >>> On Thu, Mar 7, 2013 at 12:04 AM, Claus Ibsen <claus.ibsen@gmail.com>
> >>> wrote:
> >>>> On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin
> >>> <Robin.Lutter@t-systems.com> wrote:
> >>>>> Hi Claus,
> >>>>>
> >>>>> we use ftp. Setting separator to UNIX doesn't help. Contrary the
> >>> error
> >>>>> occurs earlier in process:
> >>>>>
> >>>>> WARN  org.apache.camel.component.file.GenericFileOnCompletion -
> >>> Caused
> >>>>> by:
> >>>>> [org.apache.camel.component.file.GenericFileOperationFailedExceptio
> >>>>> n
> >>>>> - File operation failed: 550 Failed to change directory.
> >>>>>  Cannot change directory to: \\. Code: 550]
> >>>>> org.apache.camel.component.file.GenericFileOperationFailedException:
> >>>>> File operation failed: 550 Failed to change directory.
> >>>>>
> >>>>> Strange: server log can still contains CWD \\
> >>>>>
> >>>>
> >>>> Can you try with stepwise=false
> >>>> You can read more about this option at: http://camel.apache.org/ftp2
> >>>>
> >>>> And yeah looks like we should fix that double slash bug. It ought to
> >>> be a single slash.
> >>>>
> >>>> If you get this error all the time. Then feel free to enable TRACE
> >>> logging on org.apache.camel.component.file.remote
> >>>>
> >>>> Then we can possible use that to bettet understand what goes wrong.
> >>>>
> >>>>
> >>>>
> >>>>> Regards Robin
> >>>>>
> >>>>> On Wed, Mar 6, 2013 at 11:23 AM, Claus Ibsen
> >>>>> <claus.ibsen@gmail.com>
> >>>>> wrote:
> >>>>>> On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin
> >>>>> <Robin.Lutter@t-systems.com> wrote:
> >>>>>> > Hi Filippo Balicchia,
> >>>>>> >
> >>>>>> > i can confirm, that move works with camel-ftp 2.10.4 and
apache
> >>>>>> > ftpserver project on windows maschine with JDK 1.6.0_33.
> >>>>>> > While running with ftp server under RHEL 6 move failed
with
> >>>>> errorcode
> >>>>>> > 550. Rename works with commandline.
> >>>>>> >
> >>>>>> > Logs from ftpserver:
> >>>>>> >>  CWD 20121201000000.OML                     "550 Failed
to change
> >>>>>> > directory."
> >>>>>> >>  CWD "\"
> >>>>>> > "550 Failed to change directory."
> >>>>>> >>  CWD \\
> >>>>>> > "550 Failed to change directory."
> >>>>>> >>  CWD "
> >>>>>> > "550 Failed to change directory."
> >>>>>> >
> >>>>>> > Differences in log between 2.10.2 and 2.10.4
> >>>>>> > 2.10.2:                         2.10.4
> >>>>>> > CWD test/success                         CWD test/success
> >>>>>> > PWD                                                   PWD
> >>>>>> > CWD /                                                CWD
\\
> >>>>>> >
> >>>>>> > Regards
> >>>>>> > Robin
> >>>>>>
> >>>>>> Are you using the ftp or sftp. Just to be sure which one is
being
> >>>>> used.
> >>>>>>
> >>>>>> Also you can try setting separator=Unix to tell Camel to use
/ for
> >>>>> path separators.
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Claus Ibsen
> >>>>>> -----------------
> >>>>>> Red Hat, Inc.
> >>>>>> FuseSource is now part of Red Hat
> >>>>>> Email: cibsen@redhat.com
> >>>>>> Web: http://fusesource.com
> >>>>>> Twitter: davsclaus
> >>>>>> Blog: http://davsclaus.com
> >>>>>> Author of Camel in Action: http://www.manning.com/ibsen
> >>>
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: cibsen@redhat.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: cibsen@redhat.com
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message