Why receiving exception using camel-sftp with error messge Cannot create new local work file ?
Issue
- User has the same set of codes running fine in dev environment. However, when the codes are promoted to QA, user encounter the below error.
Error processing file RemoteFile[/xxx/yyy/File018.csv] due to Cannot create new local work file: /aaa/bbb/custom_folder. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot create new local work file: /aaa/bbb/custom_folder]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot create new local work file: /aaa/bbb/custom_folder
at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToFileInLocalWorkDirectory(SftpOperations.java:702)[212:org.apache.camel.camel-ftp:2.12.0.redhat-610379]
at org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:591)[212:org.apache.camel.camel-ftp:2.12.0.redhat-610379]
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:362)[143:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:99)[212:org.apache.camel.camel-ftp:2.12.0.redhat-610379]
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)[143:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)[143:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[143:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[143:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)[122:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)[122:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_65]
- User has checked with
linuxand storage teams and the permission on the folders are already set 777 but still encounter the same error. - Following is the route used.
<camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<route id="timerToLog2">
<from uri="sftp://rider:secret@localhost:21000///tmp?localWorkDirectory=/PATH/TO/output/intermediate"/>
<to uri="file:///PATH/TO/output"/>
</route>
</camelContext>
Environment
- Red Hat JBoss Fuse
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.