Issue with setting up email configuration with Watcher

I am trying Watcher Beta 2 and trying to setup email account which can be used to send email notifications. For that I have selected gmail profile, and have added following things in elasticsearch.yml

watcher.actions.email.service.account:
profile: gmail
gmail:
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user:
password:
But as soon as I do this and start my cluster again, I see one error and cluster does not get started.

Here is what I get in logs

E:\es\elasticsearch-1.5.2\elasticsearch-1.5.2\bin>elasticsearch
[2015-06-11 10:39:59,166][INFO ][node ] [Bes] version[1.5.2]
, pid[4892], build[62ff986/2015-04-27T09:21:06Z]
[2015-06-11 10:39:59,168][INFO ][node ] [Bes] initializing .
..
[2015-06-11 10:39:59,277][INFO ][plugins ] [Bes] loaded [watche
r, license], sites [head]
[2015-06-11 10:39:59,367][INFO ][watcher.trigger.schedule ] [Bes] using [ticker]
schedule trigger engine
[2015-06-11 10:40:05,205][INFO ][node ] [Bes] initialized
[2015-06-11 10:40:05,325][INFO ][node ] [Bes] starting ...
{1.5.2}: Startup Failed ...

  • EmailSettingsException[missing required email account setting for account [pro
    file]. 'smtp.host' must be configured]
    Exception in thread "Thread-1" java.lang.NullPointerException
    at org.elasticsearch.cluster.action.index.MappingUpdatedAction.stop(Mapp
    ingUpdatedAction.java:108)
    at org.elasticsearch.node.internal.InternalNode.stop(InternalNode.java:2
  1. at org.elasticsearch.node.internal.InternalNode.close(InternalNode.java:
    
  2. at org.elasticsearch.bootstrap.Bootstrap$1.run(Bootstrap.java:75)

Can someone help me with this ?

Hi Tanmay,

The profile needs to go under the account:

watcher.actions.email.service.account:
    gmail:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: xxxxxx
            password: yyyyyy

Thanks. The error is gone.