GnuTLS error -15: An unexpected TLS packet was received.

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

GnuTLS error -15: An unexpected TLS packet was received.

#1 Post by kkggbb » 2021-01-25 03:02

Hi,

My Filezilla client fails to list directory content on my Filezilla server after a client upgrade. I suspect this might have something to do with GnuTLS version being newer in the client, but that is just a guess.

Client: Filezilla 3.51.0
Server: Filezilla 0.9.60 beta

Here's what the log looks like on the client side:

Code: Select all

Status:	Connecting to 192.168.86.100:990...
Status:	Connection established, initializing TLS...
Trace:	tls_layer_impl::client_handshake()
Trace:	tls_layer_impl::continue_handshake()
Trace:	TLS handshake: About to send CLIENT HELLO
Trace:	TLS handshake: Sent CLIENT HELLO
Trace:	tls_layer_impl::on_send()
Trace:	tls_layer_impl::continue_handshake()
Trace:	tls_layer_impl::on_read()
Trace:	tls_layer_impl::continue_handshake()
Trace:	TLS handshake: Received SERVER HELLO
Trace:	TLS handshake: Processed SERVER HELLO
Trace:	TLS handshake: Received CERTIFICATE
Trace:	TLS handshake: Processed CERTIFICATE
Trace:	TLS handshake: Received SERVER KEY EXCHANGE
Trace:	TLS handshake: Processed SERVER KEY EXCHANGE
Trace:	TLS handshake: Received SERVER HELLO DONE
Trace:	TLS handshake: Processed SERVER HELLO DONE
Trace:	TLS handshake: About to send CLIENT KEY EXCHANGE
Trace:	TLS handshake: Sent CLIENT KEY EXCHANGE
Trace:	TLS handshake: About to send FINISHED
Trace:	TLS handshake: Sent FINISHED
Trace:	tls_layer_impl::on_read()
Trace:	tls_layer_impl::continue_handshake()
Trace:	TLS handshake: Received NEW SESSION TICKET
Trace:	TLS handshake: Processed NEW SESSION TICKET
Trace:	TLS handshake: Received FINISHED
Trace:	TLS handshake: Processed FINISHED
Trace:	TLS Handshake successful
Trace:	Protocol: TLS1.2, Key exchange: ECDHE-SECP256R1-RSA-SHA384, Cipher: AES-256-GCM, MAC: AEAD
Trace:	tls_layer_impl::verify_certificate()
Status:	Verifying certificate...
Trace:	CFtpControlSocket::SetAsyncRequestReply
Status:	TLS connection established, waiting for welcome message...
Trace:	CFtpControlSocket::OnReceive()
Response:	220-FileZilla Server 0.9.60 beta
Response:	220-written by Tim Kosse (tim.kosse@filezilla-project.org)
Response:	220 Please visit https://filezilla-project.org/
Trace:	CFtpLogonOpData::ParseResponse() in state 1
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 5
Trace:	CFtpLogonOpData::Send() in state 6
Command:	USER *****
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	331 Password required for *****
Trace:	CFtpLogonOpData::ParseResponse() in state 6
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 6
Command:	PASS ********
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	230 Logged on
Trace:	CFtpLogonOpData::ParseResponse() in state 6
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 11
Command:	PBSZ 0
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	200 PBSZ=0
Trace:	CFtpLogonOpData::ParseResponse() in state 11
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 12
Command:	PROT P
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	200 Protection level set to P
Trace:	CFtpLogonOpData::ParseResponse() in state 12
Status:	Logged in
Trace:	Measured latency of 2 ms
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpLogonOpData::Reset(0) in state 15
Trace:	CFileZillaEnginePrivate::ResetOperation(0)
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpListOpData::Send() in state 0
Status:	Retrieving directory listing...
Trace:	CFtpChangeDirOpData::Send() in state 0
Trace:	CFtpChangeDirOpData::Send() in state 1
Command:	PWD
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	257 "/" is current directory.
Trace:	CFtpChangeDirOpData::ParseResponse() in state 1
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpChangeDirOpData::Reset(0) in state 1
Trace:	CFtpListOpData::SubcommandResult(0) in state 1
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpListOpData::Send() in state 2
Trace:	CFtpRawTransferOpData::Send() in state 0
Trace:	CFtpRawTransferOpData::Send() in state 1
Command:	TYPE I
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	200 Type set to I
Trace:	CFtpRawTransferOpData::ParseResponse() in state 1
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpRawTransferOpData::Send() in state 2
Command:	PASV
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	227 Entering Passive Mode (192,168,86,100,117,34)
Trace:	CFtpRawTransferOpData::ParseResponse() in state 2
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpRawTransferOpData::Send() in state 4
Trace:	Binding data connection source IP to control connection source IP 192.168.86.168
Trace:	tls_layer_impl::client_handshake()
Trace:	Trying to resume existing TLS session.
Command:	MLSD
Trace:	tls_layer_impl::on_send()
Trace:	tls_layer_impl::continue_handshake()
Trace:	TLS handshake: About to send CLIENT HELLO
Trace:	TLS handshake: Sent CLIENT HELLO
Trace:	tls_layer_impl::on_read()
Trace:	tls_layer_impl::continue_handshake()
Trace:	TLS handshake: Received SERVER HELLO
Trace:	TLS handshake: Processed SERVER HELLO
Trace:	tls_layer_impl::failure(-15)
Error:	GnuTLS error -15: An unexpected TLS packet was received.
Trace:	tls_layer_impl::on_read()
Error:	The data connection could not be established: ECONNABORTED - Connection aborted
Trace:	CTransferSocket::TransferEnd(3)
Trace:	CFtpControlSocket::OnReceive()
Response:	150 Opening data channel for directory listing of "/"
Trace:	CFtpRawTransferOpData::ParseResponse() in state 4
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpRawTransferOpData::Send() in state 5
Trace:	CFtpControlSocket::TransferEnd()
Trace:	tls_layer_impl::on_read()
Trace:	CFtpControlSocket::OnReceive()
Response:	426 Connection closed; aborted transfer of "/"
Trace:	CFtpRawTransferOpData::ParseResponse() in state 7
Trace:	CFtpControlSocket::ResetOperation(2)
Trace:	CControlSocket::ResetOperation(2)
Trace:	CFtpRawTransferOpData::Reset(2) in state 7
Trace:	CFtpListOpData::SubcommandResult(2) in state 3
Trace:	CFtpControlSocket::ResetOperation(2)
Trace:	CControlSocket::ResetOperation(2)
Trace:	CFtpListOpData::Reset(2) in state 3
Error:	Failed to retrieve directory listing
Trace:	CFileZillaEnginePrivate::ResetOperation(2)

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#2 Post by botg » 2021-01-25 11:29

