nroi / flexo

a central pacman cache
MIT License
172 stars 10 forks source link

Flexo docker fails to start: "No such file or directory", then "Unable to fetch mirrors remotely" #109

Closed adrfantini closed 1 year ago

adrfantini commented 1 year ago

I am trying to setup a Pacman package cache on my Unraid server using Flexo.

The docker run line is:

docker run -d --name='Flexo-arch-package-cache' --net='bridge'
  -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' \
  -e 'FLEXO_LISTEN_IP_ADDRESS'='0.0.0.0' \
  -e 'FLEXO_NUM_VERSIONS_RETAIN'='2' \
  -e 'FLEXO_MIRRORS_AUTO_ALLOWED_COUNTRIES'='IT,DE,FR,AT,SI' \
  -p '7878:7878/tcp' \
  -v '/mnt/user/appdata/flexo/pkg':'/var/cache/flexo/pkg':'rw' \
  --restart=on-failure:5 \
  'nroi/flexo:latest'

However, it crashes on start.

Logs:

Will try to fetch them from cache.
thread 'main' panicked at 'Unable to fetch mirrors from cache: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', src/main.rs:678:19
stack backtrace:
0: rust_begin_unwind
at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at ./rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
2: flexo::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[2023-07-30T11:23:38.999Z INFO flexo::mirror_flexo] Retrieved 0 files with a total size of 0.00 B from local file system.
[2023-07-30T11:23:38.999Z INFO flexo] Will switch mirror if download speed falls below 125.00 KiB/s
[2023-07-30T11:23:39.422Z INFO flexo] Unable to fetch mirrors remotely: DemarshallError(Error("unknown variant `ftp`, expected one of `http`, `https`, `rsync`", line: 1, column: 226632))

I noticed that /etc/flexo/ is empty, might that be the reason?

nroi commented 1 year ago

This looks like a bug that was already fixed, you probably ran into the issue with nroi/flexo:latest not being the latest version.

I've updated the docker image, please fetch the new image and let me know if this works for you.

adrfantini commented 1 year ago

This looks like a bug that was already fixed, you probably ran into the issue with nroi/flexo:latest not being the latest version.

I've updated the docker image, please fetch the new image and let me know if this works for you.

I confirm that that was the issue, thank you!