VFS: URL parameter transport.vfs.passive not working in WSO2 EI 6.2.0

494 Views Asked by At

Good morning

I have a proxy service that read file from a FTP that require passive move. In WSO2 EI 6.1.0, I was able to enable passive mode via URL parameter ?transport.vfs.passive=true and it worked without problem.

In WSO2 EI 6.2.0, the same proxy service fails with following error
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory SYST
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory 215 UNIX Type: L8
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory PORT192,168,200,195,223,83
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory 200 PORT command successful. Consider using PASV.
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory LIST OUT/VERIFY/IN
[EI-Core] DEBUG - FtpClientFactory$FtpConnectionFactory 425 Failed to establish connection.

The main difference in log, is ftp answer 200 PORT command successful. Consider using PASV.

Did the parameter to enable passive mode change between vfs and vfs2, or is there another way to enable passive mode in VFS FTP in WSO2 EI 6.2.0 edit, I tried also ?vfs.passive=true with same result

For Reference, the code I used to test this

    <?xml version="1.0" encoding="UTF-8"?>
<proxy name="FTP_Test" startOnLoad="true" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
    <target>
        <inSequence>
            <log category="WARN" level="custom">
                <property name="Status" value="FTP processing"/>
            </log>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
    <parameter name="transport.PollInterval">10</parameter>
    <parameter name="transport.vfs.FileURI"> vfs:ftp://xxx:[email protected]:21/OUT/VERIFY/IN?transport.vfs.passive=true
</parameter>
    <parameter name="transport.vfs.ContentType">application/xml</parameter>
    <parameter name="transport.vfs.Locking">false</parameter>
    <parameter name="transport.vfs.FileNamePattern">.*.*</parameter>   
    </proxy>
1

There are 1 best solutions below

0
On

Please refer https://github.com/wso2/product-ei/issues/2345 regarding this. This is due to some query parameters were not taken into account. We have fixed this issue in a consequtive release.