When attempting to send emails using the watcher service, an SMTP error is generated saying that the Client was not authenticated to send anonymous mail and fails. I am trying to send email from our relay service with no SSL or any authentication.
Stack Trace:
[2019-03-27T20:52:43,572][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [sptesingst-wc-01] publish_address {Redacted IP}, bound_addresses {Redacted IP}
[2019-03-27T20:52:43,572][INFO ][o.e.n.Node ] [Redacted Host Name] started
[2019-03-27T20:53:22,013][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [Redacted Host Name] failed to execute action [inlined/email_1]
javax.mail.MessagingException: failed to send email with subject [Watch [test] has exceeded the threshold] via account [outlook_account]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:154) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:146) ~[?:?]
at org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction.execute(ExecutableEmailAction.java:72) ~[?:?]
at org.elasticsearch.xpack.core.watcher.actions.ActionWrapper.execute(ActionWrapper.java:144) [x-pack-core-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:455) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:295) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:154) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.5.4.jar:6.5.4]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_121]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_121]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) [elasticsearch-6.5.4.jar:6.5.4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_121]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358) ~[?:?]
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823) ~[?:?]
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.send(Account.java:141) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:152) ~[?:?]
... 13 more
This means, that your authentication data was not allowing you to send emails.
Can you provide a gist/pastebin of your YAML configuration, maybe this is just an indentation issue. It is hard to tell due to the YAML not being formatted properly.
I performed the steps you suggested and restarted the elasticsearch service, however we are still seeing errors:
[2019-04-09T21:12:36,681][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [sptesingst-wc-01] publish_address {10.124.5.90:9200}, bound_addresses {10.124.5.90:9200}
[2019-04-09T21:12:36,681][INFO ][o.e.n.Node ] [sptesingst-wc-01] started
[2019-04-09T21:13:04,220][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [sptesingst-wc-01] failed to execute action [inlined/email_1]
javax.mail.MessagingException: failed to send email with subject [Watch [bat] has exceeded the threshold] via account [outlook_account]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:154) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:146) ~[?:?]
at org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction.execute(ExecutableEmailAction.java:72) ~[?:?]
at org.elasticsearch.xpack.core.watcher.actions.ActionWrapper.execute(ActionWrapper.java:144) [x-pack-core-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:455) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:295) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:154) [x-pack-watcher-6.5.4.jar:6.5.4]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.5.4.jar:6.5.4]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_121]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_121]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) [elasticsearch-6.5.4.jar:6.5.4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_121]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358) ~[?:?]
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823) ~[?:?]
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.send(Account.java:141) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:152) ~[?:?]
have you explicitely removed the other options from the YAML file or set them to null, if you are using the cluser update settings API? Otherwise those settings might still be set.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.