You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Geert Lugtenberg <ge...@poort80.nl> on 2013/01/17 11:56:47 UTC

INACTIVE_TIMEOUT when using CNAME alias

Hello all,

We are using Traffic Server to modify content in conjunction with HAproxy to balance. Our setup for an example website is this:

Normal: www.example.com<http://www.example.com> -> origin.server.ip
CNAME alias: example.alias.somedomain.com -> HAproxy balancer -> Traffic Server proxy -> origin.server.ip

When I map  haproxy.ip www.example.com<http://www.example.com>  in my local host file, everything works fine. HAproxy balances and send the requests to TS, then on to the OS.
But when the alias is used (so host: www.example.com<http://www.example.com> but goes to example.alias.somedomain.com), it does not work, and I get some errors in /error.log :

CONNECT:[1] could not connect [INACTIVE_TIMEOUT] to HAproxy.balancer.ip for 'some url'

Why do I get these error when using an alias? Should I modify the active timeouts in records.config?

Thanks.

Re: INACTIVE_TIMEOUT when using CNAME alias

Posted by Reindl Harald <h....@thelounge.net>.

Am 17.01.2013 16:37, schrieb Geert Lugtenberg:
> Okay, here to answer my own question. And it pretty dumb that I didn’t see it, as I’m sure most of you did.
> 
> In the below setup, www.example.com on the DNS points to the load balancer. The balancer
> sends requests to TS and in remap.conf of TS I have this rule:
> 
> map http://www.example.com http://www.example.com
> 
> Of course, when resolving www.example.com, TS maps to the load balancer again! And so on.
> TS should be remapped to an ip address

no, you simply need to provide on the traffic-server
a DNS-resolver which points to the ip-address of the
target and not to the trafficserver again

dnsmasq as example can use a simple hosts file

what i do is fetch with a web-service the whole list
of ServerName / ServerAlias from a target-server
from our infrastrcuture backends and write a hosts
file with any hosted name and origin-ip

this way we simply decide with the "normal" DNS
if a site should be served with trafficserver or
directly the origin depending on page-load


RE: INACTIVE_TIMEOUT when using CNAME alias

Posted by Geert Lugtenberg <ge...@poort80.nl>.
Okay, here to answer my own question. And it pretty dumb that I didn't see it, as I'm sure most of you did.

In the below setup, www.example.com<http://www.example.com> on the DNS points to the load balancer. The balancer sends requests to TS and in remap.conf of TS I have this rule:

map http://www.example.com http://www.example.com

Of course, when resolving www.example.com<http://www.example.com>, TS maps to the load balancer again! And so on. TS should be remapped to an ip address.

FYI

From: Geert Lugtenberg [mailto:geert.lugtenberg@poort80.nl]
Sent: donderdag 17 januari 2013 11:57
To: users@trafficserver.apache.org
Subject: INACTIVE_TIMEOUT when using CNAME alias

Hello all,

We are using Traffic Server to modify content in conjunction with HAproxy to balance. Our setup for an example website is this:

Normal: www.example.com<http://www.example.com> -> origin.server.ip
CNAME alias: example.alias.somedomain.com -> HAproxy balancer -> Traffic Server proxy -> origin.server.ip

When I map  haproxy.ip www.example.com<http://www.example.com>  in my local host file, everything works fine. HAproxy balances and send the requests to TS, then on to the OS.
But when the alias is used (so host: www.example.com<http://www.example.com> but goes to example.alias.somedomain.com), it does not work, and I get some errors in /error.log :

CONNECT:[1] could not connect [INACTIVE_TIMEOUT] to HAproxy.balancer.ip for 'some url'

Why do I get these error when using an alias? Should I modify the active timeouts in records.config?

Thanks.