What's your operating system on the client side?

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#3 Post by kkggbb » 2021-01-25 19:45

Linux Debian testing.

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#4 Post by botg » 2021-01-26 12:39

Which version of GnuTLS are you using?

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#5 Post by kkggbb » 2021-01-27 05:40

I thought it was statically linked.

Anyway, the client says it is using 3.7.0. Didn't find GnuTLS version on the server.

User avatar
boco
Contributor
Posts: 26933
Joined: 2006-05-01 03:28
Location: Germany

Re: GnuTLS error -15: An unexpected TLS packet was received.

#6 Post by boco » 2021-01-27 05:51

FileZilla Server uses OpenSSL, and, as it is Windows-only, the version is known.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#7 Post by botg » 2021-01-27 09:59

Could you please try the official FileZilla binaries? If the binaries for Debian stable do not run on testing, try the Windows binaries with Wine instead.

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#8 Post by kkggbb » 2021-01-27 23:22

The official binary works fine (Filezilla 3.52.2 with GnuTLS 3.6.15).

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#9 Post by botg » 2021-01-28 10:37

Most odd. Could you please provide a packet dump of the error, created e.g. with tcpdump or wireshark?

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#10 Post by kkggbb » 2021-01-28 17:10

Here's the packet dump of the data connection:
filezilla_issue.pcapng
(1.77 KiB) Downloaded 71 times
.

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#11 Post by botg » 2021-02-01 14:27

What CPU do you have?

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#12 Post by kkggbb » 2021-02-02 18:03

On the client: Intel Core i7-8650U
On the server: Intel Xeon E3-1245

User avatar
botg
Site Admin
Posts: 35555
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: GnuTLS error -15: An unexpected TLS packet was received.

#13 Post by botg » 2021-02-04 13:39

Came across this issue: https://bugs.debian.org/cgi-bin/bugrepo ... bug=980119

Using a manually compiled GnuTLS 3.7.0 (and its cryptographic dependencies) I am not experiencing any issues.


There is the possibility that either GnuTLS, Nettle or GMP have been compiled with flags not 100% compatible with your CPU. Could you please try to rebuild the packages for these libraries on your machine?

kkggbb
504 Command not implemented
Posts: 7
Joined: 2021-01-25 02:48
First name: Konstantin

Re: GnuTLS error -15: An unexpected TLS packet was received.

#14 Post by kkggbb » 2021-02-12 07:41

I've tried building it, but it turned out to be more trouble than I'm currently willing to deal with.

The standard build instructions don't work on my machine. The configure script doesn't find libnettle for whatever reason, even though I've built the dependencies and installed them.

I think I'll just wait for Debian maintainers to figure this out.

Post Reply