0
I am new to ElasticSearch. My email configurations are working in Windows but same config fails on MAC (Or Ubuntu).
My ElasticSearch.yml:
xpack.license.self_generated.type: basic
xpack.security.enabled: false
xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: <USER_NAME>@gmail.com
Following documentations from : https://www.elastic.co/guide/en/elastic-stack-overview/current/actions-email.html#configuring-email
There is no firewall on my MAC. I welcome any suggestions.
Error logs:
[2019-04-07T13:37:17,019][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [Cvja-AM] failed to execute action [inlined/email_1] javax.mail.MessagingException: failed to send email with subject [Test] via account [gmail_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.7.0.jar:6.7.0] at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:456) [x-pack-watcher-6.7.0.jar:6.7.0] at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:295) [x-pack-watcher-6.7.0.jar:6.7.0] at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:164)
...
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 587; timeout 120000 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2209) ~[?:?] at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740) ~[?:?] at javax.mail.Service.connect(Service.java:366) ~[?:?]