使用docker在vm中执行sftp时发生闭合管道错误

使用docker在vm中执行sftp时发生闭合管道错误,docker,apache-camel,sftp,Docker,Apache Camel,Sftp,我有一个驼峰路由器的停靠容器,它可以从远程主机到VM本地文件夹进行sftp。如果我只是以传统的方式在VM中运行代码(即java-jar我的sftp驼峰路由器.jar),它会下载所有5000个文件。但是,当我使用docker run-P/tmp/:/tmp/my sftp camel router image运行与docker image相同的程序时,它在下载大约12个文件后失败。 这两种情况在我的本地机器上都可以正常工作,但在虚拟机上不行 org.apache.camel.component.f

我有一个驼峰路由器的停靠容器,它可以从远程主机到VM本地文件夹进行sftp。如果我只是以传统的方式在VM中运行代码(即java-jar我的sftp驼峰路由器.jar),它会下载所有5000个文件。但是,当我使用docker run-P/tmp/:/tmp/my sftp camel router image运行与docker image相同的程序时,它在下载大约12个文件后失败。 这两种情况在我的本地机器上都可以正常工作,但在虚拟机上不行

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: /
at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:576)
at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:533)
at org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:472)
at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:106)
at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.begin(GenericFileRenameProcessStrategy.java:43)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:367)
at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:137)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 4: 
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:359)
at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:574)
... 17 more
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.read(PipedInputStream.java:307)
at java.io.PipedInputStream.read(PipedInputStream.java:377)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2882)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2908)
at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2328)
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)
... 18 more