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

[BUG] GID set wrong per startup log #232

Closed
1 task done
ThePlexus opened this issue Jan 28, 2024 · 6 comments
Closed
1 task done

[BUG] GID set wrong per startup log #232

ThePlexus opened this issue Jan 28, 2024 · 6 comments

Comments

@ThePlexus
Copy link

ThePlexus commented Jan 28, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

the PGID parameter is not what is set

Expected Behavior

it should be what is set

Steps To Reproduce

run the docker create with PGID set
look in logs, see it is not set to same value as -e PGID

Environment

- OS:Alping 3.19
- How docker service was installed:alpine apk repo

CPU architecture

x86-64

Docker creation

docker run \
-d \
--name jellyfin \
-p 8096:8096/tcp \
-e TZ="Europe/London" \
-e PUID=500 \
-e PGID=510 \
-v /opt/jellyfin/config:/config \
-v /opt/Movies:/data/movies \
-v /opt/TV:/data/tvshows \
--restart unless-stopped \
  lscr.io/linuxserver/jellyfin:latest

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Jellyfin: https://opencollective.com/jellyfin

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    500
User GID:    65534
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[20:54:51] [INF] [1] Main: Jellyfin version: 10.8.13
[20:54:51] [INF] [1] Main: Environment Variables: ["[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_CONFIG_DIR, /config]"]
[20:54:51] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[20:54:51] [INF] [1] Main: Operating system: Linux
[20:54:51] [INF] [1] Main: Architecture: X64
[20:54:51] [INF] [1] Main: 64-Bit Process: True
[20:54:51] [INF] [1] Main: User Interactive: True
[20:54:51] [INF] [1] Main: Processor count: 4
[20:54:51] [INF] [1] Main: Program data path: /config/data
[20:54:51] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[20:54:51] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[20:54:51] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
[20:54:51] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
@j0nnymoe
Copy link
Member

Are you attempting to run rootless? As you mentioned in your previous issue mentioned about remapping.

@ThePlexus
Copy link
Author

ThePlexus commented Jan 28, 2024

I am not running rootless. The docker daemon is running as root.

# ps auwx | grep docker
 3700 root      0:00 supervise-daemon docker --start --retry TERM/60/KILL/10 --stdout-logger log_proxy -m /var/log/docker.log --stderr-logger log_proxy -m /var/log/docker.log --respawn-delay 2 --respawn-max 5 --respawn-period 1800 /usr/bin/dockerd --
 3701 root      0:17 /usr/bin/dockerd

I do use userns-remap option in docker, however this should be agnostic to the container.

