cachewerk / relay

The next-generation caching layer for PHP powered by Redis.
https://relay.so
MIT License
197 stars 10 forks source link

Ubuntu repository index fails to download #138

Closed bjarn closed 6 months ago

bjarn commented 6 months ago

Description

Fresh installation fails to install due to repository error.

Expected Behavior

Should be able to install Relay

Actual Behavior

The download fails with an unexpected size error message, potentially due to an ongoing mirror sync.

Get:11 https://repos.r2.relay.so/deb focal/main amd64 Packages [14.7 kB]
Err:11 https://repos.r2.relay.so/deb focal/main amd64 Packages
  File has unexpected size (14753 != 14746). Mirror sync in progress? [IP: 2606:4700:3108::ac42:2bc4 443]
  Hashes of expected file:
   - Filesize:14746 [weak]
   - SHA512:f6ec2b9c3b4cc60bfdfe5bad2e1cca26eda575a21be59afd7d2c7e68e787f83a521b61ef6fb3890ed587baf4fd3d0005ea34f185d4b5057f6be49e748e1aaa1a
   - SHA256:b36aab15fee551bbb121d608b9c2cf02e12e80e776dc224a8e575359dbe0e617
   - SHA1:827670237255a2ceaf2328e3629d68c9fc6ac4a4 [weak]
   - MD5Sum:cabe69d6dce52349f02a5d1497a293a2 [weak]
  Release file created at: Thu, 14 Mar 2024 22:17:47 +0000
Fetched 3256 B in 1s (3068 B/s)
Reading package lists... Done
E: Failed to fetch https://repos.r2.relay.so/deb/dists/focal/main/binary-amd64/Packages.gz  File has unexpected size (14753 != 14746). Mirror sync in progress? [IP: 2606:4700:3108::ac42:2bc4 443]
   Hashes of expected file:
    - Filesize:14746 [weak]
    - SHA512:f6ec2b9c3b4cc60bfdfe5bad2e1cca26eda575a21be59afd7d2c7e68e787f83a521b61ef6fb3890ed587baf4fd3d0005ea34f185d4b5057f6be49e748e1aaa1a
    - SHA256:b36aab15fee551bbb121d608b9c2cf02e12e80e776dc224a8e575359dbe0e617
    - SHA1:827670237255a2ceaf2328e3629d68c9fc6ac4a4 [weak]
    - MD5Sum:cabe69d6dce52349f02a5d1497a293a2 [weak]
   Release file created at: Thu, 14 Mar 2024 22:17:47 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Possible Fix

Steps to Reproduce

  1. Install fresh server (this is at Vultr, Ubuntu 20.04)
  2. Follow documentation and run: curl -s https://repos.r2.relay.so/key.gpg | sudo apt-key add - and sudo add-apt-repository "deb https://repos.r2.relay.so/deb $(lsb_release -cs) main"
  3. See error

Additional context

N/A

Relay diagnostics

N/A

Environment

szepeviktor commented 6 months ago

@tillkruss You could have a CI workflow that installs Relay on every supported OS.

tillkruss commented 6 months ago

We already have that, but there is an issue with our repo metadata. We’re working on fixing this.

michael-grunder commented 6 months ago

I'm able to install Relay via this Dockerfile which looks the same

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
    lsb-release \
    curl \
    software-properties-common

RUN curl -s https://repos.r2.relay.so/key.gpg | apt-key add - && \
    add-apt-repository "deb https://repos.r2.relay.so/deb $(lsb_release -cs) main" && \
    add-apt-repository ppa:ondrej/php && \
    apt-get -y install php8.2

RUN apt-get -y install php8.2-relay && php --ri relay

Let me know if this is different from what you're trying to do and I'll try to help track down the issue.

tillkruss commented 6 months ago

@bjarn: Can you run apt-get clean and see if that resolves the issue for you?

tillkruss commented 6 months ago

Fixed.