Closed flexibeast closed 3 years ago
Thank you for the report! Do you have new "unable to exec" messages in the log after restarting the service? Can you provide me with a minimal crontab that exhibit the issue?
Do you have new "unable to exec" messages in the log after restarting the service?
Yes, sorry, i should have been clearer: the messages continue to fill the log even after restarting the service.
Can you provide me with a minimal crontab that exhibit the issue?
Sure:
*/1 * * * * echo "output"
This results in:
unable to exec /usr/sbin/sendmail: cron output for user test echo "output" to /dev/null
Thanks, I will check it in my system. Please try using /dev/null
instead of executing /bin/true.
Using:
66-ns -d 3 -o unshare=pid dcrond -f -M /dev/null
continues to produce the "unable to exec" errors after restarting the service.
@flexibeast It seems to work here with:
@execute = ( 66-ns -d 3 -o unshare=pid dcrond -d -M /usr/bin/true )
I used the -d switch in dcron to produce full debugging output, it also works with -f.
tail -f /var/log/66/dcron/current
: https://termbin.com/fbvp
66-inservice dcron
: https://termbin.com/ogd0
Gah. *sigh* It still doesn't work for me when i use the exact @execute
line you posted. :-/ i certainly don't get debug output in the service log.
Just to confirm: you don't have sendmail
in /usr/sbin/
? i assume not, so i'm not sure what to do from here ....
I think I will try to adapt this: https://gist.github.com/x-yuri/ca46523a1c7a2a803c603bc426bb1b27 In order to have good output in the per-service logger.
@flexibeast The line in execute is just to stop the log spam... It will take more to direct the output of the commands in crontab to the logger.
Oh, well, at any rate, i'm still getting the "unable to exec" entries spamming the dcron service log. And also, i just checked whether it made any difference whether it was a user crontab (my personal crontab is the source of the spam in my case) or a root crontab. No: putting
*/1 * * * * echo "output"
in the root crontab also produces the "unable to exec" spam.
Ι tried to add an [environment] as the runit service has $OPTS and ended up with: https://termbin.com/njiw . The output from 66-inservice is: https://termbin.com/bpdl.
I stopped the running dcron service with 66-disable -S dcron
and enabled +started the new with 66-enable -S -F dcron
.
Fix merged in 73b33ba924e60798a0e74aaf8bf267372626dd5e.
My crontab runs certain commands every 5 minutes. However,
sendmail
is not present on the system, leading to the dcron service log mostly consisting of lines like:From reading the man page for dcrond(8), what i want is to use the
-M
option todcrond
so that no attempt to email is made (since the logging to stderr alone will suffice). Stopping thedcron
service and running:from the command line results in no more errors like the above. (And to confirm, running the same command without
-M /bin/true
does result in those errors.)However, changing the
@execute
line in the service file to:as a first step towards the
-M
option being configurable in an[environment]
section, does not seem to have any effect: the above errors still appear in the service log even after restarting thedcron
service with66-enable -F
. (And 66-inservice confirms that the above@execute
line is active.)Perhaps there's some namespacing issue here i'm not aware of (e.g. file descriptors)? Or is the issue something else entirely?