title: Ambari registration phase fails for SSL on EC2
body: <p>I am trying to use Apache Ambari to configure a Hadoop cluster on EC2.</p>
  
  <p>During the registration phase I get this error:</p>
  
  <pre><code>Command start time 2016-11-23 20:25:12
  ('Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in &lt;module&gt;
      main(heartbeat_stop_callback)
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 248, in main
      stop_agent()
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 198, in stop_agent
      sys.exit(1)
  SystemExit: 1
  INFO 2016-11-23 20:25:18,716 ExitHelper.py:53 - Performing cleanup before exiting...
  INFO 2016-11-23 20:25:18,907 main.py:74 - loglevel=logging.INFO
  INFO 2016-11-23 20:25:18,907 DataCleaner.py:39 - Data cleanup thread started
  INFO 2016-11-23 20:25:18,908 DataCleaner.py:120 - Data cleanup started
  INFO 2016-11-23 20:25:18,909 DataCleaner.py:122 - Data cleanup finished
  INFO 2016-11-23 20:25:18,930 PingPortListener.py:50 - Ping port listener started on port: 8670
  INFO 2016-11-23 20:25:18,931 main.py:289 - Connecting to Ambari server at https://IPADDRESS.us-west-2.compute.internal:8440 (172.31.37.172)
  INFO 2016-11-23 20:25:18,931 NetUtil.py:59 - Connecting to https://IPADDRESS.us-west-2.compute.internal:8440/ca
  ERROR 2016-11-23 20:25:18,983 NetUtil.py:77 - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
  ERROR 2016-11-23 20:25:18,983 NetUtil.py:78 - SSLError: Failed to connect. Please check openssl library versions. 
  Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.
  WARNING 2016-11-23 20:25:18,983 NetUtil.py:105 - Server at https://IPADDRESS.us-west-2.compute.internal:8440 is not reachable, sleeping for 10 seconds...
  ', None)
  ('Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in &lt;module&gt;
      main(heartbeat_stop_callback)
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 248, in main
      stop_agent()
    File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 198, in stop_agent
      sys.exit(1)
  SystemExit: 1
  INFO 2016-11-23 20:25:18,716 ExitHelper.py:53 - Performing cleanup before exiting...
  INFO 2016-11-23 20:25:18,907 main.py:74 - loglevel=logging.INFO
  INFO 2016-11-23 20:25:18,907 DataCleaner.py:39 - Data cleanup thread started
  INFO 2016-11-23 20:25:18,908 DataCleaner.py:120 - Data cleanup started
  INFO 2016-11-23 20:25:18,909 DataCleaner.py:122 - Data cleanup finished
  INFO 2016-11-23 20:25:18,930 PingPortListener.py:50 - Ping port listener started on port: 8670
  INFO 2016-11-23 20:25:18,931 main.py:289 - Connecting to Ambari server at https://IPADDRESS.us-west-2.compute.internal:8440 (172.31.37.172)
  INFO 2016-11-23 20:25:18,931 NetUtil.py:59 - Connecting to https://IPADDRESS.us-west-2.compute.internal:8440/ca
  ERROR 2016-11-23 20:25:18,983 NetUtil.py:77 - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
  ERROR 2016-11-23 20:25:18,983 NetUtil.py:78 - SSLError: Failed to connect. Please check openssl library versions. 
  Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more details.
  WARNING 2016-11-23 20:25:18,983 NetUtil.py:105 - Server at https://IPADDRESS.us-west-2.compute.internal:8440 is not reachable, sleeping for 10 seconds...
  ', None)
  
  
  Connection to IPADDRESS.us-west-2.compute.internal closed.
  SSH command execution finished
  host=IPADDRESS.us-west-2.compute.internal, exitcode=0
  Command end time 2016-11-23 20:25:21
  
  
  Registering with the server...
  Registration with the server failed.
  </code></pre>
  
  <p>I think it is something basic, but I was not able to solve.</p>
  
  <p>The openssl version is 1.0.2g</p>
  
  <p>Any advice?</p>
  
  <p>Thank you</p>