[GE users] echo "blah" | mail -s "test" me at my.address not working in qsub'd jobs

reuti reuti at staff.uni-marburg.de
Tue Aug 17 16:40:27 BST 2010


Hi,

Am 17.08.2010 um 17:03 schrieb griznog:

> I have a job script, simplified to:
> 
> 
> #!/bin/bash
> set -x
> echo "Testing mail."
> echo "Test" | mail -s Testing jbh at broadinstitute.org
> echo $?
> echo "Done."

the `mail` command will fork the actual send-mail process to do it in the background. As the job exits really fast, it will be killed when the job exits - hence a `sleep 15` or alike should help.

-- Reuti


> 
> When I run that directly on a node, either ssh directly to the node,
> qrsh (which is configured to ssh), or qlogin, then the script works,
> mail is sent correctly and /var/log/maillog gets a lot of chatter
> about it.
> 
> But, if I qsub this script I do not get any mail and nothing is logged
> to /var/log/maillog even though the exit status of the mail command is
> 0 as if it were successful. Does anyone know where that mail is going?
> Example script run is:
> 
> jbh at tin ~ $ qsub -b y -l hostname=node290 /home/radon01/jbh/testmail.sh
> Your job 27 ("testmail.sh") has been submitted
> jbh at tin ~ $ cat testmail.sh.*27
> + echo 'Testing mail.'
> + mail -s Testing jbh at broadinstitute.org
> + echo Test
> + echo 0
> + echo Done.
> Testing mail.
> 0
> Done.
> 
> Any pointers on how to troubleshoot this would be appreciated. I'm
> pretty stumped as to why sendmail never sees anything when this runs
> as a qsub'd job.
> 
> 
> Thanks,
> 
> jbh
> 
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=274940
> 
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=274949

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list