安装到Windows SFTP服务器的WSO2 Enterprise Integrator VFS连接

问题描述 投票:1回答:1

正在运行WSO2 Enterprise Integrator 6.5.0。在RHEL 7上。我们正在构建从sftp服务器读取文件的流程。但是,建立与Windows SFTP服务器的sftp连接失败。我们可以使用Windows客户端(例如FileZilla / WinSCP)正确访问此Windows SFTP服务器。

使用netstat,我们看到已建立与Windows SFTP服务器的连接,但流程没有改变-没有文件正在读取。在停止服务器时,wso2carbon.log中将显示如下所示的错误。

[与Linux sftp服务器(带有SSHD的Plain RHEL 7盒)建立连接时,我们不会遇到任何问题。我们在运行WSO2 EI的用户的主目录中的.ssh / id_rsa下具有匹配的私钥位置。

搜索错误消息(请参见下面的代码段),我们应该通过在VFS URL中添加transport.vfs.AvoidPermissionCheck = true参数来解决该问题,但是很遗憾,这不能解决我们的问题。

这是我们正在使用的VFS URL。

sftp://[email protected]/inputdir?transport.vfs.AvoidPermissionCheck = true; vfs.passive = true

这是应该起作用的配置,我们缺少配置选项吗?还是这是WSO2软件中的错误?

这些URL提到了我们面临的问题。

VFS2 Error cannot delete file and could not get the groups id of the current user (error code: -1)

https://issues.apache.org/jira/browse/VFS-617

https://github.com/wso2/product-ei/issues/3725

[2019-12-06 13:48:59,724] [-1] [] [vfs-Worker-2] ERROR {org.apache.synapse.transport.vfs.VFSTransportListener} -  Error checking for existence and readability : sftp://[email protected]/inputdir?transport.vfs.AvoidPermissionCheck=true;vfs.passive=true
org.apache.commons.vfs2.FileSystemException: Could not determine if file "sftp://[email protected]/inputdir?transport.vfs.AvoidPermissionCheck=true;vfs.passive=true" is readable.
        at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1494)
        at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:295)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188)
        at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134)
        at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.jcraft.jsch.JSchException: Could not get the groups id of the current user (error code: -1)
        at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getGroupsIds(SftpFileSystem.java:219)
        at org.apache.commons.vfs2.provider.sftp.SftpFileObject.getPermissions(SftpFileObject.java:250)
        at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doIsReadable(SftpFileObject.java:264)
        at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1492)
        ... 8 more

更新

使用相同的URL,然后设置WSO2流以将文件写入SFTP服务器是可行的。

windows wso2 sftp enterprise integrator
1个回答
0
投票

在WSO2的支持下,此问题得到解决。

要使用的正确VFS网址是。

sftp://[email protected]/inputdir?transport.vfs.AvoidPermissionCheck = true&vfs.passive = true因此,使用'&'分隔符而不是';'。

WSO2的文档对于所使用的正确语法非常模糊。他们在文档中给出了不同的示例。

https://docs.wso2.com/display/EI650/VFS+Transport

https://docs.wso2.com/display/EI650/File+Inbound+Protocol

https://docs.wso2.com/display/EI650/Configuring+File+Inbound+Protocol+for+FTP%2C+SFTP+and+FILE+Connections

© www.soinside.com 2019 - 2024. All rights reserved.