Trying to send files to bitvise server over ftps.
First had trouble with the connection itself. With your help it was solved by
ReuseControlConnectionSession = false
But we still couldn't send any data.
It gets until the STORE and trying to initiate a data connection, but then...
Data connection: HandshakeMessage:ClientHello was sent.
...
Rebex.Net.TlsException: Connection was closed by the remote connection end.
at the same time on the server side:
FTP passive data connection failed.
NoTlsSessionId
The client has tried to perform a full TLS handshake for a data connection. The client must resume the TLS session from the control connection by issuing an abbreviated TLS handshake with a correct TLS session ID.
I might misunderstand something, but we just turned out reusing the control connection session because then we cannot connect, and now it complains about not having that session id.
Anyway we tried to find a setting that makes sense but we couldn't. Could you help us out again?
This is the ftp client's settings dumped out
{
"DoNotSendSignals": false,
"DoNotSendAbort": false,
"KeepAliveDuringTransfer": false,
"ForceSilentCcc": false,
"ForceActiveCcc": false,
"SendDataAsynchronously": false,
"TimeoutAsynchronousMethods": false,
"DoNotDetectFeatures": false,
"IgnorePassiveModeAddress": false,
"EnableMultipleBlockingCalls": false,
"PauseBeforeUploadClose": false,
"DisableInvalidPassiveModeAddressWorkaround": false,
"EnableControlConnectionFlushing": false,
"ConnectPassiveLater": false,
"UseLargeBuffers": false,
"ReuseControlConnectionSession": false,
"ForceListHiddenFiles": false,
"DisableProgressPercentage": false,
"MultiFileLinkMode": "FollowLinks",
"MultiFileMoveMode": "All",
"RestoreDateTime": "None",
"EnableChecksumVerification": false,
"TimeComparisonGranularity": "Seconds",
"RecheckItemExistence": false,
"PreferredChecksumType": "SHA1",
"KeepAliveDuringTransferInterval": 30,
"KeepAliveDuringIdleInterval": 0,
"ForceMdtmForGetFileDateTime": true,
"UploadCommand": null,
"UseLegacyPaths": false,
"ForceSimpleDirectoryExists": false,
"RaiseEventsFromCurrentThread": false,
"As400ListingDateFormat": null,
"DisableImplicitAs400NameFormat": false,
"SslUpgradeType": "TLS",
"SslReuseSessions": true,
"ForceExtendedDataChannelCommand": false,
"AlwaysResolveServerName": false,
"EnableFactsNegotiation": null,
"CompressionLevel": 6,
"SkipDuplicateItems": true,
"BackslashIsRemoteDirectorySeparator": true,
"EnableDummyRenameForFileExists": false,
"EnableBrokenShutdownWorkaround": null,
"MdtmSetTimeOffset": null,
"GetFileOpenRemoteFirst": false,
"SslAcceptAllCertificates": true,
"SslAllowedVersions": "Any",
"SslServerName": null,
"SslAllowedSuites": "RSA_WITH_3DES_EDE_CBC_SHA, RSA_WITH_AES_128_CBC_SHA, RSA_WITH_AES_256_CBC_SHA, DHE_RSA_WITH_3DES_EDE_CBC_SHA, DHE_RSA_WITH_AES_128_CBC_SHA, DHE_RSA_WITH_AES_256_CBC_SHA, DHE_RSA_WITH_AES_128_CBC_SHA256, DHE_RSA_WITH_AES_256_CBC_SHA256, ECDHE_RSA_WITH_AES_128_CBC_SHA, ECDHE_RSA_WITH_AES_256_CBC_SHA, ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, ECDHE_ECDSA_WITH_AES_128_CBC_SHA, ECDHE_ECDSA_WITH_AES_256_CBC_SHA, ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, DHE_RSA_WITH_AES_128_GCM_SHA256, DHE_RSA_WITH_AES_256_GCM_SHA384, Fast",
"SslAllowedCurves": "All",
"SslAllowVulnerableSuites": false,
"SslDoNotInsertEmptyFragment": false,
"SslRenegotiationExtensionEnabled": true,
"SslServerNameIndicationEnabled": true,
"SslServerCertificateVerifier": {},
"SslClientCertificateRequestHandler": {},
"SslMinimumDiffieHellmanKeySize": 1024,
"SslSession": null,
"SslServerCertificateValidationOptions": "None",
"SslStrictKeyUsageValidation": false
}
The log on our side
2022-06-20 09:39:20.354 [ 25] [Information] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "<<< ": 227 Entering Passive Mode (51,124,201,77,160,40)
2022-06-20 09:39:20.358 [ 25] [Information] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" ">>> ": STOR testupload.txt
2022-06-20 09:39:20.360 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp": Establishing data connection to 51.124.201.77:41000.
2022-06-20 09:39:20.362 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "Proxy": Connecting to 11.11.11.11:41000 (no proxy).
2022-06-20 09:39:20.370 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "Proxy": Connection established.
2022-06-20 09:39:20.372 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp": Established data connection from 22.22.22.22:59970.
2022-06-20 09:39:20.374 [ 25] [Information] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "<<< ": 150 Opening data connection
2022-06-20 09:39:20.377 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp": Upgrading data connection to TLS.
2022-06-20 09:39:20.380 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: Using classic TLS core.
2022-06-20 09:39:20.382 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: Enabled cipher suites: 0x000F3DF7EBE00640.
2022-06-20 09:39:20.383 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: Applicable cipher suites: 0x000F3DF7EBE00640.
2022-06-20 09:39:20.385 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: HandshakeMessage:ClientHello was sent.
2022-06-20 09:39:20.407 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: TLS socket was closed, 0 bytes of data were received.
2022-06-20 09:39:20.410 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: TLS socket closed while negotiation was in progress.
2022-06-20 09:39:20.414 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp" "TLS": Data connection: Closing TLS socket.
2022-06-20 09:39:20.436 [ 25] [Debug] Tie.MessagePortal.Communication.AddIns.Ftp.FtpAddIn, "Rebex.Net.Ftp": Error while starting data transfer: Rebex.Net.FtpException: The server has closed the connection. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end.
at iizsj.dgpfm.fosdf()
at iizsj.eefpa.gnzor()
at Rebex.Net.TlsSocket.yciew()
at Rebex.Net.TlsSocket.Negotiate()
at iizsj.vkvpq.xtjgq(TlsParameters p0, TlsSession p1, FtpTransferState p2, Boolean p3)
at iizsj.lqpyn.xtjgq(TlsParameters p0, TlsSession p1, FtpTransferState p2, Boolean p3)
at Rebex.Net.Ftp.wvoov(String p0, Boolean p1, vkvpq p2, ziqoa p3, Int64 p4, FtpTransferState p5)
--- End of inner exception stack trace ---
at Rebex.Net.Ftp.wvoov(String p0, Boolean p1, vkvpq p2, ziqoa p3, Int64 p4, FtpTransferState p5)
The log on the sever side
<event seq="7631" time="2022-06-17 12:03:45.525513 +0200" app="BvSshServer 8.49" name="I_FTP_PASV_DISPATCHER_DATA_FAILED" desc="FTP passive data connection failed.">
<parameters
remoteAddress="22.22.22.22:2112"
loc="NL/EU" listenAddress="0.0.0.0:41000"
failureReason="NoTlsSessionId"/>
<help message="The client has tried to perform a full TLS handshake for a data connection. The client must resume the TLS session from the control connection by issuing an abbreviated TLS handshake with a correct TLS session ID."/>
</event>