linuxserver / docker-calibre

GNU General Public License v3.0
338 stars 62 forks source link

Docker container fails to start for any release after 6.4.0 #105

Closed sjthespian closed 1 year ago

sjthespian commented 1 year ago

linuxserver.io


Expected Behavior

Docker container should run with no errors in the log

Current Behavior

The container fails to start completely and the log is full of messages like the following:

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

Steps to Reproduce

  1. Pull ghcr.io/linuxserver/calibre:latest
  2. Start the container with a docker-compose block like the following:
    calibre:
    image: ghcr.io/linuxserver/calibre
    labels:
    - "com.centurylinklabs.watchtower.scope=plex"
    container_name: calibre
    networks:
    - plex
    environment:
    - UMASK_SET=002
    - TZ=America/Los_Angeles
    - DOCKER_MODS=linuxserver/mods:universal-package-install
    - INSTALL_PACKAGES=unzip|libui-dialog-perl|libterm-readline-gnu-perl
    ports:
    - 8082:8080/tcp
    - 8083:8081/tcp
    restart: unless-stopped

Environment

OS: 20.04.5 LTS (Focal Fossa) CPU architecture: x86_64 How docker service was installed: Official repo

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

  calibre:
    image: ghcr.io/linuxserver/calibre:6.4.0
    labels:
    - "com.centurylinklabs.watchtower.scope=plex"
    container_name: calibre
    networks:
    - plex
    environment:
    - PUID=10761
    - PGID=10765
    - UMASK_SET=002
    - TZ=America/Los_Angeles
    - DOCKER_MODS=linuxserver/mods:universal-package-install
    - INSTALL_PACKAGES=unzip|libui-dialog-perl|libterm-readline-gnu-perl
    volumes:
    - /opt/plex/calibre:/config
    - /srv/media/books/Calibre:/books
    - /srv/media/downloads:/downloads
    ports:
    - 8082:8080/tcp
    - 8083:8081/tcp
    restart: unless-stopped

Docker logs

docker-calibre-logs.txt

j0nnymoe commented 1 year ago

Remove any readme.txt files within the old custom script folders in /config.

sjthespian commented 1 year ago

I see what the issue is, something in the latest version creates a "README.txt" in the config directories stating:

********************************************************
********************************************************
*                                                      *
*                         !!!!                         *
* 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.  *
*                                                      *
********************************************************
********************************************************

What's odd, is that as far as I can tell I don't have anything in any legacy locations. The only thing outside of the .local directory is a single script in custom-cont-init.d. Unless it is picking up on something in .local?

michaelarnauts commented 1 year ago

You need to add the following to your docker-compose file. See the readme in this repo.

    security_opt:
      - seccomp:unconfined #optional
sjthespian commented 1 year ago

I went through and cleaned up any stray files from my config dir, that seems to have fixed the creation of the README.txt file. Oddly enough, it also renamed my custom-cont-init.d directory to one with a random extension (custom-cont-init.d.0Vhg--w6 in this case), hopefully that doesn't mean it will eat that startup script if I ever stop/remove the container!

The security_opt mentioned by @michaelarnauts was also needed to avoid a different error on startup. It was throwing a dialog box Error launching startup command: Failed to close file descriptor for child process (Operation not permitted). This wasn't required in 6.4.0, am I just missing something from the release notes?

goosekrk commented 1 year ago

I'm trying to fix the same "Error launching startup command" on Unraid 6.10.3. It seems like I could just edit the container and where it says "CLI_ARGS", I just paste in:

--security-opt seccomp=unconfined #optional \

Or perhaps, I could add a variable called security_opt and give it a value of - seccomp:unconfined #optional.

Haven't managed to resolve the error with either approach so far, I'm assuming due to something silly I'm not doing right. Any advice?

AlmightyHeretic commented 1 year ago

I'm trying to fix the same "Error launching startup command" on Unraid 6.10.3. It seems like I could just edit the container and where it says "CLI_ARGS", I just paste in:

--security-opt seccomp=unconfined #optional \

Or perhaps, I could add a variable called security_opt and give it a value of - seccomp:unconfined #optional.

Haven't managed to resolve the error with either approach so far, I'm assuming due to something silly I'm not doing right. Any advice?

You have to tick Advanced View and then add the line under Extra Parameters, not CLI_ARGS.

arunoruto commented 1 year ago

--security-opt seccomp=unconfined #optional \

You have to tick Advanced View and then add the line under Extra Parameters, not CLI_ARGS.

This has solved the problem for me in Unraid`!

sjthespian commented 1 year ago

I am going to go ahead and close this since deleting the auto-generated README and adding the security-opt arg fixed this problem for me. However, these should probably be called out in the release notes and/or the README as breaking changes.