camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Parkerson <sc...@parkerson.net>
Subject Ignoring permissions errors on File (FTP/SFTP) consumers
Date Thu, 12 Sep 2013 14:57:22 GMT
Supposing I had a route that consumed from a remote directory via SFTP.
When files are dropped into this directory, they are usually the wrong
permission until a cron job comes by to "fix" the permissions so that they
are readable by the Camel file consumer.

However, until the permissions are set correctly, the file consumer
generates a nasty stacktrace in the logs that looks like this when it
attempts to read a file it has no permission to read:

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: somefile.txt
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:532)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:494)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
        at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:317)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
        at
org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:92)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
        at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)[:1.6.0_30]
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
Source)[:1.6.0_30]
        at java.util.concurrent.FutureTask.runAndReset(Unknown
Source)[:1.6.0_30]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
Source)[:1.6.0_30]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
Source)[:1.6.0_30]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)[:1.6.0_30]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)[:1.6.0_30]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)[:1.6.0_30]
        at java.lang.Thread.run(Unknown Source)[:1.6.0_30]
Caused by: 3: Permission denied
        at
com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2569)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
        at
com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1205)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
        at
com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1158)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:525)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
        ... 16 more


Is there a way to neuter this particular warning either by some routing
magic or policy changes?

--sgp

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