<div dir="auto">Are you using http_to_wsgi_middleware? Gotta enable that in the nova config and make sure its in your paste config.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, 4 Jul 2018, 20:22 Nguyễn Trọng Tấn, <<a href="mailto:nguyentrongtan124@gmail.com">nguyentrongtan124@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks you katynski for response.<br>
<br>
But, I had config Haproxy correctly. Here is my config: <a href="http://prntscr.com/k2ofwv" rel="noreferrer noreferrer" target="_blank">http://prntscr.com/k2ofwv</a><br>
<br>
And, when I use openstack command, that is successful. Here: <a href="http://prntscr.com/k2ogau" rel="noreferrer noreferrer" target="_blank">http://prntscr.com/k2ogau</a><br>
<br>
I don’t think I config wrong. I can create, delete, list, show any VM with openstack command successfully.<br>
<br>
<br>
<br>
Thanks and Best Regards!<br>
<br>
Nguyen Trong Tan<br>
<br>
Openstack group user VietNam.<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Bogdan Katynski [mailto:<a href="mailto:bogdan.katynski@workday.com" target="_blank" rel="noreferrer">bogdan.katynski@workday.com</a>] <br>
Sent: Wednesday, July 4, 2018 9:50 PM<br>
To: Nguyễn Trọng Tấn <<a href="mailto:nguyentrongtan124@gmail.com" target="_blank" rel="noreferrer">nguyentrongtan124@gmail.com</a>><br>
Cc: <a href="mailto:openstack-operators@lists.openstack.org" target="_blank" rel="noreferrer">openstack-operators@lists.openstack.org</a>; <a href="mailto:openstack@lists.openstack.org" target="_blank" rel="noreferrer">openstack@lists.openstack.org</a>; Lê Quang Long (VDC-IT) <<a href="mailto:longlq.uct@gmail.com" target="_blank" rel="noreferrer">longlq.uct@gmail.com</a>><br>
Subject: Re: [Openstack] Novaclient redirect endpoint https into http<br>
<br>
<br>
>  <br>
> But, I can not use nova command, endpoint nova have been redirected from https to http. Here: <a href="http://prntscr.com/k2e8s6" rel="noreferrer noreferrer" target="_blank">http://prntscr.com/k2e8s6</a> (command: nova –insecure service list)<br>
<br>
First of all, it seems that the nova client is hitting /v2.1 instead of /v2.1/ URI and this seems to be triggering the redirect.<br>
<br>
Since openstack CLI works, I presume it must be using the correct URL and hence it’s not getting redirected.<br>
<br>
>  <br>
> And this is error log: Unable to establish connection to <a href="http://192.168.30.70:8774/v2.1/" rel="noreferrer noreferrer" target="_blank">http://192.168.30.70:8774/v2.1/</a>: ('Connection aborted.', BadStatusLine("''",))<br>
>  <br>
<br>
Looks to me that nova-api does a redirect to an absolute URL. I suspect SSL is terminated on the HAProxy and nova-api itself is configured without SSL so it redirects to an http URL.<br>
<br>
In my opinion, nova would be more load-balancer friendly if it used a relative URI in the redirect but that’s outside of the scope of this question and since I don’t know the context behind choosing the absolute URL, I could be wrong on that.<br>
<br>
I had a similar problem with heat-api running behind an Apache reverse proxy, and managed to resolve it by applying the workaround from this bug report:<br>
<br>
<a href="https://bugs.launchpad.net/python-heatclient/+bug/1420907" rel="noreferrer noreferrer" target="_blank">https://bugs.launchpad.net/python-heatclient/+bug/1420907</a><br>
<br>
Setting<br>
<br>
X-Forwarded-Proto: https <br>
<br>
before forwarding the request to heat-api fixed the issue for me.<br>
<br>
-- <br>
Bogdan Katyński<br>
freenode: bodgix<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank" rel="noreferrer">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
</blockquote></div>