camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Asmuss <andreasasm...@gmail.com>
Subject FTP: Try login once and disconnect if failure.
Date Wed, 21 Jul 2010 08:41:35 GMT

Hi

I have a route like this:

<route>
	<from
uri="ftp:localhost/inbox/?username=camel&amp;password=camel123&amp;disconnect=true&amp;consumer.delay=60s&amp;maximumReconnectAttempts=0"
/>
			<to uri="file:test_data" />
</route>

In order to prevent user lock out if the wrong password is provided I would
like to try and login only once. With this route Camel makes two connections
at the same time in case the first connection cannot login. Is this
behaviour intended? After some time an exception gets thrown. Preferably I
would like this exception as soon as the client can't login.

(002607) 21-07-2010 10:28:34 - (not logged in) (127.0.0.1)> Connected,
sending welcome message...
(002607) 21-07-2010 10:28:34 - (not logged in) (127.0.0.1)> 220-FileZilla
Server version 0.9.34 beta
(002607) 21-07-2010 10:28:34 - (not logged in) (127.0.0.1)> 220-written by
Tim Kosse (Tim.Kosse@gmx.de)
(002607) 21-07-2010 10:28:34 - (not logged in) (127.0.0.1)> 220 Please visit
http://sourceforge.net/projects/filezilla/
(002607) 21-07-2010 10:28:39 - (not logged in) (127.0.0.1)> USER camel
(002607) 21-07-2010 10:28:39 - (not logged in) (127.0.0.1)> 331 Password
required for camel
(002607) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> PASS *******
(002607) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> 530 Login or
password incorrect!
(002608) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> Connected,
sending welcome message...
(002608) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> 220-FileZilla
Server version 0.9.34 beta
(002608) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> 220-written by
Tim Kosse (Tim.Kosse@gmx.de)
(002608) 21-07-2010 10:28:45 - (not logged in) (127.0.0.1)> 220 Please visit
http://sourceforge.net/projects/filezilla/
(002608) 21-07-2010 10:28:51 - (not logged in) (127.0.0.1)> USER camel
(002608) 21-07-2010 10:28:51 - (not logged in) (127.0.0.1)> 331 Password
required for camel
(002608) 21-07-2010 10:28:57 - (not logged in) (127.0.0.1)> PASS *******
(002608) 21-07-2010 10:28:57 - (not logged in) (127.0.0.1)> 530 Login or
password incorrect!
(002608) 21-07-2010 10:29:15 - (not logged in) (127.0.0.1)> QUIT
(002608) 21-07-2010 10:29:15 - (not logged in) (127.0.0.1)> 221 Goodbye
(002608) 21-07-2010 10:29:15 - (not logged in) (127.0.0.1)> disconnected.
(002607) 21-07-2010 10:29:22 - (not logged in) (127.0.0.1)> disconnected.

WARNING: Trying to recover by disconnecting from remote server forcing a
re-connect at next poll: ftp://camel@localhost:21
21-07-2010 10:29:15 org.apache.camel.impl.DefaultPollingConsumerPollStrategy
rollback
WARNING: Consumer
Consumer[ftp://localhost/inbox/?consumer.delay=60s&disconnect=true&maximumReconnectAttempts=0&password=camel12&timeout=5000&username=camel]
could not poll endpoint:
ftp://localhost/inbox/?consumer.delay=60s&disconnect=true&maximumReconnectAttempts=0&password=camel12&timeout=5000&username=camel
caused by: File operation failed: 530 Login or password incorrect!
. Code: 530
org.apache.camel.component.file.GenericFileOperationFailedException: File
operation failed: 530 Login or password incorrect!
. Code: 530
	at
org.apache.camel.component.file.remote.FtpOperations.connect(FtpOperations.java:161)
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-Try-login-once-and-disconnect-if-failure-tp1692660p1692660.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message