0

As the title, if I config "require_ssl_reuse=NO" for vsftpd, the following configuration works well.

Is that possible and how to config Spring Integration FTP to connect the vsftpd that without config "require_ssl_reuse=NO"?

Exception:

Caused by: org.springframework.messaging.MessagingException: Failed to write to '/ftp/upload/test.txt.writing' while uploading the file; nested exception is java.io.IOException: Failed to write to '/ftp/upload/test.txt.writing'. Server replied with: 522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page

Here is my configuration:

<beans:bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory">
<beans:property name="host" value="202.101.1.106"/>
<beans:property name="port" value="21"/>
<beans:property name="username" value="tom"/>
<beans:property name="password" value="tom"/>
<beans:property name='clientMode' value='2'/>
<beans:property name='protocols' value='TLSv1, SSLv3'/>
</beans:bean>
Kenneth
  • 181
  • 3
  • 12
  • Possible duplicate of [How to connect to FTPS server with data connection using same TLS session?](http://stackoverflow.com/questions/32398754/how-to-connect-to-ftps-server-with-data-connection-using-same-tls-session) –  Dec 21 '16 at 20:37

1 Answers1

0

See the answer to this question for work-around.

Subclass the session factory and override the createClientInstance method.

Feel free to open an 'improvement' JIRA Issue and we can look at adding it as a feature to the framework. Even better, consider contributing.

Community
  • 1
  • 1
Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Hi Gary, thanks for your reply. But the constructor argument "isSharedSession" is for [DefaultSftpSessionFactory](http://docs.spring.io/spring-integration/api/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.html), what I am using now is [DefaultFtpSessionFactory](http://docs.spring.io/spring-integration/api/org/springframework/integration/ftp/session/DefaultFtpSessionFactory.html). – Kenneth May 29 '16 at 02:07