trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Unable to use Balancer plugin
Date Thu, 10 Mar 2016 21:07:12 GMT

> On Mar 10, 2016, at 12:57 PM, Velusamy, Gandhimathi <gvelusam@Central.UH.EDU> wrote:
> 
> Hi James,
> Thanks for your reply.
>  I would like to write my own plugin for load balancing and as a first step towards my
goal, thought of understanding how the balancer plugin works.
> Any pointers for developing load balancing plugins are welcome.
> 
>  I have changed the urls of origin servers to hostnames by giving only px205 and py205.
But I am getting " 400 Multi hop-cycle  detected" error as below:
> 
> root@px207:~# wget http://px206.perk:80/
> --2016-03-10 14:06:53--  http://px206.perk/
> Resolving px206.perk (px206.perk)... 10.0.101.6
> Connecting to px206.perk (px206.perk)|10.0.101.6|:80... connected.
> HTTP request sent, awaiting response...
> 400 Multi-Hop Cycle Detected
> 2016-03-10 14:06:54 ERROR 400: Multi-Hop Cycle Detected.
> The error-log also shows the Multi hop-cycle detection error.
> 
> I have tried as told in https://issues.apache.org/jira/browse/TS-2298 by disabling  proxy.config.http.insert_request_via_str
but still I am getting the same error.

This means that the origin request is going back into the same Traffic Server instance. Basically,
you have a HTTP routing loop for some reason.

> After some trials I am getting:
> 20160310.14h30m24s RESPONSE: sent 10.0.101.6 status 502 (Server Hangup) for 'http://px206.perk/'
> 
> Any suggestions are appreciated.
> 
> 
> Thanks
> Gandhimathi
> 
> -----Original Message-----
> From: James Peach [mailto:jpeach@apache.org] 
> Sent: Thursday, March 10, 2016 10:23 AM
> To: users@trafficserver.apache.org
> Subject: Re: Unable to use Balancer plugin
> 
> 
>> On Mar 9, 2016, at 11:44 AM, Velusamy, Gandhimathi <gvelusam@Central.UH.EDU>
wrote:
>> 
>> Hi,
>> I started using Traffic server recently for my graduate research. I want to use balancer
plugin for my experiment.
> 
> That sounds great. A word of caution, the balancer is very simple, it might not be suitable
for your experiment :)
> 
>> I configured traffic server with configure enable-experimental plugin option.
>> I could see balance.so, hash.so and roundrobin.so files under /usr/local/libexec/trafficserver/
folder.
>> I have set “proxy.config.plugin.plugin_dir” to the above folder.
>> My remap.config contains:
>> map http://px206.perk http://px206.perk \
>>    @plugin=balancer.so @pparam=--policy=roundrobin, url 
>> @pparam=http://px205.perk:80 @pparam=http://py205.perk:80
> 
> The targets for the balancer plugin are hostnames or IP addreses not URLs. You should
be able to  verify what is happening in Traffic Server error logs or by using the "http_hdr"
diagnostic tags, but I'd bet it ends up trying to send the request to a host named "http".
> 
>> I tested with hash policy too. I am getting connection refused error as below:
>> 
>> root@px207:~# wget http://px206.perk:80/
>> --2016-03-09 13:35:43--  http://px206.perk/ Resolving px206.perk 
>> (px206.perk)... 10.0.101.6 Connecting to px206.perk 
>> (px206.perk)|10.0.101.6|:80... connected.
>> HTTP request sent, awaiting response... Read error (Connection reset by peer) in
headers.
>> Retrying.
>> --2016-03-09 13:36:42--  (try: 2)  http://px206.perk/ Connecting to 
>> px206.perk (px206.perk)|10.0.101.6|:80... failed: Connection refused.
>> Resolving px206.perk (px206.perk)... 10.0.101.6 Connecting to 
>> px206.perk (px206.perk)|10.0.101.6|:80... failed: Connection refused.
>> root@px207:~#
>> 
>> My client is px207.perk. Proxy is running from px206.perk and I want to load balance
between px205.perk and py205.perk.
>> On both px205 and py205 apache2 is running. I am just trying to get index.html file.
>> 
>> When I tested with reverse proxy configuration it worked for me for both origin servers.
>> Am I missing something here. Kindly help me. 
>> 
>> Thanks
>> Gandhimathi
> 


Mime
View raw message