英文:
wso2 VFS Transport Sender Error while writing to windows sftp path
问题
以下是翻译好的内容:
(错误 - 1)
错误 {VFSUtils} - 无法验证锁定 java.io.IOException: 输入流已关闭
在 com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2911)
在 com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
在 com.jcraft.jsch.ChannelSftp.access$500(ChannelSftp.java:36)
在 com.jcraft.jsch.ChannelSftp$2.read(ChannelSftp.java:1417)
在 java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
在 java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
在 org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
在 java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
在 java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
在 java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
在 org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
在 java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
在 org.apache.synapse.commons.vfs.VFSUtils.verifyLock(VFSUtils.java:356)
在 org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:231)
在 org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
在 org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
在 org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
在 org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
在 org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
在 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
在 org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
在 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
在 org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
在 org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
在 org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
在 org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
在 org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
在 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
在 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
在 org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
在 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
在 org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
在 org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
在 org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
在 org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
在 org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
在 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
在 java.base/java.lang.Thread.run(Thread.java:834)
警告 {VFSTransportSender} - 无法获取文件的锁定: sftp://{sftp_path}/abc.json,重试: 1,计划在: 30000 毫秒后
(错误 - 2)
错误 {VFSUtils} - 无法获取文件的锁定: sftp://{sftp_path}/abc.json 在处理之前 org.apache.commons.vfs2.FileSystemException: 无法写入 "sftp://{sftp_path}/xyz.json.lock"。
在 org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1197)
在 org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
在 org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:392)
在 org.apache.synapse.commons.vfs.VFSUtils.createLockFile(VFSUtils.java:262)
在 org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:220)
在 org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
在 org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
在 org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
在 org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
在 org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
在 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
在 org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
在 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
在 org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
在 org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
在 org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
在 org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
在 org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
在 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
在 org.apache.synapse.mediators.base.SequenceMediator.mediate(
英文:
I'm stuck up on more errors in the same code mentioned in the question linked here.
I get this error as given below:-
(Error - 1)
ERROR {VFSUtils} - Couldn't verify the lock java.io.IOException: inputstream is closed
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2911)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.access$500(ChannelSftp.java:36)
at com.jcraft.jsch.ChannelSftp$2.read(ChannelSftp.java:1417)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.apache.synapse.commons.vfs.VFSUtils.verifyLock(VFSUtils.java:356)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:231)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
at org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
WARN {VFSTransportSender} - Couldn't get the lock for the file : sftp://{sftp_path}/abc.json, retry : 1 scheduled after : 30000
(Error - 2)
ERROR {VFSUtils} - Cannot get the lock for the file : sftp://{sftp_path}/abc.json before processing org.apache.commons.vfs2.FileSystemException: Could not write to "sftp://{sftp_path}/xyz.json.lock".
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1197)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:392)
at org.apache.synapse.commons.vfs.VFSUtils.createLockFile(VFSUtils.java:262)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:220)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
at org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 4:
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:882)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:709)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:703)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:519)
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1193)
... 35 more
Caused by: java.io.IOException: Pipe closed
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:307)
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:377)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:757)
... 39 more
(Error - 3)
ERROR {VFSUtils} - Couldn't release the lock for the file : sftp://{sftp_path}/def.json after processing
ERROR {VFSTransportSender} - IO Error while creating response file : sftp://{sftp_path}/def.json org.apache.commons.vfs2.FileSystemException: Could not write to "sftp://{sftp_path}/def.json".
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1197)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
at org.apache.synapse.transport.vfs.VFSTransportSender.populateResponseFile(VFSTransportSender.java:352)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:280)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 4:
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:882)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:709)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:703)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:519)
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1193)
... 31 more
Caused by: java.io.IOException: Pipe closed
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:307)
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:377)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:757)
... 35 more
I'm reading from and writing to multiple files in a windows sftp.
Can this be an issue with my sftp server ? or can i make changes to the wso2 config files or add some property to the proxy that could fix this issue?
答案1
得分: 0
看起来像是FTP权限问题。我首先会检查这些权限,如果它们正确的话,尝试禁用锁定机制。
如果你在SFTP URL中设置transport.vfs.Locking=false
,不确定是否会起作用,另一种方法可以是在写入FTP之前将其设置为<property name="transport.vfs.Locking" scope="transport" value="false">
。
希望对你有所帮助。
英文:
Looks to me like there's a permission issue on the ftp. I would first check those and if they are correct try with disabling the lock mechanism.
Not sure if it works if you set transport.vfs.Locking=false
in the sftp url, another way could be set it to <property name="transport.vfs.Locking" scope="transport" value="false">
before you write to the ftp.
Hope that helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论