java.lang.IllegalArgumentException: no accounts of type [email] configured. Please set up an account using the [] settings

I followed Email Action | X-Pack for the Elastic Stack [6.2] | Elastic, yet keep getting following error:

esd4 | [2018-03-13T19:24:15,542][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [esd4] failed to execute action [WDuSnqbkQbinQ5vLtLpqag_elasticsearch_cluster_status/send_email_to_admin]
esd4 | java.lang.IllegalArgumentException: no accounts of type [email] configured. Please set up an account using the [] settings

my email account settings are:

Please advise.

Configured the gmail account set up in elasticsearch.yml and allowed 2 step verification for it.

            auth: true
            starttls.enable: true
            port: 587
            password: xxxxxx

This config worked for me on 6.2 and I do receive emails via watcher email action. Can you please verify your config?


Common sources of mistakes here:

First, is this configuration of all of your nodes.
Second, did you restart all your nodes after applying this change?

If you do not fancy restarts and do not want to store these settings in the yaml file, you can also use the cluster update settings API to add a new email account. This also has the advantage, that it gets distributed to all nodes without you having to do anything.

I saw following in logs:

esd4             | [2018-03-16T18:29:58,318][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [esd4] failed to execute action [WDuSnqbkQbinQ5vLtLpqag_elasticsearch_nodes/send_email_to_admin]
esd4             | javax.mail.MessagingException: failed to send email with subject [X-Pack Monitoring: Nodes Changed (WDuSnqbkQbinQ5vLtLpqag)] via account [gmail_account]
esd4             | 	at ~[?:?]
esd4             | 	at ~[?:?]
esd4             | 	at ~[?:?]
esd4             | 	at org.elasticsearch.xpack.core.watcher.actions.ActionWrapper.execute( ~[x-pack-core-6.2.2.jar:6.2.2]
esd4             | 	at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner( ~[x-pack-watcher-6.2.2.jar:6.2.2]
esd4             | 	at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute( ~[x-pack-watcher-6.2.2.jar:6.2.2]
esd4             | 	at org.elasticsearch.xpack.watcher.execution.ExecutionService.lambda$executeAsync$7( ~[x-pack-watcher-6.2.2.jar:6.2.2]
esd4             | 	at org.elasticsearch.xpack.watcher.execution.ExecutionService$ [x-pack-watcher-6.2.2.jar:6.2.2]
esd4             | 	at org.elasticsearch.common.util.concurrent.ThreadContext$ [elasticsearch-6.2.2.jar:6.2.2]
esd4             | 	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_161]
esd4             | 	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_161]
esd4             | 	at [?:1.8.0_161]
esd4             | Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14 <
esd4             | 534-5.7.14 NsungKoIYLSu6BRWb1zr4FZU9tzbKYSqiPZPznda9k_KbJc5OfPs5UMvB3QIIXaBrR-oYf
esd4             | 534-5.7.14 1qI-VtUumWZkZlZYAwnEu2_oLgTAN_1BaiNwm5apFh4lYIOluOe79ZsAsNpbWoWNBAMa13
esd4             | 534-5.7.14 YnaJ5mMwCNSaA8G6WXWddyCLOWJlWPBC_5IwYj5MVTKQ9R4ALmv6ezbooFlsqTMGjV4Nbn
esd4             | 534-5.7.14 n5rs5SKh-2m7Fv-on7S9MlAyYaLRU> Please log in via your web browser and
esd4             | 534-5.7.14 then try again.
esd4             | 534-5.7.14  Learn more at
esd4             | 534 5.7.14 x10sm844763ual.46 - gsmtp
esd4             | 
esd4             | 	at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate( ~[?:?]
esd4             | 	at com.sun.mail.smtp.SMTPTransport.authenticate( ~[?:?]
esd4             | 	at com.sun.mail.smtp.SMTPTransport.protocolConnect( ~[?:?]
esd4             | 	at javax.mail.Service.connect( ~[?:?]
esd4             | 	at$executeConnect$2( ~[?:?]
esd4             | 	at Method) ~[?:1.8.0_161]
esd4             | 	at ~[?:?]
esd4             | 	at ~[?:?]
esd4             | 	at ~[?:?]
esd4             | 	... 11 more

So this means that your accounts are setup properly in x-pack. This message comes from google and also contains a link that explains the steps you need to do in order to set up this up properly on the google side.

Is there a way to figure out which node(s) is/are miss-configured? As when I try to create new watch via Kibana, under action I see grey out message:

Disabled. Configure elasticsearch.yml

you might want to check the node kibana connects to first in this case.

ha! you were right, I did all nodes, but coordinate node and now that I update it, it shows up as it should)


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.