Bleala / Vdirsyncer-DOCKERIZED

Vdirsyncer - sync calendars and addressbooks between servers and the local filesystem. DOCKERIZED!
31 stars 5 forks source link

Cronjob not starting - supercronic command executes with no arguments #13

Closed lloyd-dada closed 1 year ago

lloyd-dada commented 1 year ago

Issue with Version 2.4.4: (no problem in version 2.4.3) Hi, many thanks in advance, the documentation is excellent however I did find an issue that I could not solve: When I launch the docker container the supercronic process does not start (see the log output at below).

In start.sh I see that the command that should run is /usr/bin/supercronic "${LOG_LEVEL}" "${CRON_FILE}" but it looks like something is happening to the environment variables such that they are not being added as arguments to the command and so it looks like the command that is actually running is simply: /usr/bin/supercronic "" ""

When I open a shell into the running container I can see both variables are correctly assigned ($LOG_LEVEL="" as default):

abcdef123456:/vdirsyncer$ echo $LOG_LEVEL

abcdef123456:/vdirsyncer$ echo $CRON_FILE /etc/crontabs/vdirsyncer abcdef123456:/vdirsyncer$

I can launch supercronic from inside the running container with this command:

/usr/bin/supercronic $LOG_LEVEL $CRON_FILE

or from outside the container like this:

docker exec vdirsyncer /usr/bin/supercronic /etc/crontabs/vdirsyncer

Either will have the same effect of starting the supercronic process.

I hope that this is helpful for you to improve the project and that I have not made some other mistake and have now wasted your time.

Log output: [2023-07-13 13:41:04] Welcome to Vdirsyncer DOCKERIZED! :) [2023-07-13 13:41:04] [2023-07-13 13:41:04] For more information please visit the official docs page. [2023-07-13 13:41:04] There you will also find configuration examples. [2023-07-13 13:41:04] https://vdirsyncer.pimutils.org/en/stable/index.html [2023-07-13 13:41:04] [2023-07-13 13:41:04] If you have any problems with Vdirsyncer, please [2023-07-13 13:41:04] visit the Github repo and open an issue. [2023-07-13 13:41:04] https://github.com/pimutils/vdirsyncer [2023-07-13 13:41:04] [2023-07-13 13:41:04] If there is a problem with the container, [2023-07-13 13:41:04] contact me or open an issue in my Github repo. [2023-07-13 13:41:04] https://github.com/Bleala/Vdirsyncer-DOCKERIZED [2023-07-13 13:41:04] I am trying to fix it, so that everything [2023-07-13 13:41:04] is running as expected. :) [2023-07-13 13:41:04] [2023-07-13 13:41:04] Enjoy! [2023-07-13 13:41:04] [2023-07-13 13:41:04] Starting Logging... [2023-07-13 13:41:04] [2023-07-13 13:41:04] Old logfile has been deleted. [2023-07-13 13:41:04] [2023-07-13 13:41:04] New logfile has been created. [2023-07-13 13:41:04] [2023-07-13 13:41:04] Current timezone is Europe/Vienna [2023-07-13 13:41:04] Current time is Thu Jul 13 13:41:04 CEST 2023 [2023-07-13 13:41:04] [2023-07-13 13:41:04] Only Autosync is enabled. [2023-07-13 13:41:04] Usage: /usr/bin/supercronic [OPTIONS] CRONTAB [2023-07-13 13:41:04] [2023-07-13 13:41:04] Available options: [2023-07-13 13:41:04] -debug [2023-07-13 13:41:04] enable debug logging [2023-07-13 13:41:04] -json [2023-07-13 13:41:04] enable JSON logging [2023-07-13 13:41:04] -overlapping [2023-07-13 13:41:04] enable tasks overlapping [2023-07-13 13:41:04] -passthrough-logs [2023-07-13 13:41:04] passthrough logs from commands, do not wrap them in Supercronic logging [2023-07-13 13:41:04] -prometheus-listen-address string [2023-07-13 13:41:04] give a valid ip[:port] address to expose Prometheus metrics at /metrics (port defaults to 9746), use 0.0.0.0 for all network interfaces. [2023-07-13 13:41:04] -quiet [2023-07-13 13:41:04] do not log informational messages (takes precedence over debug) [2023-07-13 13:41:04] -sentry-dsn string [2023-07-13 13:41:04] enable Sentry error logging, using provided DSN [2023-07-13 13:41:04] -sentryDsn string [2023-07-13 13:41:04] alias for sentry-dsn [2023-07-13 13:41:04] -split-logs [2023-07-13 13:41:04] split log output into stdout/stderr [2023-07-13 13:41:04] -test [2023-07-13 13:41:04] test crontab (does not run jobs)

Bleala commented 1 year ago

Hey @lloyd-dada

thanks for this issue, I have to admit, that I did not test the image, if I don't set the LOG_LEVEL environment variable, because I always set it to --quiet, I'm sorry for this!

I already fixed this issue with version 2.4.5. Tested the image and changed the start.sh script a little bit, so it is no longer a problem, if the LOG_LEVEL environment variable is empty. Of course the other options for LOG_LEVEL are also working.

The image is still building while writing this comment, it should be on DockerHub and GHCR in about half an hour.

Greetings

lloyd-dada commented 1 year ago

Thanks!