I've been using Spring-Integration 4.1.6 to connect to an old FTP server for several years now. The FTP server was recently replaced with a newer version (the new server is Globalscape EFT Enterprise) and immediately my int-ftp inbound-channel-adapters stopped finding files. I monitor several accounts and they all stopped working at the same time.
Here is the configuration of one:
<beans:bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<beans:property name="host" value="${ftp.host}" />
<beans:property name="port" value="${ftp.port}" />
<beans:property name="username" value="${ftp.username}" />
<beans:property name="password" value="${ftp.password}" />
<beans:property name="clientMode" value="2" />
<beans:property name="fileType" value="2" />
<beans:property name="bufferSize" value="5000000" />
</beans:bean>
<beans:bean id="cachingSessionFactory" class="org.springframework.integration.file.remote.session.CachingSessionFactory">
<beans:constructor-arg ref="ftpSessionFactory" />
<beans:constructor-arg value="1" />
<beans:property name="sessionWaitTimeout" value="60000" />
</beans:bean>
<int-ftp:inbound-channel-adapter id="ftpInboundChannelAdapter" channel="ftpChannelIn" session-factory="cachingSessionFactory" auto-create-local-directory="true"
delete-remote-files="true" remote-directory="dev" local-directory="C:/temp" auto-startup="true">
<poller max-messages-per-poll="-1" receive-timeout="10000" cron="0 0/2 * * * *" >
<transactional/>
</poller>
</int-ftp:inbound-channel-adapter>
and when I debug the adapter, I see this statement:
[org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer] cannot copy, not a file: dev/dev
But there is no folder named dev underneath dev, only a single .csv file.
The structure is /path/to/user/dev/file.csv and the FTP server is configured to show the entire path to the user when they do a PWD.
And I am sure that when the login happens, they are placed in the /path/to/user folder.
I stood up another FTP server on my local environment, and it worked fine.
Have there been problems with certain non-standard FTP servers causing issues like this?
Thank you in advance
It turns out, the latest version of GlobalScape EFT (8.0.2.x) has incorrectly implemented the LIST command. When a LIST some/directory is performed for monitoring, they were returning the details of the directory itself and not the contents of the directory. This was a change in behavior from their 7.x version.
It would have been nice if I could have configured the Spring Integration FTP library do a CWD and then LIST of the current folder. Or have it use NLST. However, as this was just a bug on a FTP server, it is completely understandable why that is not an option.