stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janaka Bandara <bandaraukju...@cse.mrt.ac.lk>
Subject HAProxy LB Config Issue
Date Fri, 04 Dec 2015 11:57:17 GMT
Hi,

I am trying to set up Stratos 4.1.4 with HAProxy (1.6.2) on Amazon
EC2. I encountered an error from the ThriftClientConfigParser,
"username is not found", and bypassed it by rewriting
<HAProxy_EXTENSION_HOME>/conf/thrift-client-config.xml according to
the structure used in
<Stratos_HOME>/repository/conf/thrift-client-config.xml.

However, now I'm facing a different error while the extension is running:

java.lang.NumberFormatException: For input string: "No"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:492)
        at java.lang.Integer.parseInt(Integer.java:527)
        at org.apache.stratos.haproxy.extension.HAProxyStatisticsReader.getInFlightRequestCount(HAProxyStatisticsReader.java:84)
        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.run(LoadBalancerStatisticsNotifier.java:83)
        at java.lang.Thread.run(Thread.java:745)

Investigating further, I found that the backend ID used in generating
the HAProxy config (HAProxyConfigWriter) is different from the one
used in HAProxyStatisticsReader, and as a result HAProxy generates a
"No such backend." response for the "get weight" query executed by
HAProxyStatisticsReader.

In our case, the config file contains
"backend 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org_http_80_backend"
whereas the extension's query for HAProxy is
"get weight 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org-http-members/4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.php3.domainff00df59-7ba2-423f-95cd-912db08b5303"

Is there any workaround to overcome this issue?

Regards,
Janaka

-- 
U.K.J.U. Bandara,
B.Sc. Eng. (Hons.) Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.

Mime
View raw message