Robert Levas created AMBARI-24085:

             Summary: setup-sso in Ambari fails when SSL is enabled
                 Key: AMBARI-24085
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.7.0
            Reporter: SuryaKranthi Koneru
            Assignee: Robert Levas
             Fix For: 2.7.0

When SSL is enabled and the python version is 2.7.14, accessing the Ambari 
server via the {{ambari-server}} CLI fails with CERTIFICATE_VERIFY_FAILED.

-bash-4.2# ambari-server setup-sso -v
Using python /usr/bin/python
Setting up SSO authentication properties...
INFO: Loading properties from /etc/ambari-server/conf/
INFO: Setup SSO.
INFO: about to run command: ps -p 33705
INFO: Loading properties from /etc/ambari-server/conf/
Enter Ambari Admin login: admin
Enter Ambari Admin password:
INFO: Fetching SSO configuration from DB
INFO: Fetching information from Ambari's REST API
Traceback (most recent call last):
 File "/usr/sbin/", line 1056, in <module>
 File "/usr/sbin/", line 1026, in mainBody
 main(options, args, parser)
 File "/usr/sbin/", line 976, in main
 File "/usr/sbin/", line 90, in execute
 self.need_restart = self.fn(*self.args, **self.kwargs)
 File "/usr/lib/ambari-server/lib/ambari_server/", line 266, in 
 properties = get_sso_properties(ambari_properties, admin_login, admin_password)
 File "/usr/lib/ambari-server/lib/ambari_server/", line 221, in 
 response_code, json_data = get_json_via_rest_api(properties, admin_login, 
 File "/usr/lib/ambari-server/lib/ambari_server/", line 206, in 
 with closing(urllib2.urlopen(request)) as response:
 File "/usr/lib64/python2.7/", line 154, in urlopen
 return, data, timeout)
 File "/usr/lib64/python2.7/", line 429, in open
 response = self._open(req, data)
 File "/usr/lib64/python2.7/", line 447, in _open
 '_open', req)
 File "/usr/lib64/python2.7/", line 407, in _call_chain
 result = func(*args)
 File "/usr/lib64/python2.7/", line 1243, in https_open
 File "/usr/lib64/python2.7/", line 1200, in do_open
 raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed (_ssl.c:661)>

This message was sent by Atlassian JIRA

Reply via email to