Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flash fails with a download error message #306

Closed
pauloimon opened this issue Nov 13, 2021 · 8 comments
Closed

Flash fails with a download error message #306

pauloimon opened this issue Nov 13, 2021 · 8 comments

Comments

@pauloimon
Copy link

pauloimon commented Nov 13, 2021

I'm trying to flash my Micro SD card with the Raspberry Pi OS Lite image, but I received the following error twice:

Error Downloading: GnuTLS recv error (-9): Error decoding the received TLS packet. - Server IP: 46.235.231.145

The process is stopped after 60%.

What's wrong? It's a network issue?

--

Raspberry Pi Imager: v1.6.2
OS: Ubuntu 20.04.3 LTS

@pauloimon pauloimon changed the title Flash fails with download error message Flash fails with a download error message Nov 13, 2021
@andygeorge
Copy link

I get the same thing. Try this tip, downloading the image directly (link is probably https://downloads.raspberrypi.org/raspios_lite_armhf/images/ for the Lite OS).

@pauloimon
Copy link
Author

Thanks for the answer, @andygeorge! I'll try this tip soon.

@maxnet
Copy link
Collaborator

maxnet commented Dec 15, 2021

What's wrong? It's a network issue?

Possibly.
But then there must be something more special occurring than just connection loss, as I do not get that error if I simply pull the plug, or drop all packets with iptables.

You do have the latest gnutls version? When running apt list libgnutls30 it should show:

$ apt list libgnutls30
Listing... Done
libgnutls30/focal-updates,focal-security,now 3.6.13-2ubuntu1.6 amd64 [installed,automatic]

And you do are using the Imager .deb package from raspberrypi.org ? (as opposed to the snap from Ubuntu software center, as there may be different package versions inside the snap sandbox than what is on the main system)

On a normal Intel/AMD computer?

@andygeorge
Copy link

I do not get that error if I simply pull the plug, or drop all packets with iptables

I suspect it's an issue from the downloads.raspberrypi.org side, and is sending bad data/terminating the connection from that side, which would look different than a simple loss of network connectivity on your clientside.

@lurch
Copy link
Contributor

lurch commented Dec 15, 2021

@pauloimon Was this a transient / temporary error, or is it still happening repeatedly? What type of internet-connection do you have?

@maxnet
Copy link
Collaborator

maxnet commented Dec 15, 2021

I suspect it's an issue from the downloads.raspberrypi.org side, and is sending bad data/terminating the connection from that
side, which would look different than a simple loss of network connectivity on your clientside.

If server was sending "bad data" I would also expect it to cause problems on other platforms than Ubuntu though. And we have not received any reports about that (at least not with a clear error message).
Although that GnuTLS may be used on Ubuntu (depending on which libcurl package is installed) instead of OpenSSL (which Windows edition is using) do can result in other error conditions/bugs...

If server abruptly terminates the TCP connection without properly letting TLS say goodbye, you also get a slightly different error message.
This is what it looks like if I kill the remote webserver program while downloading on my Ubuntu 20.04 with libgnutls30 3.6.13-2ubuntu1.6:

screenshot-webserver-terminated

===

Could probably workaround the problem by adding all GnuTLS recv errors to the list of errors on which it should retry connecting at least once, before failing. Still wonder what makes them happen in the first place though.

@pauloimon
Copy link
Author

@maxnet

You do have the latest gnutls version?

Yes, I have the same version installed here:

libgnutls30/focal-updates,focal-security,now 3.6.13-2ubuntu1.6 amd64 [instalado,automático]

And you do are using the Imager .deb package from raspberrypi.org ?

I'm using the .deb version downloaded from releases page on GitHub.

On a normal Intel/AMD computer?

Yes, my machine has an AMD64 Intel CPU.

--

@lurch

Was this a transient / temporary error, or is it still happening repeatedly?

I didn't try recently, but I can test it again.

@pauloimon
Copy link
Author

I tried to flash again and now everything worked normally!

Captura de tela de 2021-12-15 20-49-19

I don't know what was happening, but I think the problem is solved now.

Thanks for the answers, guys!

maxnet added a commit that referenced this issue Dec 21, 2021
Try resuming download on CURLE_RECV_ERROR.
Will not retry more than once if nothing has been
downloaded since last attempt.

Ref #306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants