You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by JSmith <js...@gmail.com> on 2016/07/22 17:58:03 UTC

FTP Route fails with no errors

Hey all, first time posting here so feel free to ask me for more details on
anything.

I'm using Apache Camel 2.17.1 on a CentOS 6.7 VM with VSFTPD version 2.2.2. 
I'm testing local file transferring using Apache Camel just so I can get a
feel for everything.

I have a route similar to this:

<route customId="true" id="localRoute">
    <from
uri="ftp://localUsername@127.0.0.1/LOCAL/takefrom?password=localPassword&amp;move=${file:name.noext}.${file:name.ext}.old&amp;exclude=.*.old&amp;include=.*.txt"
/>
    <to
uri="ftp://localUsername@127.0.0.1/LOCAL/puthere?password=localPassword" />
</route>


And it simply does not work.  The from URI will not transfer any files in
the "LOCAL/takefrom" directory.

All directories that are being used have been "chmod -R 777" so I know there
are no errors with permissions on the paths or the files in them. 

Also, switching from "ftp://" to "sftp://" results in Camel working as
intended moving all files from the takefrom directory into the puthere
directory, it seems to be some odd, specific issue with the FTP.

Turning on debugging (by updating the LOG4J properties to use DEBUG) results
in no errors being shown.  The logging output even ends with:

"2016-07-22 13:26:38 [main] INFO  org.apache.camel.spring.SpringCamelContext 
- Total 1 routes, of which 1 are started.
2016-07-22 13:26:38 [main] INFO  org.apache.camel.spring.SpringCamelContext 
- Apache Camel 2.17.1 (CamelContext: camel-1) started in 0.599 seconds"

Camel immediately ends after that is logged, it does not attempt to wait
around and poll for any new files.  

I'm really not sure of what is going on, I haven't come across any other
posts that display a similar issue to mine so any help would be appreciated!  

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
I would enable debug logging and see what FTP commands are being sent
between Camel and the ftp server. That will give you a hint of what is
going.

On Fri, Jul 22, 2016 at 8:20 PM, Souciance Eqdam Rashti <
souciance.eqdam.rashti@gmail.com> wrote:

