You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems if the proxy server is unavailable (either offline completely or due to network issue) when pacoloco is actively using it, then pacoloco will become completely unusable. Only restart can fix.
And also seems pacoloco don't send locally available cache (for db files) when network is down.
Configure pacoloco to use http_proxy, http_proxy: http://192.168.0.11:8080
Start a proxy server at port 8080, and start pacoloco
Run pacman -Syu. Everything works fine.
Kill the proxy server.
Run pacman -Syu, pacman returns "failed to download".
Start the proxy server again. Expect everything goes back to normal.
Run pacman -Syu, but pacman still returns same network error. I also noticed that there is no requests made to the proxy server.
Restart pacoloco container, everything works again.
The errors in step 7:
On pacman:
:: Synchronizing package databases...
core.db failed to download
extra.db failed to download
multilib.db failed to download
archlinuxcn.db failed to download
error: failed retrieving file 'core.db' from mirrors.local : The requested URL returned error: 404
error: failed retrieving file 'extra.db' from mirrors.local : The requested URL returned error: 404
error: failed retrieving file 'multilib.db' from mirrors.local : The requested URL returned error: 404
warning: too many errors from mirrors.local, skipping for the remainder of this transaction
error: failed retrieving file 'archlinuxcn.db' from mirrors.local : The requested URL returned error: 404
error: failed to synchronize all databases (failed to retrieve some files)
On pacoloco:
pacoloco-1 | 2024/05/14 21:27:26 unable to download file archlinux/extra/os/x86_64/extra.db
pacoloco-1 | 2024/05/14 21:27:26 unable to download file archlinux/multilib/os/x86_64/multilib.db
pacoloco-1 | 2024/05/14 21:27:26 unable to download file archlinuxcn/x86_64/archlinuxcn.db
pacoloco-1 | 2024/05/14 21:27:26 unable to download file archlinux/core/os/x86_64/core.db
Prefetch is also broken:
pacoloco-1 | 2024/05/14 21:36:00 Starting prefetching packages...
pacoloco-1 | 2024/05/14 21:36:00 An error occurred for mirror {/repo/archlinux/core/os/x86_64/core.db archlinux 2024-05-14 21:32:21.846675592 +0800 +0800} :unable to download file archlinux/core/os/x86_64/core.db
pacoloco-1 | 2024/05/14 21:36:00 An error occurred for mirror {/repo/archlinux/extra/os/x86_64/extra.db archlinux 2024-05-14 21:32:23.907249368 +0800 +0800} :unable to download file archlinux/extra/os/x86_64/extra.db
pacoloco-1 | 2024/05/14 21:36:00 An error occurred for mirror {/repo/archlinux/multilib/os/x86_64/multilib.db archlinux 2024-05-14 21:32:20.908618101 +0800 +0800} :unable to download file archlinux/multilib/os/x86_64/multilib.db
pacoloco-1 | 2024/05/14 21:36:00 An error occurred for mirror {/repo/archlinuxcn/x86_64/archlinuxcn.db archlinuxcn 2024-05-14 21:32:22.503971676 +0800 +0800} :unable to download file archlinuxcn/x86_64/archlinuxcn.db
pacoloco-1 | 2024/05/14 21:36:00 Finished prefetching packages!
pacoloco-1 | 2024/05/14 21:36:00 Finished prefetching routine!
pacoloco-1 | 2024/05/14 21:36:00 On 2024-05-14 21:38:59.999999953 +0800 CST m=+404.298213542 the prefetching routine will be run again
The text was updated successfully, but these errors were encountered:
Relate to #108
I think it's not only an issue with http_proxy. I can reproduce this error without http_proxy settings by plug/unplug my network cable (forcing a connection issue during pacoloco's network activity), same problem will show up.
After a little tinkering I think the problem is d is not ended by default. And I added f.cachedFileExists so that cache can be served. (Otherwise pacoloco would just return err without sending anything. https://github.com/anatol/pacoloco/blob/master/pacoloco.go#L270)
This has a little bit downside, it would not register a cacheServingFailedCounter if cache is sent. But I guess that would not be a fail after all?
It seems if the proxy server is unavailable (either offline completely or due to network issue) when pacoloco is actively using it, then pacoloco will become completely unusable. Only restart can fix.
And also seems pacoloco don't send locally available cache (for db files) when network is down.
Basic info:
Platform: docker
Image: ghcr.io/anatol/pacoloco:latest
Steps to reproduce:
http_proxy: http://192.168.0.11:8080
pacman -Syu
. Everything works fine.pacman -Syu
, pacman returns "failed to download".pacman -Syu
, but pacman still returns same network error. I also noticed that there is no requests made to the proxy server.The errors in step 7:
On pacman:
On pacoloco:
Prefetch is also broken:
The text was updated successfully, but these errors were encountered: