Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running Yay it returns a 404 error: #76

Closed
Node815 opened this issue Sep 9, 2024 · 6 comments · Fixed by #85
Closed

When running Yay it returns a 404 error: #76

Node815 opened this issue Sep 9, 2024 · 6 comments · Fixed by #85

Comments

@Node815
Copy link

Node815 commented Sep 9, 2024

I had to change the port to 8280 as the other default one is in use on the server. But this is the error:

 yay
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 repo.db failed to download
error: failed retrieving file 'repo.db' from 192.168.1.214:8280 : The requested URL returned error: 404
error: failed to synchronize all databases (unexpected error)
 -> error refreshing databases - exit status 1

My Mount for the aurcache is as follows:

/mnt/storage/docker/appdata/aurcache/repo/ on the docker LXC which reads it fine with many other containers i have running on it.

Inside the db folder:

total 100
drwxr-xr-x 2 root root    81 Sep  8 19:41 .
drwxr-xr-x 4 root root    40 Sep  8 19:41 ..
-rw-r--r-- 1 root root  4096 Sep  8 19:41 db.sqlite
-rw-r--r-- 1 root root 32768 Sep  8 19:41 db.sqlite-shm
-rw-r--r-- 1 root root 61832 Sep  8 19:41 db.sqlite-wal

Inside the repo folder:

total 8
drwxr-xr-x 2 root root  106 Sep  8 19:41 .
drwxr-xr-x 4 root root   40 Sep  8 19:41 ..
lrwxrwxrwx 1 root root   21 Sep  8 19:41 repo.db -> ./repo/repo.db.tar.gz
-rw-r--r-- 1 root root 1024 Sep  8 19:41 repo.db.tar.gz
lrwxrwxrwx 1 root root   24 Sep  8 19:41 repo.files -> ./repo/repo.files.tar.gz
-rw-r--r-- 1 root root 1024 Sep  8 19:41 repo.files.tar.gz```

I am not sure if the port number change is causing this or not.  
@Lukas-Heiligenbrunner
Copy link
Owner

Hey, somehow your repo.db and repo.files symlink links to ./repo/repo.db.tar.gz and not to ./repo.db.tar.gz.
This definitly shouldn't have anything to do with the port change.

Did you move around the path of the repo? Maybe try to delete the repo and let it generate again... 🤔

@Node815
Copy link
Author

Node815 commented Sep 9, 2024

i tried this and have the same or similar error:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 repo.db failed to download
error: failed retrieving file 'repo.db' from 192.168.1.214:8280 : The requested URL returned error: 404
error: failed to synchronize all databases (unexpected error)
 -> error refreshing databases - exit status 1

From the container after running it without detaching:

[+] Running 1/0
 ✔ Container aurcache-aurcache-1  Created                                                                                                                                                0.0s 
Attaching to aurcache-1
aurcache-1  | Starting Podman service.
aurcache-1  | [2024-09-09T11:48:19Z INFO  aurcache::utils::startup] 
aurcache-1  |               _    _ _____   _____           _
aurcache-1  |          /\  | |  | |  __ \ / ____|         | |
aurcache-1  |         /  \ | |  | | |__) | |     __ _  ___| |__   ___
aurcache-1  |        / /\ \| |  | |  _  /| |    / _` |/ __| '_ \ / _ \
aurcache-1  |       / ____ \ |__| | | \ \| |___| (_| | (__| | | |  __/
aurcache-1  |      /_/    \_\____/|_|  \_\\_____\__,_|\___|_| |_|\___|
aurcache-1  |     
aurcache-1  | [2024-09-09T11:48:19Z INFO  aurcache::utils::startup] Removed old container storage `/run/containers/storage`
aurcache-1  | [2024-09-09T11:48:19Z INFO  aurcache::utils::startup] Removed old container storage `/run/libpod`
aurcache-1  | [2024-09-09T11:48:19Z INFO  pacman_repo_utils::repo_init] Pacman repo archive already exists
aurcache-1  | [2024-09-09T11:48:19Z INFO  sea_orm_migration::migrator] Applying all pending migrations
aurcache-1  | [2024-09-09T11:48:19Z INFO  sea_orm_migration::migrator] No pending migrations
aurcache-1  | [2024-09-09T11:48:19Z INFO  aurcache::scheduler::aur_version_update] performing aur version checks
aurcache-1  | [2024-09-09T11:48:19Z WARN  rocket::launch] Rocket has launched from http://0.0.0.0:8080
aurcache-1  | [2024-09-09T11:48:19Z WARN  rocket::launch] Rocket has launched from http://0.0.0.0:8081
aurcache-1  | [2024-09-09T11:48:31Z ERROR rocket::server::_] No matching routes for GET /repo.db.
aurcache-1  | [2024-09-09T11:48:31Z WARN  rocket::server::_] No 404 catcher registered. Using Rocket default.