> So you mean the difference is that, in both cases files are being
> transferred but in the case of ftp, the route stops whereas in sftp it
> continues polling`?
>
> On Fri, Jul 22, 2016 at 8:15 PM, JSmith [via Camel] <
> ml-node+s465427n5785373h26@n5.nabble.com> wrote:
>
>> I compile using Maven 3.3.3 ("mvn package" on the command line) and then
>> use
>> "java -Xms2048M -Xms2048M -jar MyProjectName.jar >output.txt"
>>
>> When in the proper directory that houses the .jar file needed.
>>
>> And I mean that when using the sftp:// route, Camel will sit there and
>> wait for new files to show up and then it will move them into the proper
>> directories.
>>
>> With the ftp:// route it immediately drops back to the command line
>> after it finishes writing to the output file.
>>
>> Hope that's helpful
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785373.html
>> To start a new topic under Camel - Users, email
>> ml-node+s465427n465428h31@n5.nabble.com
>> To unsubscribe from Camel - Users, click here
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
>> .
>> NAML
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785376.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by Claus Ibsen <cl...@gmail.com>.
When running standalone in a JVM its about having at least one non
daemon thread in the JVM so the JVM is not automatic shutdown. So you
should keep the main loop running, and that is what this Camel Main
class is about.




On Mon, Jul 25, 2016 at 8:45 PM, souciance
<so...@gmail.com> wrote:
> Thanks for the update, although it feels somewhat strange that this would
> somehow make it work for FTP as a special case. Your code is similar to the
> example found on the documentation:
> http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html
>
> This shouldn't affect at the protocol level e.g. FTP or SFTP. There must be
> some other reason for that.
>
> Anyway, if you do want your Camel routes to run continously on their own,
> you should look for some container for deployment and management. There are
> open source ones like Karaf to JBoss Fuse which you need license for.
>
>
> On Mon, Jul 25, 2016 at 8:35 PM, JSmith [via Camel] <
> ml-node+s465427n5785444h27@n5.nabble.com> wrote:
>
>> Final post:
>>
>> For anyone who comes across this and has the same issue...
>>
>> Inside where ever you're calling your main() method you can simply do the
>> following:
>>
>> import org.apache.camel.spring.Main;
>> ...
>> public static void main..{
>>     Main main = new Main();
>>     main.setApplicationContextUri("whatever.xml");
>>     main.run();
>>
>> }
>>
>> The above code will allow your FTP route to continuously run without
>> interruption like the SFTP route does naturally.
>>
>> In order to stop it, just CTRL+C
>>
>> Thanks for the help
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785444.html
>> To start a new topic under Camel - Users, email
>> ml-node+s465427n465428h31@n5.nabble.com
>> To unsubscribe from Camel - Users, click here
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
>> .
>> NAML
>> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785445.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
Thanks for the update, although it feels somewhat strange that this would
somehow make it work for FTP as a special case. Your code is similar to the
example found on the documentation:
http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

This shouldn't affect at the protocol level e.g. FTP or SFTP. There must be
some other reason for that.

Anyway, if you do want your Camel routes to run continously on their own,
you should look for some container for deployment and management. There are
open source ones like Karaf to JBoss Fuse which you need license for.


On Mon, Jul 25, 2016 at 8:35 PM, JSmith [via Camel] <
ml-node+s465427n5785444h27@n5.nabble.com> wrote:

> Final post:
>
> For anyone who comes across this and has the same issue...
>
> Inside where ever you're calling your main() method you can simply do the
> following:
>
> import org.apache.camel.spring.Main;
> ...
> public static void main..{
>     Main main = new Main();
>     main.setApplicationContextUri("whatever.xml");
>     main.run();
>
> }
>
> The above code will allow your FTP route to continuously run without
> interruption like the SFTP route does naturally.
>
> In order to stop it, just CTRL+C
>
> Thanks for the help
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785444.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785445.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
Final post:

For anyone who comes across this and has the same issue...

Inside where ever you're calling your main() method you can simply do the
following:

import org.apache.camel.spring.Main;
...
public static void main..{
    Main main = new Main();
    main.setApplicationContextUri("whatever.xml");
    main.run();

}

The above code will allow your FTP route to continuously run without
interruption like the SFTP route does naturally.  

In order to stop it, just CTRL+C 

Thanks for the help




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785444.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
Update:

Turns out if I put a "Thread.sleep()" in the main() method, then FTP
transferring will function.

Not sure why SFTP works without that and FTP doesn't, should I post that as
a new question or would it be easier to answer here?



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785431.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
I don't use anything like Filezilla, but I have tested from the command line
using 

"lftp ftp://localUsername@127.0.0.1" and then connect using the proper
password
or
"ftp 127.0.0.1" and then use the proper username and password and i can move
around and get files that way just fine.  



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785382.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
I am assuming you have already tried to connect to that ftp server with an
ftp client like Filezilla and it works ok?

On Fri, Jul 22, 2016 at 8:37 PM, JSmith [via Camel] <
ml-node+s465427n5785379h12@n5.nabble.com> wrote:

> I might just be poor at deciphering the log file, but I didn't see
> anything different really.  Of course, there is a lot of lines of logging
> printed out when turning DEBUG on!
>
> This is the only part I've had questions on, but since it isn't labelled
> with "WARNING" or "ERROR" I'm assuming it's not actually affecting
> anything.
> (I feel as if these are the only real relevant parts of the output log
> from the FTP route.  Showing that indeed the two endpoints were created and
> that Camel seems to think everything is moving along just fine)
> "
> .
> .
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.spring.SpringCamelContext  -
> ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=xxxxxx
> converted to endpoint: Endpoint[
> ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=xxxxxx]
> by component: org.apache.camel.component.file.remote.FtpComponent@302a07d
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.management.DefaultManagementAgent  - Registered MBean with
> ObjectName: org.apache.camel:context=camel-1,type=endpoints,name="
> ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response\?password=xxxxxx"
>
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.processor.interceptor.DefaultChannel  - Initialize channel
> for target: 'To[
> ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=localPassword]'
>
> .
> .
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.impl.DefaultExecutorServiceManager  - Created new
> ScheduledThreadPool for source: FtpConsumer[
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
> with name:
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx.
> -> org.apache.camel.util.concurrent.SizedScheduledExecutorService@22b53226
> [
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
>
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.component.file.remote.FtpConsumer  - Auto creating
> directory: LOCAL/takefrom
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.component.file.remote.FtpConsumer  - Exception checking
> connection status: File operation failed: null Connection is not open.
> Code: 0
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.component.file.remote.FtpConsumer  - Not connected/logged
> in, connecting to: ftp://localUsername@127.0.0.1:21
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.component.file.remote.FtpConsumer  - Connected and logged
> in to: ftp://localUsername@127.0.0.1:21
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.impl.DefaultScheduledPollConsumerScheduler  - Scheduling
> poll (fixed delay) with initialDelay: 1000, delay: 500 (milliseconds) for:
> Endpoint[
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
>
> 2016-07-22 13:26:38 [main] INFO
>  org.apache.camel.spring.SpringCamelContext  - Route: localRoute started
> and consuming from: Endpoint[
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
>
> 2016-07-22 13:26:38 [main] DEBUG
> org.apache.camel.management.DefaultManagementLifecycleStrategy  - Load
> performance statistics disabled
> 2016-07-22 13:26:38 [main] INFO
>  org.apache.camel.spring.SpringCamelContext  - Total 1 routes, of which 1
> are started.
> 2016-07-22 13:26:38 [main] INFO
>  org.apache.camel.spring.SpringCamelContext  - Apache Camel 2.17.1
> (CamelContext: camel-1) started in 0.599 seconds
> "
> Where the last line of that log is the very last line printed to the
> output file before it exits to the command line.
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785379.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785381.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
I might just be poor at deciphering the log file, but I didn't see anything
different really.  Of course, there is a lot of lines of logging printed out
when turning DEBUG on! 

This is the only part I've had questions on, but since it isn't labelled
with "WARNING" or "ERROR" I'm assuming it's not actually affecting anything.  
(I feel as if these are the only real relevant parts of the output log from
the FTP route.  Showing that indeed the two endpoints were created and that
Camel seems to think everything is moving along just fine)
"
.
.
2016-07-22 13:26:38 [main] DEBUG org.apache.camel.spring.SpringCamelContext 
-
ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=xxxxxx
converted to endpoint:
Endpoint[ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=xxxxxx]
by component: org.apache.camel.component.file.remote.FtpComponent@302a07d
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.management.DefaultManagementAgent  - Registered MBean with
ObjectName:
org.apache.camel:context=camel-1,type=endpoints,name="ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response\?password=xxxxxx"
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.processor.interceptor.DefaultChannel  - Initialize channel
for target:
'To[ftp://localUsername@127.0.0.1/opt/AppSrv/poller/LOCAL/response?password=localPassword]'
.
.
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.impl.DefaultExecutorServiceManager  - Created new
ScheduledThreadPool for source:
FtpConsumer[ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
with name:
ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx.
->
org.apache.camel.util.concurrent.SizedScheduledExecutorService@22b53226[ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.component.file.remote.FtpConsumer  - Auto creating
directory: LOCAL/takefrom
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.component.file.remote.FtpConsumer  - Exception checking
connection status: File operation failed: null Connection is not open. Code:
0
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.component.file.remote.FtpConsumer  - Not connected/logged
in, connecting to: ftp://localUsername@127.0.0.1:21
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.component.file.remote.FtpConsumer  - Connected and logged
in to: ftp://localUsername@127.0.0.1:21
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler  - Scheduling
poll (fixed delay) with initialDelay: 1000, delay: 500 (milliseconds) for:
Endpoint[ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
2016-07-22 13:26:38 [main] INFO  org.apache.camel.spring.SpringCamelContext 
- Route: localRoute started and consuming from:
Endpoint[ftp://localUsername@127.0.0.1/LOCAL/takefrom?exclude=.*.old&include=.*.txt&password=xxxxxx]
2016-07-22 13:26:38 [main] DEBUG
org.apache.camel.management.DefaultManagementLifecycleStrategy  - Load
performance statistics disabled
2016-07-22 13:26:38 [main] INFO  org.apache.camel.spring.SpringCamelContext 
- Total 1 routes, of which 1 are started.
2016-07-22 13:26:38 [main] INFO  org.apache.camel.spring.SpringCamelContext 
- Apache Camel 2.17.1 (CamelContext: camel-1) started in 0.599 seconds
"
Where the last line of that log is the very last line printed to the output
file before it exits to the command line. 





--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785379.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
Well, best way to know the difference is to enable debug logging and
compare the commands being exchanged. You can configure that in your log4j
file. You should see that Camel is trying to connect to the FTP server and
then see what response code it receives from the server and what happens
next which leads to the shutdown.

On Fri, Jul 22, 2016 at 8:25 PM, JSmith [via Camel] <
ml-node+s465427n5785377h50@n5.nabble.com> wrote:

> Oh no sorry, I may have not been clear.
>
> With the ftp route it does *not* transfer any files, it also does not
> give errors.  The output file basically states that all is well and Camel
> is functioning as it should.  However, it just exits right back to the
> command line after writing to the output file, having transferred no files.
>
> With the sftp route (literally only changing "ftp://" to "sftp://", all
> else is the same) it does transfer all files, continues polling for more
> files and does not exit back to the command prompt unless I CTRL+C the
> operation.
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785377.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785378.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
Oh no sorry, I may have not been clear.  

With the ftp route it does *not* transfer any files, it also does not give
errors.  The output file basically states that all is well and Camel is
functioning as it should.  However, it just exits right back to the command
line after writing to the output file, having transferred no files.

With the sftp route (literally only changing "ftp://" to "sftp://", all else
is the same) it does transfer all files, continues polling for more files
and does not exit back to the command prompt unless I CTRL+C the operation.  



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785377.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
So you mean the difference is that, in both cases files are being
transferred but in the case of ftp, the route stops whereas in sftp it
continues polling`?

