linuxserver / docker-jellyfin

GNU General Public License v3.0
607 stars 91 forks source link

Docker tries to execute README.txt and fails to start #170

Closed lyz-code closed 1 year ago

lyz-code commented 1 year ago

linuxserver.io

Since release 10.8.4-1-ls178 our jellyfin docker doesn't start, it's hung up while trying to execute a README.txt file

s6-supervise custom-service-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-service-README.txt: warning: unable to spawn ./run - waiting 10 seconds

Expected Behavior

Current Behavior

The script /etc/cont-init.d/99-custom-scripts looks at the files in /config/custom-cont-init.d and it finds a README.txt file created by the linuxserver docker with the next content:

    ********************************************************
    ********************************************************
    *                                                      *
    *                         !!!!                         *
    * Custom scripts or services found in legacy locations *
    *                         !!!!                         *
    *    Please move your custom scripts and services      *
    *    to /custom-cont-init.d and /custom-services.d     *
    *    respectively to ensure they continue working.     *
    *                                                      *
    *  Visit https://linuxserver.io/custom for more info.  *
    *                                                      *
    ********************************************************
    ********************************************************

It then tries to execute it:

[custom-init] README.txt: executing...
/config/custom-cont-init.d/README.txt: line 1: data: command not found
/config/custom-cont-init.d/README.txt: line 2: data: command not found
/config/custom-cont-init.d/README.txt: line 3: data: command not found
/config/custom-cont-init.d/README.txt: line 4: data: command not found
/config/custom-cont-init.d/README.txt: line 5: data: command not found
/config/custom-cont-init.d/README.txt: line 6: data: command not found
/config/custom-cont-init.d/README.txt: line 7: data: command not found
/config/custom-cont-init.d/README.txt: line 8: data: command not found
/config/custom-cont-init.d/README.txt: line 9: data: command not found
/config/custom-cont-init.d/README.txt: line 10: data: command not found
/config/custom-cont-init.d/README.txt: line 11: data: command not found
/config/custom-cont-init.d/README.txt: line 12: data: command not found
/config/custom-cont-init.d/README.txt: line 13: data: command not found
/config/custom-cont-init.d/README.txt: line 14: data: command not found
[custom-init] README.txt: exited 127
[custom-init] service files found in /config/custom-services.d
[custom-init] README.txt: service detected, copying...
[custom-init] README.txt: copied
cont-init: info: /etc/cont-init.d/99-custom-scripts exited 0

...

s6-supervise custom-service-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-service-README.txt: warning: unable to spawn ./run - waiting 10 seconds

This error may not be new, but on version 10.8.4-1-ls177 and previous versions, this error didn't prevent the docker to start, on 10.8.4-1-ls178 it does.

Steps to Reproduce

  1. Run docker to create the basic directories /usr/bin/docker run --name=jellyfin-test -e PUID=1000 -e PGID=1000 -v /etc/localtime:/etc/localtime:ro -v /tmp/jellyfin/config:/config --device=/dev/dri:/dev/dri linuxserver/jellyfin:10.8.4-1-ls178 It works as expected
  2. Copy the conflicting README.txt file in config/custom-services.d
  3. Run the same command, and now it fails

Environment

OS: Ubuntu 20.04 CPU architecture: x86_64 How docker service was installed: From the official docker repo

Command used to create docker container (run/create/compose/screenshot)

/usr/bin/docker run --name=jellyfin-test -e PUID=1000 -e PGID=1000 -v /etc/localtime:/etc/localtime:ro -v /tmp/jellyfin/config:/config --device=/dev/dri:/dev/dri linuxserver/jellyfin:10.8.4-1-ls178

Docker logs

Can't provide full docker log because after removing both README.txt files the docker did start.

[custom-init] service files found in /config/custom-services.d
[custom-init] README.txt: service detected, copying...
[custom-init] README.txt: copied
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/01-migrations
[migrations] started
[migrations] no migrations found
cont-init: info: /etc/cont-init.d/01-migrations exited 0
cont-init: info: running /etc/cont-init.d/02-tamper-check
cont-init: info: /etc/cont-init.d/02-tamper-check exited 0
cont-init: info: running /etc/cont-init.d/10-adduser

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

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:    1000
User gid:    1000
-------------------------------------

cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/30-config
cont-init: info: /etc/cont-init.d/30-config exited 0
cont-init: info: running /etc/cont-init.d/40-gid-video
cont-init: info: /etc/cont-init.d/40-gid-video exited 0
cont-init: info: running /etc/cont-init.d/90-custom-folders
cont-init: info: /etc/cont-init.d/90-custom-folders exited 0
cont-init: info: running /etc/cont-init.d/99-custom-scripts
[custom-init] files found, executing
[custom-init] README.txt: executing...
/config/custom-cont-init.d/README.txt: line 1: data: command not found
/config/custom-cont-init.d/README.txt: line 2: data: command not found
/config/custom-cont-init.d/README.txt: line 3: data: command not found
/config/custom-cont-init.d/README.txt: line 4: data: command not found
/config/custom-cont-init.d/README.txt: line 5: data: command not found
/config/custom-cont-init.d/README.txt: line 6: data: command not found
/config/custom-cont-init.d/README.txt: line 7: data: command not found
/config/custom-cont-init.d/README.txt: line 8: data: command not found
/config/custom-cont-init.d/README.txt: line 9: data: command not found
/config/custom-cont-init.d/README.txt: line 10: data: command not found
/config/custom-cont-init.d/README.txt: line 11: data: command not found
/config/custom-cont-init.d/README.txt: line 12: data: command not found
/config/custom-cont-init.d/README.txt: line 13: data: command not found
/config/custom-cont-init.d/README.txt: line 14: data: command not found
[custom-init] README.txt: exited 127
    ********************************************************
    ********************************************************
    *                                                      *
    *                         !!!!                         *
    * Custom scripts or services found in legacy locations *
    *                         !!!!                         *
    *    Please move your custom scripts and services      *
    *    to /custom-cont-init.d and /custom-services.d     *
    *    respectively to ensure they continue working.     *
    *                                                      *
    *  Visit https://linuxserver.io/custom for more info.  *
    *                                                      *
    ********************************************************
    ********************************************************
cont-init: info: /etc/cont-init.d/99-custom-scripts exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service custom-svc-README.txt: starting
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

lyz-code commented 1 year ago

Removing both README.txt files from both directories fixes the issue

unqqunqq commented 1 year ago

Same problem here after updating to ls178. Can't seem to get around the problem so i temporarily use the nightly version. ls1000 starts up fine.

queeup commented 1 year ago

Same problem. It affected most of the containers.

nemchik commented 1 year ago

A new build has been pushed that should resolve the issue.