FAQ
Hi.

There is an error with ftp server.
Many files on the server. All files have no time to be processed.
When the processing of the next file, the process stops.
Error - The request is a file after closing the connection.

Camel version 2.8.1
Camel config route:




Open FTP connection:



Close FTP connection:




After closed FTP connection:



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4952369.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Claus Ibsen at Nov 1, 2011 at 10:46 am
    Hi

    Can you report this as a bug in the Camel JIRA tracker? There is a
    link from here.
    http://camel.apache.org/support

    We should avoid the NPE, which happens when Camel poll the ftp server
    the 2nd time.

    On Mon, Oct 31, 2011 at 2:01 PM, alexey-s wrote:
    Hi.

    There is an error with ftp server.
    Many files on the server. All files have no time to be processed.
    When the processing of the next file, the process stops.
    Error - The request is a file after closing the connection.

    Camel version 2.8.1
    Camel config route:




    Open FTP connection:



    Close FTP connection:




    After closed FTP connection:



    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4952369.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Alexey-s at Nov 2, 2011 at 7:26 am
    Hi

    Add error report https://issues.apache.org/jira/browse/CAMEL-4605

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4957362.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Alexey-s at Nov 3, 2011 at 10:07 pm
    Hi

    I localized the error.
    Object DefaultShutdownStrategy$ShutdownTask call
    ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask)

    The method of the object GenericFileConsumer always returns false.
    I redefined the method of the FtpConsumer

    Now DefaultShutdownStrategy waits until the process.

    As you can see, the waiting time starts at 300 seconds, and should be 10
    seconds.
    For details, see page http://camel.apache.org/cronscheduledroutepolicy.html
    .
    Parameter routeStopGracePeriod = 10 seconds. The time period to wait before
    initiating graceful route stop

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Claus Ibsen at Nov 5, 2011 at 8:36 am

    On Thu, Nov 3, 2011 at 11:06 PM, alexey-s wrote:
    Hi

    I localized the error.
    Object DefaultShutdownStrategy$ShutdownTask call
    ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask)

    The method of the object GenericFileConsumer always returns false.
    I redefined the method of the FtpConsumer

    Now DefaultShutdownStrategy waits until the process.

    As you can see, the waiting time starts at 300 seconds, and should be 10
    seconds.
    For details, see page http://camel.apache.org/cronscheduledroutepolicy.html
    .
    Parameter routeStopGracePeriod = 10 seconds. The time period to wait before
    initiating graceful route stop
    When a route is stopped using a scheduled route policy it should log
    the timeout it used such as
    INFO DefaultShutdownStrategy - Starting to graceful shutdown 1
    routes (timeout 10000 milliseconds)

    Do you see 300 sec instead?

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Claus Ibsen at Nov 5, 2011 at 10:42 am
    You should increase the 10 sec timeout on the cron scheduled policy as
    its too low.
    IMHO it should actually use the default of 300 sec, to ensure a better shutdown.


    On Sat, Nov 5, 2011 at 9:36 AM, Claus Ibsen wrote:
    On Thu, Nov 3, 2011 at 11:06 PM, alexey-s wrote:
    Hi

    I localized the error.
    Object DefaultShutdownStrategy$ShutdownTask call
    ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask)

    The method of the object GenericFileConsumer always returns false.
    I redefined the method of the FtpConsumer

    Now DefaultShutdownStrategy waits until the process.

    As you can see, the waiting time starts at 300 seconds, and should be 10
    seconds.
    For details, see page http://camel.apache.org/cronscheduledroutepolicy.html
    .
    Parameter routeStopGracePeriod = 10 seconds. The time period to wait before
    initiating graceful route stop
    When a route is stopped using a scheduled route policy it should log
    the timeout it used such as
    INFO  DefaultShutdownStrategy        - Starting to graceful shutdown 1
    routes (timeout 10000 milliseconds)

    Do you see 300 sec instead?

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Claus Ibsen at Nov 5, 2011 at 10:57 am
    Hi

    I can reproduce the issue, will try to dig into what happens. Suspect
    that the batch consumer is off by one in a counter and will signal
    back there is no more pending exchanges which there is still one left.


    On Sat, Nov 5, 2011 at 11:41 AM, Claus Ibsen wrote:
    You should increase the 10 sec timeout on the cron scheduled policy as
    its too low.
    IMHO it should actually use the default of 300 sec, to ensure a better shutdown.


    On Sat, Nov 5, 2011 at 9:36 AM, Claus Ibsen wrote:
    On Thu, Nov 3, 2011 at 11:06 PM, alexey-s wrote:
    Hi

    I localized the error.
    Object DefaultShutdownStrategy$ShutdownTask call
    ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask)

    The method of the object GenericFileConsumer always returns false.
    I redefined the method of the FtpConsumer

    Now DefaultShutdownStrategy waits until the process.

    As you can see, the waiting time starts at 300 seconds, and should be 1
    seconds.
    For details, see page http://camel.apache.org/cronscheduledroutepolicy.html
    .
    Parameter routeStopGracePeriod = 10 seconds. The time period to wait before
    initiating graceful route stop
    When a route is stopped using a scheduled route policy it should log
    the timeout it used such as
    INFO  DefaultShutdownStrategy        - Starting to graceful shutdown 1
    routes (timeout 10000 milliseconds)

    Do you see 300 sec instead?

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Claus Ibsen at Nov 5, 2011 at 12:57 pm
    Hi

    Thanks for reporting. I managed to track down the issue and its fixed
    in the next releases of Camel, eg 2.8.3 and 2.9.0.

    On Sat, Nov 5, 2011 at 11:57 AM, Claus Ibsen wrote:
    Hi

    I can reproduce the issue, will try to dig into what happens. Suspect
    that the batch consumer is off by one in a counter and will signal
    back there is no more pending exchanges which there is still one left.


    On Sat, Nov 5, 2011 at 11:41 AM, Claus Ibsen wrote:
    You should increase the 10 sec timeout on the cron scheduled policy as
    its too low.
    IMHO it should actually use the default of 300 sec, to ensure a better shutdown.


    On Sat, Nov 5, 2011 at 9:36 AM, Claus Ibsen wrote:
    On Thu, Nov 3, 2011 at 11:06 PM, alexey-s wrote:
    Hi

    I localized the error.
    Object DefaultShutdownStrategy$ShutdownTask call
    ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask)

    The method of the object GenericFileConsumer always returns false.
    I redefined the method of the FtpConsumer

    Now DefaultShutdownStrategy waits until the process.

    As you can see, the waiting time starts at 300 seconds, and should be 10
    seconds.
    For details, see page http://camel.apache.org/cronscheduledroutepolicy.html
    .
    Parameter routeStopGracePeriod = 10 seconds. The time period to wait before
    initiating graceful route stop
    When a route is stopped using a scheduled route policy it should log
    the timeout it used such as
    INFO  DefaultShutdownStrategy        - Starting to graceful shutdown 1
    routes (timeout 10000 milliseconds)

    Do you see 300 sec instead?

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Alexey-s at Nov 9, 2011 at 7:59 pm
    Thank you for the quick fix.
    I have yet to set a value of 0 to routeStopGracePeriod. This is not the best
    solution.
    I'll wait for a new version and check it out.

    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4978927.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedOct 31, '11 at 1:05p
activeNov 9, '11 at 7:59p
posts9
users2
websitecamel.apache.org

2 users in discussion

Claus Ibsen: 5 posts Alexey-s: 4 posts

People

Translate

site design / logo © 2022 Grokbase