On Fri, Jul 22, 2016 at 8:15 PM, JSmith [via Camel] <
ml-node+s465427n5785373h26@n5.nabble.com> wrote:

> I compile using Maven 3.3.3 ("mvn package" on the command line) and then
> use
> "java -Xms2048M -Xms2048M -jar MyProjectName.jar >output.txt"
>
> When in the proper directory that houses the .jar file needed.
>
> And I mean that when using the sftp:// route, Camel will sit there and
> wait for new files to show up and then it will move them into the proper
> directories.
>
> With the ftp:// route it immediately drops back to the command line after
> it finishes writing to the output file.
>
> Hope that's helpful
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785373.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785375.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by JSmith <js...@gmail.com>.
I compile using Maven 3.3.3 ("mvn package" on the command line) and then use 
"java -Xms2048M -Xms2048M -jar MyProjectName.jar >output.txt"

When in the proper directory that houses the .jar file needed. 

And I mean that when using the sftp:// route, Camel will sit there and wait
for new files to show up and then it will move them into the proper
directories.  

With the ftp:// route it immediately drops back to the command line after it
finishes writing to the output file.

Hope that's helpful



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785373.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP Route fails with no errors

Posted by souciance <so...@gmail.com>.
What do you mean Camel immediately ends? How is the route deployed?