I also erased the compose, and deployed a fresh docker LXC in proxmox with the FUSE permission added. I copied the docker compose from your readme.md page, and deployed it verbatim (Except removing the Version tag as it's obsolete for my docker compose) and redeployed. I edited pacman.conf to change it to the new URL and port and have the same error:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 repo.db failed to download
error: failed retrieving file 'repo.db' from 192.168.1.206:8080 : The requested URL returned error: 404
error: failed to synchronize all databases (unexpected error)
 -> error refreshing databases - exit status 1

To confirm it's not "Yay" I tried with Pacman as well:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 repo.db failed to download
error: failed retrieving file 'repo.db' from 192.168.1.206:8080 : The requested URL returned error: 404
error: failed to synchronize all databases (unexpected error)

This may or may not be related, but this is my docker version:

root@aurcache:/compose# docker --version
Docker version 27.2.0, build 3ab4256
root@aurcache:/compose# docker compose version
Docker Compose version v2.29.2

@Lukas-Heiligenbrunner
Copy link
Owner

Since
aurcache-1 | [2024-09-09T11:48:19Z INFO pacman_repo_utils::repo_init] Pacman repo archive already exists
is still present in your log you can't have deleted your repo files i think...
However, I'll have a look why this could have happened.

@Node815
Copy link
Author

Node815 commented Sep 22, 2024

Revisiting this, the docker-compose is what is creating the symlinks. I wiped the install and tried again, as far as I can estimate, it's not creating the .repo directory. I solved the 404 error by manually making the ./repo directory and then copying the repo.db.tar.gz and repo.files.tar.gz which exist in the same directory to the .repo directory.

I hope this makes some sense! :)

@ralphocdol
Copy link

I think the symlink is pointing to the wrong path or should have pointed directly to the file rather than ./repo/*

Before fix:

lrwxrwxrwx 1 root root   21 Sep 24 09:55 repo.db -> ./repo/repo.db.tar.gz
-rw-r--r-- 1 root root 1.0K Sep 24 09:55 repo.db.tar.gz
lrwxrwxrwx 1 root root   24 Sep 24 09:55 repo.files -> ./repo/repo.files.tar.gz
-rw-r--r-- 1 root root 1.0K Sep 24 09:55 repo.files.tar.gz

After manual fix:

lrwxrwxrwx 1 root root   14 Sep 24 10:36 repo.db -> repo.db.tar.gz
-rw-r--r-- 1 root root 1.0K Sep 24 09:55 repo.db.tar.gz
lrwxrwxrwx 1 root root   17 Sep 24 10:37 repo.files -> repo.files.tar.gz
-rw-r--r-- 1 root root 1.0K Sep 24 09:55 repo.files.tar.gz

I'm using an absolute path if that matters.

Issue somewhere here? just guessing

symlink(&db_file, path.join(format!("{}.db", name)))

symlink(&files_file, path.join(format!("{}.files", name)))

@Lukas-Heiligenbrunner
Copy link
Owner

Thanks @Node815 and @ralphocdol, my fault.
Should be fixed within the next release. If you need this earlier you can always use the git docker tag to use the latest version from master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants