Contrail webui not working over haproxy

Bug #1310729 reported by Abhishek Chanda
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenContrail
New
Undecided
asbalaji

Bug Description

We have an Openstack deployment running the webui on zone nodes. We cluster all components using HAproxy. For the webui, HAproxy returns a HTTP 502. The error log shows
Apr 21 17:52:28 z0.b0.cloudy haproxy[11222]: 11.2.3.4:62644 [21/Apr/2014:17:52:28.327] contrail_web_frontend~ contrail_web_backend/z4.b0.cloudy 173/0/0/-1/176 502 205 - - SH-- 66/1/0/0/0 0/0 "GET / HTTP/1.1"

According to http://haproxy.1wt.eu/download/1.3/doc/configuration.txt, SH corresponds to:
S: the TCP session was unexpectedly aborted by the server, or the server explicitly refused it.
H: the proxy was waiting for complete, valid response HEADERS from the server (HTTP only).

contrail-webui.log has an entry , which has same timestamp
"2014-04-21T17:52:28.503Z - ^[[31merror^[[39m: httpsServer Exception: on clientError:"

Rahul (rahuls)
Changed in opencontrail:
assignee: nobody → Rahul (rahuls)
asbalaji (asbalaji)
Changed in opencontrail:
assignee: Rahul (rahuls) → asbalaji (asbalaji)
Revision history for this message
asbalaji (asbalaji) wrote :

Hi,
Please find the way to configure HA Proxy for Contrail Web UI.

When a user wants Node1 to proxy Node2 through say port# 19090, follow the following steps.

Assumption:
1) Node1 & Node2 up and running Contrail VNC, specifically webserver.

Steps to configure HA Proxy for Contrail Web UI
1) In Node1 (which is suppose to act as proxy), Add following lines at the end of /etc/haproxy/haproxy.cfg

 frontend unsecured *:8080
     timeout client 86400000
       default_backend www_backend

   backend www_backend
       mode http
       balance roundrobin
       cookie SERVERID insert indirect nocache
       timeout server 30000
       timeout connect 4000
       server server1 Node1:19090 cookie server1 weight 1 maxconn 1024 check
       server server2 Node2:19090 cookie server2 weight 1 maxconn 1024 check

Refer http://haproxy.1wt.eu/download/1.3/doc/configuration.txt for more details.

2) In Node1 & Node2, Edit following lines in /etc/contrail/config.global.js

 1) Set insecure access to true
 config.insecure_access = true;

 2) Set HTTP Port to 19090
 config.http_port = '19090';

3) Restart HA proxy service in Node1
$> service haproxy restart

4) Restart WebServer on both Node1, Node2
$> service supervisor-webui restart

5) Launch Web UI
http://Node1:8080 - Launches Web UI for as figured out by applying weightage (WebUI with information from Node2 in the example given above).

Let me know if you need more details.

Revision history for this message
asbalaji (asbalaji) wrote :

The above steps are only for HTTP connections.

tags: added: ui
tags: added: provisioning
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.