Lychee-Docker icon indicating copy to clipboard operation
Lychee-Docker copied to clipboard

Docker container does not start anymore, cron: unrecognized service

Open alexwild opened this issue 3 years ago • 5 comments

Hi, with the latest v4.5.3 release if have the issue that the container does not start anymore. My container log looks like this:

lychee_1    | -------------------------------------
lychee_1    | Lychee Version: 4.5.3 (release)
lychee_1    | Lychee Commit:  fe173e4
lychee_1    | https://github.com/LycheeOrg/Lychee/commit/fe173e4b77ee81a204e0ca6064f37403ab03cec2
lychee_1    | -------------------------------------
lychee_1    | **** Make sure the /conf and /uploads folders exist ****
lychee_1    | **** Create the symbolic link for the /uploads folder ****
lychee_1    | **** Create the symbolic link for the /sym folder ****
lychee_1    | **** Create the symbolic link to the old Lychee-Laravel folder ****
lychee_1    | **** Copy the .env to /conf ****
lychee_1    | **** Inject .env values ****
lychee_1    | **** Check user.css exists and symlink it ****
lychee_1    | **** Create user and use PUID/PGID ****
lychee_1    |   User UID :      1000
lychee_1    |   User GID :      1000
lychee_1    | **** Set Permissions ****
lychee_1    | **** Start cron daemon ****
lychee_1    | cron: unrecognized service
lychee_1    |
lychee_1    | -------------------------------------
lychee_1    |   _               _
lychee_1    |  | |   _   _  ___| |__   ___  ___
lychee_1    |  | |  | | | |/ __|  _ \ / _ \/ _ \
lychee_1    |  | |__| |_| | (__| | | |  __/  __/
lychee_1    |  |_____\__, |\___|_| |_|\___|\___|
lychee_1    |  | |   |___/ _ __ __ ___   _____| |
lychee_1    |  | |   / _' | '__/ _' \ \ / / _ \ |
lychee_1    |  | |__| (_| | | | (_| |\ V /  __/ |
lychee_1    |  |_____\__,_|_|  \__,_| \_/ \___|_|
lychee_1    |
lychee_1    | -------------------------------------
lychee_1    | Lychee Version: 4.5.3 (release)
lychee_1    | Lychee Commit:  fe173e4
lychee_1    | https://github.com/LycheeOrg/Lychee/commit/fe173e4b77ee81a204e0ca6064f37403ab03cec2
lychee_1    | -------------------------------------
lychee_1    | **** Make sure the /conf and /uploads folders exist ****
lychee_1    | **** Create the symbolic link for the /uploads folder ****
lychee_1    | **** Create the symbolic link for the /sym folder ****
lychee_1    | **** Create the symbolic link to the old Lychee-Laravel folder ****
lychee_1    | **** Copy the .env to /conf ****
lychee_1    | **** Inject .env values ****
lychee_1    | **** Check user.css exists and symlink it ****
lychee_1    | **** Create user and use PUID/PGID ****
lychee_1    |   User UID :      1000
lychee_1    |   User GID :      1000
lychee_1    | **** Set Permissions ****
lychee_1    | **** Start cron daemon ****
lychee_1    | cron: unrecognized service

The container is now in a restart loop, repeating the entry in the log over and over again.

alexwild avatar Aug 16 '22 07:08 alexwild

Hi. Which architecture are you using? I can't replicate this on amd64.

d7415 avatar Aug 16 '22 14:08 d7415

I have tested the installation now on three different systems. My main server (still) runs on Debian buster (Linux nodename 4.19.0-21-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux) On a second system, which runs on Debian bullseye (Linux nodename 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux) their the container seems to run fine. Finally I tested a fresh Debian buster (Linux nodename 4.19.0-21-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux) installation in a vm, and this system has the same issues with the container.

alexwild avatar Aug 16 '22 17:08 alexwild

That's very odd that the presence of cron in the container is apparently dependent on the host OS.

I'll see if I can think of anything - a cursory search didn't show up anything - but I'm not hugely hopeful.

One possible option would be to stop a failed crond from failing the container (e.g. appending || true to the start line). This isn't ideal though, and I'd rather understand why before adding workarounds.

d7415 avatar Aug 16 '22 20:08 d7415

It might not be the host OS, but the hosts kernel, as this used by the container. For debian buster it is still Linux 4.19 and for debian bullseye it is Linux 5.10. I also noticed something even more strange when I tried to build the docker image locally, because this possible either. When I start directly a container and bypass the entrypoint and try to update the system this happens (this is also what happened when I tried to build the image):

> docker run --rm -it --entrypoint /bin/bash lycheeorg/lychee:latest
root@5c53e04fc5fe:/var/www/html/Lychee# apt update
Get:1 http://deb.debian.org/debian bookworm InRelease [157 kB]
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [49.6 kB]
Err:1 http://deb.debian.org/debian bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
Err:2 http://deb.debian.org/debian-security bookworm-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: GPG error: http://deb.debian.org/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian-security/dists/bookworm-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: GPG error: http://deb.debian.org/debian-security bookworm-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
E: The repository 'http://deb.debian.org/debian-security bookworm-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-security-automatic.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://deb.debian.org/debian/dists/bookworm-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: GPG error: http://deb.debian.org/debian bookworm-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
E: The repository 'http://deb.debian.org/debian bookworm-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

But for the Linux 5.10 system it runs fine

> docker run --rm -it --entrypoint /bin/bash lycheeorg/lychee:latest
root@ec09cc7cd416:/var/www/html/Lychee# apt update
Get:1 http://deb.debian.org/debian bookworm InRelease [157 kB]
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [49.6 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8445 kB]
Fetched 8700 kB in 6s (1453 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
25 packages can be upgraded. Run 'apt list --upgradable' to see them.

alexwild avatar Aug 16 '22 20:08 alexwild

Like I suspected, I could solve the issue for me by just upgrading my main server from debian buster to debian bullseye.

alexwild avatar Aug 17 '22 06:08 alexwild

Those apt errors are even weirder... I'd like to know why, but for now I'm glad the upgrade solved it. At least we're still supporting stable and are only leaving oldstable behind for whatever reason.

Thanks for the update!

d7415 avatar Aug 17 '22 18:08 d7415