<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; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>Rob,</div>
<div><br>
</div>
<div>Thank you for the response. It turns out it was a mixture of HTTP and HTTPS not functioning identically when I go through the load balancer to the controllers versus running the code directly on the controller itself. Once I changed the Neutron endpoint
 to simply use HTTP, it began working.</div>
<div>
<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:41160A80-A359-4D03-B257-CC28E4F51C3F" 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><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Rob Crittenden <<a href="mailto:rcritten@redhat.com">rcritten@redhat.com</a>><br>
<span style="font-weight:bold">Date: </span>Monday, April 13, 2015 at 7:24 AM<br>
<span style="font-weight:bold">To: </span>Chris Mutchler <<a href="mailto:cmutchle@adobe.com">cmutchle@adobe.com</a>>, "<a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>" <<a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack] OpenStack Network API SSL error<br>
</div>
<div><br>
</div>
<div>
<div>
<div>Chris Mutchler wrote:</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>I’ve been searching Google for several hours tonight and have not found</div>
<div>an answer yet to this SSL error message. I am trying to execute the</div>
<div>following segment of code:</div>
<div></div>
<div>139         credentials = get_credentials()</div>
<div></div>
<div>140         neutron = client.Client('2.0',</div>
<div></div>
<div>141                                 username=credentials['username'],</div>
<div></div>
<div>142                                 password=credentials['password'],</div>
<div></div>
<div>143                                 auth_url=credentials['auth_url'],</div>
<div></div>
<div>144                                 tenant_name=credentials['tenant_name'],</div>
<div></div>
<div>145                                 endpoint_url=credentials['url'],</div>
<div></div>
<div>146                                 token=credentials['token'],</div>
<div></div>
<div>147                                 insecure=True)</div>
<div></div>
<div>148         response = neutron.list_ports()</div>
<div></div>
<div></div>
<div>When I run the Python script, it errors out with the following:</div>
<div></div>
<div>Traceback (most recent call last):</div>
<div></div>
<div>   File "getMACAddr.py", line 148, in <module></div>
<div></div>
<div>     response = neutron.list_ports()</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 111, in with_params</div>
<div></div>
<div>     ret = self.function(instance, *args, **kwargs)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 306, in list_ports</div>
<div></div>
<div>     **_params)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 1250, in list</div>
<div></div>
<div>     for r in self._pagination(collection, path, **params):</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 1263, in _pagination</div>
<div></div>
<div>     res = self.get(path, params=params)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 1236, in get</div>
<div></div>
<div>     headers=headers, params=params)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 1221, in retry_request</div>
<div></div>
<div>     headers=headers, params=params)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py",</div>
<div>line 1156, in do_request</div>
<div></div>
<div>     resp, replybody = self.httpclient.do_request(action, method, body=body)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line</div>
<div>192, in do_request</div>
<div></div>
<div>     **kwargs)</div>
<div></div>
<div>   File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line</div>
<div>148, in _cs_request</div>
<div></div>
<div>     raise exceptions.SslCertificateValidationError(reason=e)</div>
<div></div>
<div>neutronclient.common.exceptions.SslCertificateValidationError: SSL</div>
<div>certificate validation has failed: [Errno 1] _ssl.c:510:</div>
<div>error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</div>
<div></div>
<div></div>
<div>The /var/log/neutron/server.log file has the following corresponding</div>
<div>entry for when the script tries to make the connection:</div>
<div></div>
<div>2015-04-11 07:17:31.941 2096 INFO neutron.wsgi [-] (2096) accepted</div>
<div>('10.27.16.164', 34495)</div>
<div></div>
<div></div>
<div>When I run the CLI from the same controller node, I get the error with</div>
<div>or without the —insecure flag:</div>
<div></div>
<div>root@controller02:/tmp# neutron port-list</div>
<div></div>
<div>SSL certificate validation has failed: [Errno 1] _ssl.c:510:</div>
<div>error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</div>
<div></div>
<div>root@controller02:/tmp# neutron --insecure port-list</div>
<div></div>
<div>SSL certificate validation has failed: [Errno 1] _ssl.c:510:</div>
<div>error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol</div>
<div></div>
<div></div>
<div>If I run the CLI command from my local Macbook Pro, it works just fine.</div>
<div>Ultimately, I am trying to add a port through the API but I am using the</div>
<div>list_ports() as a test until I get it working.</div>
<div></div>
<div>Any ideas how to solve this issue?</div>
</blockquote>
<div><br>
</div>
<div>This type of error usually indicates that you're not talking to an</div>
<div>SSL-enabled server, but given that it works on one host and not another</div>
<div>that adds another twist.</div>
<div><br>
</div>
<div>What I'd do is add the --debug flag and see if there is any difference</div>
<div>between the working and non-working server. And I'd probably also try</div>
<div>the curl command that --debug spits out.</div>
<div><br>
</div>
<div>rob</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</span>
</body>
</html>