Summary: | Vixie Cron job fails with no output or email | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | David Zuzga <dzuzga> |
Component: | [OLD] Core system | Assignee: | Net-Mail Packages <net-mail+disabled> |
Status: | RESOLVED WONTFIX | ||
Severity: | major | ||
Priority: | High | ||
Version: | 2005.1 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
David Zuzga
2005-09-01 14:40:35 UTC
I think I may have some more info on this bug. It may be related to ssmtp timing out while waiting for the script to complete. I've looked through a bit of the ssmtp code, and it appears to have a MAXWAIT constant that is set to 10 minutes per command line. I'm not sure what happens when it hits this MAXWAIT though. Can anyone enlighten me? Is there any workaround for this? More info: If I make the find command that executes lame, output a line for each file, the script finishes successfully. This leads me to think that it is not a problem with cron, but with ssmtp timing out. Here's what I changed the find command to: find /home/mg/MGC/${sd} -name '*.wav' -type f -exec bash -c 'echo {} ; lame {} `dirname {}`/`basename {} .wav`.mp3 -h -b16 --silent' \; Just the "echo {}" in this line made everything work OK. Now that I know what the problem is, I would like to get around printing one line for each file processed since there are upwards of 3000 files I'm processing. So in conclusion, this probably isn't a cron problem but a ssmtp problem. re-assigning to ssmtp maintainers This is how ssmtp works: * Parses the command-line and sets some vars * Opens the network connection to the server and sends the greeting, thus starting the smtp session. * Then sends the MAIL FROM and RCPT TO commands and writes a 'Received by:' header. * Now starts reading from stdin and writing to the socket here it sets an alarm for 5 minutes. This means that if there is no input in 5 minutes then it emits SIGALRM and dies. I don't know if vixie-cron should call ssmtp BEFORE having the whole output of the command; I'd say NO. But it does, so you have some workarounds: 1) Use another mail client (there are several in the tree) 2) Maybe do 'echo -n .' everytime a file is proccessed thus making ssmtp happy and not bloating your report a lot. Sorry but this is a ->WONTFIX. Cheers, Ferdy |