<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
<div>
<div>
<div style="color: rgb(0, 0, 0);">I’ve been searching Google for several hours tonight and have not found an answer yet to this SSL error message. I am trying to execute the following segment of code:</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">139         credentials = get_credentials()</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">140         neutron = client.Client('2.0',</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">141                                 username=credentials['username'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">142                                 password=credentials['password'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">143                                 auth_url=credentials['auth_url'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">144                                 tenant_name=credentials['tenant_name'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">145                                 endpoint_url=credentials['url'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">146                                 token=credentials['token'],</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">147                                 insecure=True)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">148         response = neutron.list_ports()</p>
</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">When I run the Python script, it errors out with the following:</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">Traceback (most recent call last):</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "getMACAddr.py", line 148, in <module></p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    response = neutron.list_ports()</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 111, in with_params</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    ret = self.function(instance, *args, **kwargs)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 306, in list_ports</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    **_params)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1250, in list</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    for r in self._pagination(collection, path, **params):</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1263, in _pagination</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    res = self.get(path, params=params)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1236, in get</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    headers=headers, params=params)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1221, in retry_request</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    headers=headers, params=params)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1156, in do_request</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    resp, replybody = self.httpclient.do_request(action, method, body=body)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 192, in do_request</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    **kwargs)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 148, in _cs_request</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">    raise exceptions.SslCertificateValidationError(reason=e)</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">neutronclient.common.exceptions.SslCertificateValidationError: SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</p>
</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">The /var/log/neutron/server.log file has the following corresponding entry for when the script tries to make the connection:</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">2015-04-11 07:17:31.941 2096 INFO neutron.wsgi [-] (2096) accepted ('10.27.16.164', 34495)</p>
</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">When I run the CLI from the same controller node, I get the error with or without the —insecure flag:</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">root@controller02:/tmp# neutron port-list</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">root@controller02:/tmp# neutron --insecure port-list</p>
<p style="margin: 0px; font-size: 10px; font-family: Menlo;">SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</p>
</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">If I run the CLI command from my local Macbook Pro, it works just fine. Ultimately, I am trying to add a port through the API but I am using the list_ports() as a test until I get it working.</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">Any ideas how to solve this issue?</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">
<div><br>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="100%" style="font-family: Times; width: 1760px; border-style: solid none none; border-top-color: rgb(106, 115, 123); border-top-width: 1pt;">
<tbody>
<tr>
<td width="43" style="width: 32.25pt; border: none; padding: 0in 15.75pt 0in 0in;">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size: 9pt; font-family: Arial, sans-serif;"><img width="43" height="72" id="_x0000_i1025" src="cid:5F83EB2C-1009-444B-A330-0CD831AEE25E" type="image/png"></span><span style="font-size: 9pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
</td>
<td width="580" valign="bottom" style="width: 435pt; border: none; padding: 0in;">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="671" style="width: 503.25pt;">
<tbody>
<tr>
<td width="239" valign="bottom" style="width: 179.25pt; padding: 0in;">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; line-height: 11.25pt;">
<span class="SpellE"><strong><span style="font-size: 9pt; font-family: Arial, sans-serif;">Chris</span></strong></span><strong><span style="font-size: 9pt; font-family: Arial, sans-serif;"> <span class="SpellE">Mutchler</span></span></strong><span style="font-size: 9pt; font-family: Arial, sans-serif;"><br>
Compute Platform Engineer<br>
Adobe<o:p></o:p></span></p>
</td>
<td width="192" valign="bottom" style="width: 2in; padding: 0in;">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; line-height: 11.25pt;">
<span style="font-size: 9pt; font-family: Arial, sans-serif;">385.345.1038 (<span class="SpellE">tel</span>)<br>
801.722.8555 (cell)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; line-height: 11.25pt;">
<span style="font-size: 9pt; font-family: Arial, sans-serif;">cmutchle@adobe.com<o:p></o:p></span></p>
</td>
<td width="240" valign="bottom" style="width: 2.5in; padding: 0in;">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; line-height: 11.25pt;">
<span style="font-size: 9pt; font-family: Arial, sans-serif;">3900 Adobe Way<br>
Lehi, Utah, 84043, USA<br>
www.adobe.com</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>