question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetListing - SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page

See original GitHub issue

FTP OS: Unix

FTP Server: Vsftpd?

Computer OS: Windows 10

FluentFTP Version: 40.0.0

Framework: .NET 6

Hi - we have one more problem with an other specific FTP server - seems like we can connect through autoconnect - but GetListing throws: - any ideas?

Response: 522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page
Status:   Disposing FtpSocketStream...
Unhandled exception. FluentFTP.FtpCommandException: SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page
   at FluentFTP.FtpClient.GetListingInternal(String listcmd, FtpListOption options, Boolean retry)
   at FluentFTP.FtpClient.GetListing(String path, FtpListOption options)
   at FluentFTP.FtpClient.GetListing()
   at FluentFTPTest.FluentFTP_Error2() in C:\Users\martin\Desktop\Neuer Ordner (3)\FluentExample\Program.cs:line 22
   at Program.<Main>$(String[] args) in C:\Users\martin\Desktop\Neuer Ordner (3)\FluentExample\Program.cs:line 5

Logs :

# AutoConnect()

# AutoDetect(True, False)

# Connect()
Status:   Connecting to ***:21
Response: 220 Welcome
Command:  AUTH TLS
Response: 234 Proceed with negotiation.
Status:   FTPS Authentication Successful
Status:   Time to activate encryption: 0h 0m 0s.  Total Seconds: 0,1244353.
Command:  USER ***
Response: 331 Please specify the password.
Command:  PASS ***
Response: 230 Login successful.
Command:  PBSZ 0
Response: 200 PBSZ set to 0.
Command:  PROT P
Response: 200 PROT now Private.
Command:  FEAT
Response: 211-Features:
Response: AUTH TLS
Response: EPRT
Response: EPSV
Response: MDTM
Response: PASV
Response: PBSZ
Response: PROT
Response: REST STREAM
Response: SIZE
Response: TVFS
Response: UTF8
Response: 211 End
Status:   Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command:  OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Command:  SYST
Response: 215 UNIX Type: L8
Status:   Listing parser set to: Unix

# SetWorkingDirectory("out")
Command:  CWD out
Response: 250 Directory successfully changed.

# GetListing(null, Auto)
Command:  PWD
Response: 257 "/out"
Command:  TYPE I
Response: 200 Switching to Binary mode.

# OpenPassiveDataStream(PASV, "LIST /out", 0)
Command:  PASV
Response: 227 Entering Passive Mode (192,168,3,13,129,177).
Status:   Connecting to ***:33201
Command:  LIST /out
Response: 150 Here comes the directory listing.
Status:   FTPS Authentication Successful
Status:   Time to activate encryption: 0h 0m 0s.  Total Seconds: 0,1404852.
+---------------------------------------+
-----------------------------------------
Status:   Disposing FtpSocketStream...

# CloseDataStream()
Response: 522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
FanDjangocommented, Sep 15, 2022

@robinrodricks I have both a proftpd and a vsftpd server running here, SSL enabled, both are not configured to disable session reuse. As far as I know, both default to require session reuse. My FluentFTP test program successfully lists and downloads files with encryption active. This confuses me. I have read the threads concerning this - #347, as well as this, still confused, though.

0reactions
FanDjangocommented, Feb 19, 2023

Look like this one is fixed by using FluentFTP.GnuTls.

See: https://github.com/robinrodricks/FluentFTP/wiki/FTPS-Connection-using-GnuTLS

Read more comments on GitHub >

github_iconTop Results From Across the Web

vsftpd SSL problem (522 SSL connection failed)
When compiling vsftpd there is a parameter "tunable_require_ssl_reuse" in tunables.c file, this should be turned to '0' if u do not want to ......
Read more >
FTP - session reuse required
I am trying to connect to a FTP (ftps) server and am getting the following ... Receiving: 522 SSL connection failed: session reuse...
Read more >
Connectionproblems with FTPS. "session reuse required" on ...
webDeployment.ftps - 522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page. Attachments 1.
Read more >
FTPS with Python ftplib - Session reuse required
It appears that vsftpd server implemented exactly that by enforcing the "SSL session reuse between the control and data connection".
Read more >
Connecting to an FTPS Server with SSL Session Reuse in ...
522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page. So it appears the vendor uses ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found