Hello Guys,
I'm trying out X-Pack's Watcher and I have stumbled upon an error for which I'm unable to find a resolution.
Here's the elasticsearch.yml snippet set for this purpose:
xpack.notification.email.account:
exchange_account:
profile: outlook
email_defaults:
from: elastic@company.com
smtp:
auth: false
starttls.enable: false
host: exchange.company.com
port: 25
As per their suggestion and experience for setting up other tools with similar capabilities (sending an automated email) they advised me to disable smtp auth and use port 25. This configuration is confirmed working with other software.
Please note that after enabling Trial License, haven't done any changes in my cluster settings, so I don't even have the Kibana security enabled yet.
Before i enabled watcher, i made sure that Elasticsearch is able to telnet exchange server using:
telnet exchange.company.com 25
Output:
Trying 10.10.10.10...
Connected to exchange.company.com.
Escape character is '^]'.
220 exchange.company.com Microsoft ESMTP MAIL Service ready at Thu, 9 May 2019 04:36:28 -0700
Here's the error i got when hitting test button in the watcher settings:
[2019-05-09T13:15:31,052][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [elastic] failed to execute action [_inlined_/email_1]
javax.mail.MessagingException: failed to send email with subject [Watch [Test] has exceeded the threshold] via account [exchange_account]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:153) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:145) ~[?:?]
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-7.0.0.jar:7.0.0]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:460) [x-pack-watcher-7.0.0.jar:7.0.0]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:299) [x-pack-watcher-7.0.0.jar:7.0.0]
at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:159) [x-pack-watcher-7.0.0.jar:7.0.0]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.0.0.jar:7.0.0]
at org.elasticsearch.xpack.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:549) [x-pack-watcher-7.0.0.jar:7.0.0]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:681) [elasticsearch-7.0.0.jar:7.0.0]
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:835) [?:?]
Caused by: javax.mail.AuthenticationFailedException: No authentication mechanisms supported by both server and client
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:880) ~[?:?]
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:780) ~[?:?]
at javax.mail.Service.connect(Service.java:366) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.lambda$executeConnect$2(Account.java:158) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:551) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.executeConnect(Account.java:157) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.Account.send(Account.java:116) ~[?:?]
at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:151) ~[?:?]
... 12 more
Caused by: javax.mail.AuthenticationFailedException: No authentication mechanisms supported by both server and client
I focused on this part, browsed various topics across different message boards and all of them focused on setting proper auth or actualy removing it for exchange servers with no smtp authentication. This is what i did but no luck.
I'd appreciate the suggestions.
Thanks.