<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  &amp;quot;telnet smtp.gmail.com 587&amp;quot; is getting connected. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218986#M64006</link>
    <description>&lt;P&gt;have already set mail.smtp.ssl.enable= true&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2017 07:46:36 GMT</pubDate>
    <dc:creator>mohitvarshney</dc:creator>
    <dc:date>2017-06-30T07:46:36Z</dc:date>
    <item>
      <title>Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218985#M64005</link>
      <description>&lt;P&gt;
	

30 Jun 2017 06:03:26,478 ERROR [alert-dispatch-1] EmailDispatcher:172 - Unable to dispatch notification via Email
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
  nested exception is:
        javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2055)
        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)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
        at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
        at sun.security.ssl.InputRecord.read(InputRecord.java:527)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
        at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:543)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:348)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)
&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 07:42:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218985#M64005</guid>
      <dc:creator>mohitvarshney</dc:creator>
      <dc:date>2017-06-30T07:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218986#M64006</link>
      <description>&lt;P&gt;have already set mail.smtp.ssl.enable= true&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 07:46:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218986#M64006</guid>
      <dc:creator>mohitvarshney</dc:creator>
      <dc:date>2017-06-30T07:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218987#M64007</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/17451/mohitvarshney.html" nodeid="17451" target="_blank"&gt;@Mohit Varshney&lt;/A&gt;&lt;/P&gt;&lt;P&gt;While configuring SMTP notifications from ambari UI did you select the following checkbox?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Start TLS&lt;/STRONG&gt;    &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="17584-ambari-smtp.png" style="width: 610px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16022i80E47DAA9380CB95/image-size/medium?v=v2&amp;amp;px=400" role="button" title="17584-ambari-smtp.png" alt="17584-ambari-smtp.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:44:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218987#M64007</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-08-18T02:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218988#M64008</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt;&lt;P&gt;Yes I did. screenshot attached&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/17585-ambari-email.png"&gt;ambari-email.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 08:18:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218988#M64008</guid>
      <dc:creator>mohitvarshney</dc:creator>
      <dc:date>2017-06-30T08:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218989#M64009</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/17451/mohitvarshney.html" nodeid="17451"&gt;@Mohit Varshney
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just noticed that you added &lt;STRONG&gt;["mail.smtp.ssl.enable":true] &lt;/STRONG&gt;parameter in your SMTP protocol which is actually causing the issue.&lt;/P&gt;&lt;P&gt;Please remove that property and then it should not cause the following error any more. For smtp.gmail.com  that property is not at all needed.&lt;/P&gt;&lt;PRE&gt;Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
    at sun.security.ssl.InputRecord.read(InputRecord.java:527)
&lt;/PRE&gt;&lt;P&gt;.
&lt;A rel="user" href="https://community.cloudera.com/users/17451/mohitvarshney.html" nodeid="17451"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 11:17:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218989#M64009</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-06-30T11:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218990#M64010</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt;&lt;P&gt;the error changes after removing &lt;STRONG&gt;["mail.smtp.ssl.enable":true]. &lt;/STRONG&gt;see the screenshot.
&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/17594-ambari-alert2.png"&gt;ambari-alert2.png&lt;/A&gt;
&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 15:33:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218990#M64010</guid>
      <dc:creator>mohitvarshney</dc:creator>
      <dc:date>2017-06-30T15:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218991#M64011</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/17451/mohitvarshney.html" nodeid="17451"&gt;@Mohit Varshney
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This error indicates that you have not configured TrustStore for Ambari. Also you will need to store the &lt;STRONG&gt;"smtp.gmail.com" &lt;/STRONG&gt;  certificate in that truststore.&lt;/P&gt;&lt;P&gt;Please try this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1). Create Ambari TrustStore File.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# export AMBARI_SERVER_HOSTNAME=erie1.example.com
# cd /etc/ambari-server/conf/
# $JAVA_HOME/bin/keytool -genkeypair -alias ambari -keyalg RSA -validity 365 -keystore /etc/ambari-server/conf/$AMBARI_SERVER_HOSTNAME.jks -dname 'CN=$AMBARI_SERVER_HOSTNAME, OU=MiddlewareMagic, O=test, L=Bangalore, S=Karnataka, C=IN' -keypass ambari -storepass ambari
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;**NOTE** &lt;/STRONG&gt;Please replace the "MBARI_SERVER_HOSTNAME" with your actual ambari server FQDN/hostname.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) . Retrieve the "smtp.gmail.com"&lt;/STRONG&gt; &lt;STRONG&gt;certificate in Ambari Trust Store.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# cd /etc/ambari-server/conf/

# openssl s_client -connect  smtp.gmail.com:587  -starttls smtp &amp;lt;&amp;lt;&amp;lt; '' | openssl x509 -out gmail-smtp.cer
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3). Import the smtp.gmail.com certificate to Ambari Truststore.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# $JAVA_HOME/bin/keytool -import -alias $AMBARI_SERVER_HOSTNAME -file /etc/ambari-server/conf/gmail-smtp.cer -keystore /etc/ambari-server/conf/$AMBARI_SERVER_HOSTNAME.jks
&lt;/PRE&gt;&lt;P&gt;
&lt;STRONG&gt;4). Configure Ambari TrustStore.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;[root@erie1 conf]# ambari-server setup-security
Using python  /usr/bin/python
Security setup options...
===========================================================================
Choose one of the following options: 
  [1] Enable HTTPS for Ambari server.
  [2] Encrypt passwords stored in ambari.properties file.
  [3] Setup Ambari kerberos JAAS configuration.
  [4] Setup truststore.
  [5] Import certificate to truststore.
===========================================================================
Enter choice, (1-5): 4
Do you want to configure a truststore [y/n] (y)? 
The truststore is already configured. Do you want to re-configure the truststore [y/n] (y)? 
TrustStore type [jks/jceks/pkcs12] (jks):jks
Path to TrustStore file :/etc/ambari-server/conf/erie1.example.com.jks
Password for TrustStore: ambari
Re-enter password: ambari
Ambari Server 'setup-security' completed successfully.
+++++++++++
&lt;/PRE&gt;&lt;P&gt;
&lt;STRONG&gt;5). Restart Ambari Server.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;.
&lt;A rel="user" href="https://community.cloudera.com/users/17451/mohitvarshney.html" nodeid="17451"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 15:46:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218991#M64011</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-06-30T15:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari-Alerts configuration error- Not able to receive alert email. Below is the output of ambari-server.log.  "telnet smtp.gmail.com 587" is getting connected.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218992#M64012</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt; worked after creating truststore. Thanks a lot. &lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 17:57:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alerts-configuration-error-Not-able-to-receive-alert/m-p/218992#M64012</guid>
      <dc:creator>mohitvarshney</dc:creator>
      <dc:date>2017-06-30T17:57:20Z</dc:date>
    </item>
  </channel>
</rss>

