camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niels <ni...@kabisa.nl>
Subject Exception FTP Component
Date Mon, 16 Jan 2012 08:25:38 GMT
Hey everybody,

I'm using to ftp component to consume from a ftp server.
The little application seems to do the job but when investigating the log files this exception
shows up:

Trying to recover by disconnecting from remote server forcing a re-connect at next poll: ftp://userl@server:21
 Error occurred while disconnecting from ftp://user@server:21 due: File operation failed:
421 Terminating connection.
 FTP response 421 received.  Server closed connection.. Code: 421. This exception will be
ignored.
 Consumer FtpConsumer[ftp://server?delay=900000&delete=true&password=******&username=user]
could not poll endpoint: Endpoint[ftp://server?de$
 FTP response 421 received.  Server closed connection.. Code: 421
 org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed:
421 Timeout (120 seconds): closing control connection.
 FTP response 421 received.  Server closed connection.. Code: 421
        at org.apache.camel.component.file.remote.FtpOperations.getCurrentDirectory(FtpOperations.java:569)
        at org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:45)
        at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:100)
        at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received.
 Server closed connection.
        at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:347)
        at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:495)
        at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:537)
        at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:586)
        at org.apache.commons.net.ftp.FTP.pwd(FTP.java:1381)
        at org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:1990)
		at org.apache.camel.component.file.remote.FtpOperations.getCurrentDirectory(FtpOperations.java:567)
		... 13 more

This is the route I'm using to consume the service:

from("ftp://" + props.getProperty(FTP_URL) + "?username=" + props.getProperty(FTP_USER) +
"&password=" + props.getProperty(FTP_PWD) + "&delete=true&delay=" + props.getProperty(FTP_DELAY))
			.filter(xmlPredicate)
				.to("jms:xmlQueue").end()
			.filter(imgPredicate)
				.to("file://" + props.getProperty(ROOT_DIR) + "/img").end()
			.filter(pdfPredicate)
				.to("file://" + props.getProperty(ROOT_DIR) + "/pdf").end()
			.to("file://" + props.getProperty(ROOT_DIR) + "/junk");

Now I'm wondering if this could be an issue with camel? In my opinion I think it has something
to do with the FTP server itself and not so much with camel.
Therefore I'm asking some experts opinion on my issue.

And please if you have any remarks on my code, I happy to here them I'm just a novice when
it comes to camel.

Thanks!

Regards,

Niels



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