Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to setting ambari to sending alert email via aws ses service

avatar
Expert Contributor

Is there any guide or docs to refer for this purpose? Thanks in advance.

1 ACCEPTED SOLUTION

avatar
@henryon wen

Setting "mail.smtp.ssl.enable : true" in ambari SMTP configurations should help in resolving your issue.

View solution in original post

4 REPLIES 4

avatar
Expert Contributor

I use ambari 2.2.1 and ambari 2.0.1.

avatar
Contributor

Hi @henryon wen, I would follow these instructions for setting up email alerts in Ambari via SMTP:

http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Ambari_Users_Guide/content/_configuring_n...

And follow Amazon's SES instructions for sending email through their SMTP interface:

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html

I haven't tried this yet, but it seems straightforward. Please let me know if it works.

avatar
Expert Contributor

@Henry Sowell Thanks for your reply. but it seems failed.

Logs:######

18 Jul 2016 08:54:59,016 ERROR [alert-dispatch-28] EmailDispatcher:172 - Unable to dispatch notification via Email javax.mail.MessagingException: Could not connect to SMTP host: email-smtp.*****.amazonaws.com, port: 465, response: -1 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2041) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697) at javax.mail.Service.connect(Service.java:386) at javax.mail.Service.connect(Service.java:245) at javax.mail.Service.connect(Service.java:194) at javax.mail.Transport.send0(Transport.java:253) at javax.mail.Transport.send(Transport.java:124) at org.apache.ambari.server.notifications.dispatchers.EmailDispatcher.dispatch(EmailDispatcher.java:160) at org.apache.ambari.server.notifications.DispatchRunnable.run(DispatchRunnable.java:58) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 18 Jul 2016 08:55:58,789 INFO [AlertNoticeDispatchService] AlertNoticeDispatchService:279 - There are 1 pending alert notices about to be dispatched... 18 Jul 2016 08:55:58,792 INFO [alert-dispatch-28] EmailDispatcher:94 - Sending email: Notification{ type=ALERT, subject=Alert Summary: OK[1], Warning[0], Critical[0], Unknown[0]} 18 Jul 2016 08:56:59,403 ERROR [alert-dispatch-28] EmailDispatcher:172 - Unable to dispatch notification via Email javax.mail.MessagingException: Could not connect to SMTP host: email-smtp.****.amazonaws.com, port: 465, response: -1 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2041) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697) at javax.mail.Service.connect(Service.java:386) at javax.mail.Service.connect(Service.java:245) at javax.mail.Service.connect(Service.java:194) at javax.mail.Transport.send0(Transport.java:253) at javax.mail.Transport.send(Transport.java:124) at org.apache.ambari.server.notifications.dispatchers.EmailDispatcher.dispatch(EmailDispatcher.java:160) at org.apache.ambari.server.notifications.DispatchRunnable.run(DispatchRunnable.java:58) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

avatar
@henryon wen

Setting "mail.smtp.ssl.enable : true" in ambari SMTP configurations should help in resolving your issue.