# more /etc/docker/daemon.json 
{  
       "userns-remap": "dockremap"
---SNIP

The container should receive its GID from -e PGID parameter

I do not have this problem on any other linuxserver.io containers, for example linuxserver-swag

docker run -d \
  --name=nginx \
  -e PUID=550 \
  -e PGID=550 \
  -e TZ=Europe/London \
  -e URL=redacted \
  -e SUBDOMAINS=redacted \
  -e VALIDATION=http \
  -e EMAIL=redacted \
  -e ONLY_SUBDOMAINS=true \
  -p 443:443 \
  -p 80:80 \
  -v /raid/docker/nginx:/config \
  --restart unless-stopped \
  linuxserver/swag
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Certbot: https://supporters.eff.org/donate/support-work-on-certbot

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    550
User GID:    550
───────────────────────────────────────

using keys found in /config/keys
Variables set:
PUID=550
PGID=550

@aptalca
Copy link
Member

aptalca commented Jan 28, 2024

I do use userns-remap option in docker, however this should be agnostic to the container. The container should receive its GID from -e PGID parameter

Try without it and show us.

Also, if you want to compare, another ubuntu based image would be preferred as nginx is alpine based.

With that said, I can't reproduce:

$ docker run --rm -e PUID=500 -e PGID=500 lscr.io/linuxserver/jellyfin
Unable to find image 'lscr.io/linuxserver/jellyfin:latest' locally
latest: Pulling from linuxserver/jellyfin
dce296fdf90b: Pull complete 
c36572129e15: Pull complete 
76035646946a: Pull complete 
d83d5aef6ef7: Pull complete 
af725a6b263c: Pull complete 
a63cefe8779f: Pull complete 
8f794a9b44b6: Pull complete 
d02065bebc2c: Pull complete 
Digest: sha256:057eb6ceb2737027e7379bff5a788071911015928356425e9e020b73b9331a51
Status: Downloaded newer image for lscr.io/linuxserver/jellyfin:latest
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Jellyfin: https://opencollective.com/jellyfin

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    500
User GID:    500
───────────────────────────────────────

[custom-init] No custom files found, skipping...
failed to load external entity "/config/network.xml"
[21:30:42] [INF] [4] Main: Jellyfin version: 10.8.13
[21:30:42] [INF] [4] Main: Environment Variables: ["[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_CONFIG_DIR, /config]"]
[21:30:42] [INF] [4] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[21:30:42] [INF] [4] Main: Operating system: Linux
[21:30:42] [INF] [4] Main: Architecture: X64
[21:30:42] [INF] [4] Main: 64-Bit Process: True
[21:30:42] [INF] [4] Main: User Interactive: True
[21:30:42] [INF] [4] Main: Processor count: 8
[21:30:42] [INF] [4] Main: Program data path: /config/data
[21:30:42] [INF] [4] Main: Web resources path: /usr/share/jellyfin/web
[21:30:42] [INF] [4] Main: Application directory: /usr/lib/jellyfin/bin/

PS. Your TZ var is quoted incorrectly

@ThePlexus
Copy link
Author

ThePlexus commented Jan 28, 2024

Thanks for the replay and info on the TZ, good spot. ive fixed that, though ive not really needed to use a TZ here before its nice to be "correct," which is appreciated.

I shut down docker, removed the userns-remap option and pulled in everything again from scratch. As you can see, the group is still 'nobody'

# /etc/init.d/docker stop
 * Stopping Docker Daemon ...                                                                                                                                           [ ok ]
# mv /etc/docker/daemon.json /root/
# /etc/init.d/docker start
 * Starting Docker Daemon ...                                                                                                                                           [ ok ]
# docker info
Client:
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 4e1fe7492b9df85914c389d1f15a3ceedbb280ac
 runc version: 18a0cb0f32bcac2ecc9a10f327d282759c144dab
 init version: 
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.14-0-lts
 Operating System: Alpine Linux v3.19
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 31.18GiB
 Name: redacted
 ID: 8b0976a7-8650-4a98-bdf9-e256662aaaa8
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

docker is now running "as standard" distro settings

docker run \
-d \
--name jellyfin \
-p 8096:8096/tcp \
-e TZ=Europe/London \
-e PUID=100 \
-e PGID=510 \
-v /raid/docker/jellyfin/config:/config \
-v /raid/Media/Movies:/data/movies \
-v /raid/Media/TV:/data/tvshows \
--device=/dev/dri:/dev/dri \
--restart unless-stopped \
  lscr.io/linuxserver/jellyfin:latest
Unable to find image 'lscr.io/linuxserver/jellyfin:latest' locally
latest: Pulling from linuxserver/jellyfin
dce296fdf90b: Pull complete 
c36572129e15: Pull complete 
76035646946a: Pull complete 
d83d5aef6ef7: Pull complete 
af725a6b263c: Pull complete 
a63cefe8779f: Pull complete 
8f794a9b44b6: Pull complete 
d02065bebc2c: Pull complete 
Digest: sha256:057eb6ceb2737027e7379bff5a788071911015928356425e9e020b73b9331a51
Status: Downloaded newer image for lscr.io/linuxserver/jellyfin:latest
5680af7a7283f3686d185829c7e84a0811ed69237c9473e839e7cfa8e8715184
docker logs jellyfin
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Jellyfin: https://opencollective.com/jellyfin

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    100
User GID:    65534
───────────────────────────────────

GID is still 65534, which is "nobody" on the standard Alpine OS install

# grep 65534 /etc/group
nobody:x:65534:

As you note, the jellyfin container is Ubuntu based and my host OS is Alpine based.

Conversely, any Alpine based linuxserver container I run does seem to pick up and respect -e PGID correctly from the Alpine host OS.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI LinuxServer-CI closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Apr 28, 2024
Copy link

This issue is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

4 participants