trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishwas Manral <vishwas.i...@gmail.com>
Subject Re: ATS teething issues
Date Mon, 24 Aug 2015 02:05:51 GMT
Thanks Shu. The suggestions helped for sure.

I am having some issues with the forward proxy - though its not a regular
case of forward proxy. I am running the HTTP client on the forward proxy
itself. I want to modify the all HTTP requests that go out from the client
and I have setup a forward proxy for the same. I put a ts.hook on
TS_LUA_HOOK_SEND_REQUEST_HDR.

However it looks like the code does not get hit at all. How can I tap all
HTPP request packets originated from the localhost?

-Vishwas

On Sat, Aug 22, 2015 at 3:32 PM, Shu Kit Chan <chanshukit@gmail.com> wrote:

> #2 - i think header_rewrite should still work in forward proxy mode for
> http
>
> #3 - Perhaps you will find more info in diags.log/error.log/traffic.out
> and they should probably tell you why the server is not up and running in
> the first place.
>
> #4 - I dont think there is windows support for ATS at this point.
>
> On Sat, Aug 22, 2015 at 3:28 PM, Shu Kit Chan <chanshukit@gmail.com>
> wrote:
>
>> For #1, you need the following in your remap rules
>>
>> map http://xxx/ http://yyy @plugin=/opt/ats/libexec/trafficserver/tslua.so
>> @pparam=/opt/ats/etc/trafficserver/sethost.lua @pparam=abc
>>
>> That's because the sample lua script you have requires an extra
>> parameter. Without that, the lua script stated to quit right away without
>> finish initializing.
>>
>> Thanks.
>>
>> Kit
>>
>> On Sat, Aug 22, 2015 at 3:07 PM, Vishwas Manral <vishwas.ietf@gmail.com>
>> wrote:
>>
>>> Hi ATS-gurus,
>>>
>>> I am a new user of ATS and am using version 5.3.1. I am trying to test
>>> functionality of the Traffic Server and getting the Reverse proxy to work
>>> with header_rewrite plugin. I had a few issues:
>>>
>>> 1. I tried the tslua plugin like this:
>>> map http://xxx/ http://yyy
>>> @plugin=/opt/ats/libexec/trafficserver/tslua.so
>>> @pparam=/opt/ats/etc/trafficserver/sethost.lua
>>>
>>> The sethost looks like the example given with minor changes:
>>>
>>> local HOSTNAME = ''
>>> function __init__(argtb)
>>>     if (#argtb) < 1 then
>>>         print(argtb[0], 'hostname parameter required!!')
>>>         return -1
>>>     end
>>>     HOSTNAME = argtb[1]
>>> end
>>>
>>> function do_remap()
>>>     ts.client_request.header['X-Host'] = HOSTNAME
>>>     return 0
>>> end
>>>
>>> I didn't see the X-Host header in the request header at the yyy server.
>>> What could I be doing wrong?
>>>
>>> 2. I changed configurations and started a forward proxy. I am trying to
>>> run forward proxy on the same machine from which I am making the request.
>>> How can I make HTTP header changes in case of a forward proxy?
>>>
>>> 3. I looked at the logs when the system is configured as a forward proxy
>>> and found logs that said my traffic_server is getting killed and restarted
>>> because traffic_cop is unable to find the server. What should I be doing?
>>>
>>> Aug 22 22:01:31 ip-172-31-8-21 traffic_server[14324]: NOTE:
>>> traffic_server Version: Apache Traffic Server - traffic_server - 5.3.1 -
>>> (build # 082218 on Aug 22 2015 at 18:36:19)
>>> Aug 22 22:01:31 ip-172-31-8-21 traffic_server[14324]: NOTE:
>>> RLIMIT_NOFILE(7):cur(361044),max(361044)
>>> Aug 22 22:01:34 ip-172-31-8-21 traffic_cop[5714]: cannot find
>>> traffic_server [2]
>>> Aug 22 22:01:34 ip-172-31-8-21 traffic_cop[5714]: killing manager
>>> Aug 22 22:01:35 ip-172-31-8-21 traffic_server[14339]: NOTE: ---
>>> traffic_server Starting ---
>>> Aug 22 22:01:35 ip-172-31-8-21 traffic_server[14339]: NOTE:
>>> traffic_server Version: Apache Traffic Server - traffic_server - 5.3.1 -
>>> (build # 082218 on Aug 22 2015 at 18:36:19)
>>> Aug 22 22:01:35 ip-172-31-8-21 traffic_server[14339]: NOTE:
>>> RLIMIT_NOFILE(7):cur(361044),max(361044)
>>> Aug 22 22:01:39 ip-172-31-8-21 traffic_server[14354]: NOTE: ---
>>> traffic_server Starting ---
>>> Aug 22 22:01:39 ip-172-31-8-21 traffic_server[14354]: NOTE:
>>> traffic_server Version: Apache Traffic Server - traffic_server - 5.3.1 -
>>> (build # 082218 on Aug 22 2015 at 18:36:19)
>>> Aug 22 22:01:39 ip-172-31-8-21 traffic_server[14354]: NOTE:
>>> RLIMIT_NOFILE(7):cur(361044),max(361044)
>>> Aug 22 22:01:43 ip-172-31-8-21 traffic_server[14369]: NOTE: ---
>>> traffic_server Starting ---
>>> Aug 22 22:01:43 ip-172-31-8-21 traffic_server[14369]: NOTE:
>>> traffic_server Version: Apache Traffic Server - traffic_server - 5.3.1 -
>>> (build # 082218 on Aug 22 2015 at 18:36:19)
>>> Aug 22 22:01:43 ip-172-31-8-21 traffic_server[14369]: NOTE:
>>> RLIMIT_NOFILE(7):cur(361044),max(361044)
>>> Aug 22 22:01:48 ip-172-31-8-21 traffic_server[14384]: NOTE: ---
>>> traffic_server Starting ---
>>>
>>>
>>> 4. Also searching the internet I found that there was no support for ATS
>>> on Windows. I wanted to reconfirm the same here. Can someone please confirm
>>> this for me?
>>>
>>> Thanks,
>>> Vishwas
>>>
>>
>>
>

Mime
View raw message