anatol / pacoloco

Caching proxy server for Arch Linux pacman
MIT License
216 stars 30 forks source link

How to reset the Pacoloco docker server when the "byte range" issue occurs? #78

Closed lquidfire closed 1 year ago

lquidfire commented 1 year ago

Hi all,

I recently interrupted a download of updates, and now I cannot update my system via the local Pacoloco mirror, as it throws the following error:

failed retrieving file '[redacted].pkg.tar.zst' from [redacted]:9129 : HTTP server doesn't seem to support byte ranges. Cannot resume.

This seems related to the following open issue here on GitHub: Issue 7.

While awaiting an update that adds support or works around this issue, how can I resume updating my system while using the Pacoloco server?

My guess is that there is a partial file somewhere, and Pacoloco cannot resume the download and/or the serving of this partial file. This might well be a wrong assumption, hence my request for assistance here.

Based on my assumption, I logged into the Pacoloco docker container via docker exec -it [redacted] ash and tried to find a download cache. I couldn't find it.

I then used find to try locate any partial downloads with a filename of the to be downloaded package (e.g. `find / -name poppler*), but nothing turned up.

What is the way to 'reset' the pacoloco server so that I can continue using it?

Thank you in advance!

Focshole commented 1 year ago

Hmm, have you tried running pacman -Scc to clear the half downloaded package on the host that tried to fetch the file? In this way it should not try to ask for a byte range I think

lquidfire commented 1 year ago

Yes, that did it. I didn't realise that the issue was in my local pacman cache; not in pacoloco cache.

I didn't run pacman -Scc, which seemed somewhat drastic; but rather sudo rm /var/cache/pacman/pkg/*.part.