Rpi-imager: Flash fails with a download error message

Created on 13 Nov 2021  ·  8Comments  ·  Source: raspberrypi/rpi-imager

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

All 8 comments

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).

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

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?

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.

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

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.

@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.

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!

Was this page helpful?
0 / 5 - 0 ratings