SelfhostedPro / Yacht

A web interface for managing docker containers with an emphasis on templating to provide 1 click deployments. Think of it like a decentralized app store for servers that anyone can make packages for.
MIT License
3.34k stars 158 forks source link

[Bug Report] Crash on multiple new installs due to bad Permissions #514

Closed ssj4maiko closed 1 month ago

ssj4maiko commented 2 years ago

I have recently learned about Yacht. I have a Raspberry Pi 4 which already has a couple applications (nginx with webdav, Pihole).

I installed Yatch, working, no problems. Got the templates, was able to install Navidrome, had some problems, but it was on that side (Had to add an env to change an optional conf), and I fixed it.

To Reproduce

However, installing Heimdall, Vaultwarden, and even normal MariaDB, all of them gave me Permission errors on logs.

Here is an example from Heimdall:

s6-supervise s6-linux-init-shutdownd: fatal: unable to iopause: Operation not permitted
s6-linux-init-shutdownd: fatal: unable to iopause: Operation not permitted
s6-linux-init-hpr: fatal: unable to reboot(): Operation not permitted
s6-svscan: warning: unable to iopause: Operation not permitted
s6-svscan: warning: executing into .s6-svscan/crash
s6-svscan crashed. Killing everything and exiting.

Here is for Vaultwarden:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', library/std/src/sys/unix/time.rs:353:62
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: tokio::time::driver::Driver<P>::new
   4: tokio::runtime::driver::Driver::new
   5: tokio::runtime::builder::Builder::build
   6: vaultwarden::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', library/std/src/sys/unix/time.rs:353:62
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: tokio::time::driver::Driver<P>::new
   4: tokio::runtime::driver::Driver::new
   5: tokio::runtime::builder::Builder::build
   6: vaultwarden::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Of course, this means that they're on an infinite loop of crashing.

I have tried deleting and remaking them, changing ports, changing template folders, giving 777 on the folders (shared volumes). Same thing.

Like with Navidrome, I imagined it could be a problem on the software at first, but considering permissions, I guessed Yacht would be the one with the way to resolve it.

Expected behavior To install and at least stabilize without an infinite loop of crashes

Raspberry Pi 4 (4GB)

wickedyoda commented 2 years ago

I think there's an issue with docker on a recent update. I am having the same issue, different os, and different containers. I will test and get back with you.

@SelfhostedPro any ideas I am experiencing the same.

wickedyoda commented 2 years ago

I did a little testing and it seems to have the "user: 1000:1000" in the docker run or docker-compose results in the error. From the best I can tell so far, it's not able to match the user ID to users on the host system. Try verifying the local user account such as root that you want the container running under and correcting the ID. One of my containers that had the issue was jellyfin, I was able to remove the line in the docker-compose and the container runs with no issues. Testing now with other containers.

ssj4maiko commented 2 years ago

I'm pretty sure that my uid and guis are both 1000, that's what they id command gives me. I tried writing the following docker-compose.yml

version: '3.1'
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    restart: unless-stopped
    user: 1000:1000
    environment:
      MARIADB_ROOT_PASSWORD: pass
    volumes:
      - /home/pi/mariadb:/config
    ports:
      - 3306:3306
    network_mode: bridge

I'm using mariadb simply because it's simple, and I'm using the image offered in yacht, rather than the official.

But it gave me the same errors, no difference at all.


But with the hint, I went to look after some specific errors I saw from mariadb, and found this: https://www.reddit.com/r/pihole/comments/tz1hf3/comment/i3w0uhb/

I did it, and after running mariadb again, it seems to have worked, so I will be testing the other images from scratch.

However, this error is specific to Raspberry OS's version change, so if the problem is also happening in other OS/processor and so on, it could be a hint.

ssj4maiko commented 2 years ago

yeah, it seems that has solved my problem, vaultwarden was lacking a volume (/data) and no env file, giving me errors, but fixing them manually worked.

I could close the issue, but I'm not sure if you want to find some solution to your problem since it seems related, but I guess this is not a problem with Yacht itself.

wickedyoda commented 2 years ago

I'm gonna keep it open while I test a few things and document them. I'll close it when done.