Cant send mail alert through watcher

Hi,

When I testing my mail alert using watcher it is showing an error that mail send failed.

In my cluster log file I saw below given line. Can anyoone help.

][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [elk-master] failed to execute action [inlined/email_1]
javax.mail.MessagingException: failed to send email with subject [Watch [filebeat] has exceeded the threshold] via account [gmail_account]

Full error message

[2020-04-21T15:43:55,727][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [elk-master] failed to execute action [inlined/email_1]
javax.mail.MessagingException: failed to send email with subject [Watch [filebeat] has exceeded the threshold] via account [gmail_account]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:171) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:163) ~[?:?]
at org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction.execute(ExecutableEmailAction.java:76) ~[?:?]
at org.elasticsearch.xpack.core.watcher.actions.ActionWrapper.execute(ActionWrapper.java:164) [x-pack-core-7.6.2.jar:7.6.2]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:534) [x-pack-watcher-7.6.2.jar:7.6.2]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:320) [x-pack-watcher-7.6.2.jar:7.6.2]
at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:159) [x-pack-watcher-7.6.2.jar:7.6.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.6.2.jar:7.6.2]
at org.elasticsearch.xpack.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:627) [x-pack-watcher-7.6.2.jar:7.6.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) [elasticsearch-7.6.2.jar:7.6.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:830) [?:?]
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at javax.mail.Service.connect(Service.java:376) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.lambda$executeConnect$2(Account.java:161) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:554) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.executeConnect(Account.java:160) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.send(Account.java:119) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:169) ~[?:?]
... 12 more

elasticseacrh.yml entry

xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user:

Ketstore value addes using this command,

sudo /usr/share/elasticsearch/bin/elasticsearch-keystore add xpack.notification.email.account.my-gmail-user-id.smtp.secure_password

Isnt anyone here who can help?...

That would appear to be why, you may want to check your config.

Same issue here....Warklom, doesn't running the keystore command specify the password?

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