Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B5741806D for ; Mon, 24 Aug 2015 04:06:32 +0000 (UTC) Received: (qmail 31363 invoked by uid 500); 24 Aug 2015 04:06:27 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 31308 invoked by uid 500); 24 Aug 2015 04:06:27 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 31298 invoked by uid 99); 24 Aug 2015 04:06:26 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 04:06:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 77A24C0861 for ; Mon, 24 Aug 2015 04:06:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id W5TEgF7jyF5r for ; Mon, 24 Aug 2015 04:06:18 +0000 (UTC) Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id EACAC21381 for ; Mon, 24 Aug 2015 04:06:17 +0000 (UTC) Received: by igfj19 with SMTP id j19so52675744igf.0 for ; Sun, 23 Aug 2015 21:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kDUFuH074sVSgqLmFliHPDa4PC7JDmnotbfysxxteXI=; b=vdL/AqEiQNNpVguikoonFc5cpH7HTYr5oyJoA3GGyBhnEUyPobZjbH/25MzAMzzYj6 j8AZWooBDMGeiacsY/0qLg9pbmbXxfKyNAZLRQlBopf3vDvgAyfTf5Nb8lQJsiPO+o5O sBWD2x7tlcngPGcWQmKgRxLyBW3DOiuOoX8WTlcfcVL1kyOUdRAEEmWRFobmUMRwvSMe C0n4rPiLgJxHuL4OwCW52zpvtQ8XgNOS3qSNyHtM1N0Upwp0atKIkdk1Xrpt2Z3Lg1C6 9DmyLEXbpOexV3uNooiM4/kfLooC8tGL6nXrtSzYQP5k977g/uz5pi7d+Tz87w14HneQ b3dQ== MIME-Version: 1.0 X-Received: by 10.50.111.230 with SMTP id il6mr12260868igb.56.1440389171292; Sun, 23 Aug 2015 21:06:11 -0700 (PDT) Received: by 10.107.40.136 with HTTP; Sun, 23 Aug 2015 21:06:11 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Aug 2015 21:06:11 -0700 Message-ID: Subject: Re: ATS teething issues From: Shu Kit Chan To: "users@trafficserver.apache.org" Content-Type: multipart/alternative; boundary=047d7b414326e4b25b051e06bcba --047d7b414326e4b25b051e06bcba Content-Type: text/plain; charset=UTF-8 Can you share your script? I can take a quick look. I run some examples of mine on a forward proxy and it works fine. Thanks. Kit On Sun, Aug 23, 2015 at 7:05 PM, Vishwas Manral wrote: > 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 > 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 >> 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 >>> 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 >>>> >>> >>> >> > --047d7b414326e4b25b051e06bcba Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Can you share your script? I can take a quick look.
I = run some examples of mine on a forward proxy and it works fine.
<= br>
Thanks.

Kit

On Sun, Aug 23, 2015 at 7:05 P= M, Vishwas Manral <vishwas.ietf@gmail.com> wrote:
Thanks Shu. The suggestions h= elped for sure.

I am having some issues with the forward= proxy - though its not a regular case of forward proxy. I am running the H= TTP client on the forward proxy itself. I want to modify the all HTTP reque= sts that go out from the client and I have setup a forward proxy for the sa= me. I put a ts.hook on TS_LUA_HOOK_SEND_REQUEST_HDR.=C2=A0

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 st= ill work in forward proxy mode for http

#3 - Perhaps you= will find more info in diags.log/error.log/traffic.out and they should pro= bably tell you why the server is not up and running in the first place.=C2= =A0

#4 - I dont think there is windows support for= ATS at this point.=C2=A0
<= br>
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=C2=A0<= /span>http://xxx/=C2= =A0http://yyy= =C2=A0@plugin=3D/opt/ats/libexec/trafficserver/tslua.so @pparam=3D/opt/ats/etc/trafficserver/sethost.lua @pparam=3Dabc

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.=C2=A0=

<= /div>
Thanks.
=

Kit=

<= div class=3D"gmail_quote">On Sat, Aug 22, 2015 at 3:07 PM, Vishwas Manral <= span dir=3D"ltr"><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 th= e Traffic Server and getting the Reverse proxy to work with header_rewrite = plugin. I had a few issues:

1. I tried the tslua p= lugin like this:
map ht= tp://xxx/ http://yyy @plug= in=3D/opt/ats/libexec/trafficserver/tslua.so @pparam=3D/opt/ats/etc/traffic= server/sethost.lua

The sethost looks like the exam= ple given with minor changes:

local HOSTNAME = =3D ''
function __init__(argtb)
=C2=A0 =C2=A0 i= f (#argtb) < 1 then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 print(argtb[0]= , 'hostname parameter required!!')
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 return -1
=C2=A0 =C2=A0 end
=C2=A0 =C2=A0 HOSTNA= ME =3D argtb[1]
end

function do_remap()<= /div>
=C2=A0 =C2=A0 ts.client_request.header['X-Host'] =3D HOST= NAME
=C2=A0 =C2=A0 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 pro= xy on the same machine from which I am making the request. How can I make H= TTP header changes in case of a forward proxy?

3. = I looked at the logs when the system is configured as a forward proxy and f= ound logs that said my traffic_server is getting killed and restarted becau= se traffic_cop is unable to find the server. What should I be doing?
<= div>
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:3= 1 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]: can= not find traffic_server [2]
Aug 22 22:01:34 ip-172-31-8-21 traffi= c_cop[5714]: killing manager
Aug 22 22:01:35 ip-172-31-8-21 traff= ic_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[1= 4339]: NOTE: RLIMIT_NOFILE(7):cur(361044),max(361044)
Aug 22 22:0= 1:39 ip-172-31-8-21 traffic_server[14354]: NOTE: --- traffic_server Startin= g ---
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(3610= 44)
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 tra= ffic_server[14369]: NOTE: traffic_server Version: Apache Traffic Server - t= raffic_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_NOFIL= E(7):cur(361044),max(361044)
Aug 22 22:01:48 ip-172-31-8-21 traff= ic_server[14384]: NOTE: --- traffic_server Starting ---

4. Also searching the internet I found that ther= e was no support for ATS on Windows. I wanted to reconfirm the same here. C= an someone please confirm this for me?

Thanks,
Vishwas




--047d7b414326e4b25b051e06bcba--