On Fri, Jul 22, 2016 at 7:58 PM, JSmith [via Camel] <
ml-node+s465427n5785371h64@n5.nabble.com> wrote:

> Hey all, first time posting here so feel free to ask me for more details
> on anything.
>
> I'm using Apache Camel 2.17.1 on a CentOS 6.7 VM with VSFTPD version
> 2.2.2.  I'm testing local file transferring using Apache Camel just so I
> can get a feel for everything.
>
> I have a route similar to this:
>
> <route customId="true" id="localRoute">
>     <from uri="
> ftp://localUsername@127.0.0.1/LOCAL/takefrom?password=localPassword&amp;move=${file:name.noext}.${file:name.ext}.old&amp;exclude=.*.old&amp;include=.*.txt"
> />
>     <to uri="
> ftp://localUsername@127.0.0.1/LOCAL/puthere?password=localPassword" />
> </route>
>
>
> And it simply does not work.  The from URI will not transfer any files in
> the "LOCAL/takefrom" directory.
>
> All directories that are being used have been "chmod -R 777" so I know
> there are no errors with permissions on the paths or the files in them.
>
> Also, switching from "ftp://" to "sftp://" results in Camel working as
> intended moving all files from the takefrom directory into the puthere
> directory, it seems to be some odd, specific issue with the FTP.
>
> Turning on debugging (by updating the LOG4J properties to use DEBUG)
> results in no errors being shown.  The logging output even ends with:
>
> "2016-07-22 13:26:38 [main] INFO
>  org.apache.camel.spring.SpringCamelContext  - Total 1 routes, of which 1
> are started.
> 2016-07-22 13:26:38 [main] INFO
>  org.apache.camel.spring.SpringCamelContext  - Apache Camel 2.17.1
> (CamelContext: camel-1) started in 0.599 seconds"
>
> Camel immediately ends after that is logged, it does not attempt to wait
> around and poll for any new files.
>
> I'm really not sure of what is going on, I haven't come across any other
> posts that display a similar issue to mine so any help would be
> appreciated!
>
> Thanks
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Route-fails-with-no-errors-tp5785371p5785372.html
Sent from the Camel - Users mailing list archive at Nabble.com.