Emails from Azkaban

1,520 views
Skip to first unread message

Appan

unread,
Feb 1, 2011, 2:05:44 PM2/1/11
to azkaban
Hi,

We use Azkaban-0.40 @ngmoco on EC2 and I have trouble getting Azkaban
to send emails on success or failures. Here is the list of things I
tried.

1. I am able to send emails from the EC2 instance using mail command
and my postfix configurations are correct.

2. I created a simple job with the following properties

command echo hi
retries 1
retry.backoff 30000
type command
success.emails=<my work email>
failure.emails=<my work email>

3. When I run the job it runs successfully but the email won't go out.

4. I also modified the properties file which is "azkaban.properties"
file and this file is on the jobs directory. It has mail.host=<my ec2
relay host which is allowed to relay emails by amazon>. I left
mail.user & mail.password fields blank.

5. Here is the error I get from Azkaban ([Mailman] [Job-Control] Error
while sending email: No recipient addresses). Any help is appreciated.

2011/02/01 13:53:14.445 INFO [Scheduler] [Job-Control] Scheduling job
'foobar' for 02-01-2011 13:53:14:444
2011/02/01 13:53:15.080 INFO [foobar] [Job-Control] 1 commands to
execute.
Temp file created /root/ngpipes-scheduler/
foobar_8140391830573699739_tmp
2011/02/01 13:53:15.082 INFO [foobar] [Job-Control] Executing command:
echo hi
2011/02/01 13:53:15.209 INFO [foobar] [Job-Control] hi
2011/02/01 13:53:15.397 WARN [Mailman] [Job-Control] Error while
sending email: No recipient addresses

Thanks,
Appan

Richard Park

unread,
Feb 1, 2011, 2:48:23 PM2/1/11
to azkab...@googlegroups.com
Filing a bug against this. Azkaban jobs only pick up the success email or the fail email parameters if they're in a .properties file in the base job directory. This seems convoluted and wrong.

Meanwhile, try using the variable notify.emails=ema...@email.com,ema...@email.com to send out messages regardless of failures and successes.

Appan Thirumaligai

unread,
Feb 1, 2011, 3:36:48 PM2/1/11
to azkab...@googlegroups.com
Thanks for your quick response. I started getting emails when I set notify.emails=<my email> in the properties file.

Even in the properties file if I just set failure.emails or success.emails it doesn't work. The only option that works is notify.email.

I want to get emails sent out only for failures and looks like thats not working correctly.

I'll try the latest version (0.10) and see what happens.

Thanks,
Appan

Richard Park

unread,
Feb 1, 2011, 3:49:56 PM2/1/11
to azkab...@googlegroups.com
I thought I changed the docs for it, but the params are actually:
job.failure.email and job.success.email.

Appan Thirumaligai

unread,
Feb 1, 2011, 4:19:11 PM2/1/11
to azkab...@googlegroups.com
Thanks Much again. Yes the jobs.* parameters work.

I found the ones I used from this slideshare presentation by Vikram - http://www.slideshare.net/voberoi/hadoop-at-meebo-lessons-in-the-real-world

Appan Thirumaligai

unread,
Feb 1, 2011, 5:08:14 PM2/1/11
to azkab...@googlegroups.com
I found two more issues. Here is a list of them.

1) I tried setting only one of them (failure / success) and it doesn't work. You have to specify both properties for the emails to go out.

2) When I specify two different emails for success & failure the emails don't go to the respective addresses.The code picks the success.email for both. Please see the code snippets below. It just needs to be switched.

        this._scheduler = new Scheduler(_jobManager,

                                         _allFlows,

                                         _mailer,

                                         failureEmail,

                                         successEmail,

                                         _baseClassLoader,

                                         schedule,

                                         backup,

                                         schedulerThreads);



     public Scheduler(JobManager jobManager,

                      FlowManager allKnownFlows,

                      Mailman mailman,

                      String jobSuccessEmail,

                      String jobFailureEmail,

                      ClassLoader classLoader,

                      File scheduleFile,

                      File backupScheduleFile,

                      int numThreads)

Appan Thirumaligai

unread,
Feb 1, 2011, 5:29:50 PM2/1/11
to azkab...@googlegroups.com
One correction below.

On Tue, Feb 1, 2011 at 2:08 PM, Appan Thirumaligai <aol.a...@gmail.com> wrote:
I found two more issues. Here is a list of them.

1) I tried setting only one of them (failure / success) and it doesn't work. You have to specify both properties for the emails to go out.

2) When I specify two different emails for success & failure the emails don't go to the respective addresses.The code picks the opposite (success for failure & failure for success). Please see the code snippets below. It just needs to be switched.

Richard Park

unread,
Feb 1, 2011, 5:38:10 PM2/1/11
to azkab...@googlegroups.com
Thanks. Can you submit bugs on them on Azkaban jira?

Also, if you have the chance, please try out the newer Azkaban so we know we're not dealing with older bugs.

Appan Thirumaligai

unread,
Feb 1, 2011, 5:45:42 PM2/1/11
to azkab...@googlegroups.com
I'll file a JIRA for this. I also pulled the code for 0.10 and its a bug there too.

     public JobExecutorManager(

             FlowManager allKnownFlows,

             JobManager jobManager,

             Mailman mailman,

             String jobSuccessEmail,

             String jobFailureEmail,

             int maxThreads

     ) {


        _jobExecutorManager = new JobExecutorManager(

                                 _allFlows,

                                 _jobManager,

                                 _mailer,

                                 failureEmail,

                                 successEmail,

                                 schedulerThreads

                             );

Appan Thirumaligai

unread,
Feb 1, 2011, 5:54:59 PM2/1/11
to azkab...@googlegroups.com

Ryan Carlson

unread,
Sep 9, 2013, 2:55:54 PM9/9/13
to azkab...@googlegroups.com
Is this still an issue?  

I have attempted to set the following properties in the azkaban.properties file for my Azkaban web server.  I received no emails on either success or failure.  These properties appear to be ignored and no errors noticed in the logs.

job.failure.email=mye...@email.com
job.success.email=mye...@email.com

I was able to get emails successfully by adding the property to my project specific properties file uploaded as part of the .zip.

Ryan

yu.ch...@gmail.com

unread,
Sep 9, 2013, 3:02:14 PM9/9/13
to azkab...@googlegroups.com
Those people were discussing azkaban1. I suppose you started out with azkaban2.
azkaban is supposed to be used by multiple people.
in the properties file for azkaban (in conf/azkaban.properties), you set user name password, etc, that is needed to talk to your email server to send out emails.
in the project/job properties files, you set which email address to send to on failure/success of specific job/flows.
Reply all
Reply to author
Forward
0 new messages