From users-return-7249-apmail-trafficserver-users-archive=trafficserver.apache.org@trafficserver.apache.org Thu Oct 4 05:00:06 2018 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 2FF701E55B for ; Thu, 4 Oct 2018 05:00:06 +0000 (UTC) Received: (qmail 61565 invoked by uid 500); 4 Oct 2018 05:00:05 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 61491 invoked by uid 500); 4 Oct 2018 05:00:05 -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 61481 invoked by uid 99); 4 Oct 2018 05:00:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2018 05:00:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E4172C0C52 for ; Thu, 4 Oct 2018 04:50:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.999 X-Spam-Level: * X-Spam-Status: No, score=1.999 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_SHORT=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=evolutiondigital.onmicrosoft.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id JyRjr3eYl8vg for ; Thu, 4 Oct 2018 04:50:07 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0111.outbound.protection.outlook.com [104.47.36.111]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DA3B25F18F for ; Thu, 4 Oct 2018 04:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EvolutionDigital.onmicrosoft.com; s=selector1-evolutiondigital-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z7jZfGiwYAAn+pQ05txZj/NTLZTCJuYxuHggzuzhb68=; b=JFFFlj7OLae3xB9cSJJ7+bTQa7Q8BnGz1/SmaNcEv5MFjldiuGThQEwu72daqb57APD21lHgcyIRVcHaT+eiWvb4GizEnyo1w77CcEw6qOLXggB7pUynCyXb6KpYQ6Jm783yvVfd/g9Qg+LKxZnkujU0F5JXyyN9jhm9aq+t0WQ= Received: from SN6PR02MB5677.namprd02.prod.outlook.com (20.177.251.219) by SN6PR02MB4399.namprd02.prod.outlook.com (52.135.119.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.20; Thu, 4 Oct 2018 04:49:57 +0000 Received: from SN6PR02MB5677.namprd02.prod.outlook.com ([fe80::6c77:73be:a271:4c1a]) by SN6PR02MB5677.namprd02.prod.outlook.com ([fe80::6c77:73be:a271:4c1a%5]) with mapi id 15.20.1207.022; Thu, 4 Oct 2018 04:49:57 +0000 From: Vasanth Mathivanan To: "users@trafficserver.apache.org" Subject: RE: How to use lua plugin and Scripts in Traffic server ? Thread-Topic: How to use lua plugin and Scripts in Traffic server ? Thread-Index: AQHUWYffEkpR5rlSVUeOcXtSsFqPdqUK1siAgAIvqrKAABILgIAABeqbgACtMgCAALy72g== Date: Thu, 4 Oct 2018 04:49:56 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=vasanth.m@evolutiondigital.com; x-originating-ip: [119.82.113.58] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN6PR02MB4399;6:xg2Ic19+uA3SfgKqNTH9J/YQaDVeRah7WUPQeQG232J79SO4MlbdRW+iqcB3VBAmkDZF4uRu0Q0tdGLC9QmlWCxAMa5IV99hqBnERDY/RMas9A8YrpXbFhqsFo7DHZKErWYXV3dFD2K3XshLk/T/6lHWGCIj7E8EBAWH7O978Elaut5h5QDuZmV2MXEQFztqwmxLRK3I4KuV+SGYG0/c6aMD347/k5LkgCJjhVWixPiVugyhKk69x+6JnrmapRR14CK7YkQ1+DkNovhrxw+xrvdrRVXb25QI6ohAe5ifRn8vmjY6OidIbpB+UG7ObZhGfgbIvVJy1KZJKEgp+iYlIj4PZzwtwCidUP1C5i146cdn5xuSv/ElWc6WVosdnECqf5Noy97RWLlIiMq+f562ks2QA/HZFaerciDXCRE4FDdULzKMcLc+lqF/qywt3aSHe5hO3DDULU6TJ0bWPByYuA==;5:T6xJfmVDZd1IIDXcliyIoWggfhAWKcm+1gCNCNu3s25Fn++vQ3maAXiVfkqcrTakaydfaxB29zKADkuqFBIgXh0qYqi08XPWpADlLbg0rEvT7aqCeJATl2Ec6x2CcU5aW4Pu7Ot59HiD0YYxckEhHl82lEwUca/9h4oUseG5Kt4=;7:y9thufInYxYCik500JhFWY+5L+oLoxOnsQ/wIzlScv4Ib/NfQiuMvbG/60ljOSqrDpwKiFFdkXaG7i7zYbOPvOIdSLpN83VOZiORaRkgucPIlDydLuO+N0nUaEb/1+UJLE2m4uIHZUs/rUjt+wWbGjRJLvTHQmjeqswir9+PIoJpI4RSxc8Q+79eQ+2uRoQweQ3nsuft45dsWbtohu4tIoe2+elxrQ4Y2+TmCUjNrH7DCSbf4NJU6fQ5TBzAuHNC x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: bda104cf-331f-46fe-23d7-08d629b4d595 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR02MB4399; x-ms-traffictypediagnostic: SN6PR02MB4399: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(156600954879566)(28532068793085)(85827821059158); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(4982022)(52105095)(149066)(150057)(6041310)(2016111802025)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6043046)(201708071742011)(7699051);SRVR:SN6PR02MB4399;BCL:0;PCL:0;RULEID:;SRVR:SN6PR02MB4399; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(376002)(346002)(396003)(136003)(39840400004)(279900001)(189003)(199004)(93886005)(71200400001)(71190400001)(8676002)(6916009)(76176011)(229853002)(86362001)(7696005)(99286004)(508600001)(5250100002)(2900100001)(6436002)(54896002)(5640700003)(5660300001)(6306002)(55016002)(9686003)(236005)(2351001)(1730700003)(81166006)(81156014)(14454004)(53936002)(106356001)(19627235002)(966005)(105586002)(2501003)(256004)(14444005)(2906002)(66066001)(446003)(25786009)(476003)(97736004)(33656002)(8936002)(68736007)(26005)(19625305001)(186003)(606006)(7736002)(74316002)(6506007)(6116002)(3846002)(316002)(11346002)(6246003)(486006)(53546011)(102836004);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR02MB4399;H:SN6PR02MB5677.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: evolutiondigital.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: sy9kGbchZiFOpljxYM30E7G5rxKtbqFGBTP3vGtc6NxIXTJ0hPcl/viebvAKOAzNYPxKnZpRdid2SlAWY4q20kBXM5GcjLmdTCAeg2XriuHT4gDWGLaB5DDuPyjyeuF3v3Kf9wWYQFc2F5KfGQL9af3PvppcUbkS3lvErgABmxtUzp/hs5uMMQxIQpCcB/j6id0WSxlHZTmnWGyTjmb6m/yj6KwnmIWjRioIVraFwSVKmX4Dek2qUDd5yJfoDvjo+RutM0vhwQ9pd/9RrZgFoJL1czWAnXQgLBkfiO7J5GxcifO6pmalHCSaBq+lEcYDsUrERaSdHn2XfRbb3TcN+QO4Kq7vqPjFMddaaAAS4XY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_SN6PR02MB56776421FDD37F7F1945CD6A82EA0SN6PR02MB5677namp_" MIME-Version: 1.0 X-OriginatorOrg: evolutiondigital.com X-MS-Exchange-CrossTenant-Network-Message-Id: bda104cf-331f-46fe-23d7-08d629b4d595 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2018 04:49:57.0104 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bd8c036a-03f2-4631-b493-66cb6d911456 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4399 --_000_SN6PR02MB56776421FDD37F7F1945CD6A82EA0SN6PR02MB5677namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes that I did but nothing to see any updates in diags.logs about lua plugi= n Here the logs on below : [Oct 3 21:41:09.405] Server {0x2ae65d787240} WARNING: connection throttle = too high, 165585 (throttle) + 192 (internal use) > 165585 (file descriptor = limit), using throttle of 165393 [Oct 3 21:41:09.405] Server {0x2ae65d787240} NOTE: cache clustering disabl= ed [Oct 3 21:41:09.437] Server {0x2ae65d787240} NOTE: ip_allow.config updated= , reloading [Oct 3 21:41:09.795] Server {0x2ae65d787240} NOTE: cache clustering disabl= ed [Oct 3 21:41:09.797] Server {0x2ae65d787240} NOTE: logging initialized[3],= logging_mode =3D 3 [Oct 3 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/tr= afficserver/libexec/trafficserver/astats_over_http.so' [Oct 3 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/tr= afficserver/libexec/trafficserver/regex_revalidate.so' [Oct 3 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/tr= afficserver/libexec/trafficserver/remap_stats.so' [Oct 3 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/tr= afficserver/libexec/trafficserver/stale_while_revalidate.so' [Oct 3 21:41:09.800] Server {0x2ae65d787240} NOTE: loading SSL certificate= configuration from /opt/trafficserver/etc/trafficserver/ssl_multicert.conf= ig [Oct 3 21:41:09.961] Server {0x2ae664f1c700} NOTE: cache enabled [Oct 3 21:41:10.042] Server {0x2ae65d787240} NOTE: traffic server running [Oct 3 21:41:14.346] Server {0x2ae664100700} WARNING: failover: connection= to DNS server 10.137.10.115 lost, move to 10.150.1.15 _Vasanth Sent from Mail for Window= s 10 From: Shu Kit Chan Sent: Wednesday, October 3, 2018 11:04 PM To: users@trafficserver.apache.org Subject: Re: How to use lua plugin and Scripts in Traffic server ? You need to provide a full path to the lua script. e.g. "@plugin=3Dtslua.so @pparam=3D/tmp/cache.lua" Thanks. Kit On Wed, Oct 3, 2018 at 12:16 AM Vasanth Mathivanan wrote: > > Now It accessible the plugin but have some script issue > > [Oct 3 00:06:29.598] Server {0x2aaabed91700} ERROR: [ReverseProxy] faile= d to add remap rule at /opt/trafficserver/etc/trafficserver/remap.config li= ne 2: Failed to create instance for plugin "/opt/trafficserver/libexec/traf= ficserver/tslua.so": [ts_lua_add_module] luaL_loadstring failed: [string "= cache.lua"]:1: '=3D' expected near '' > > [Oct 3 00:06:29.598] Server {0x2aaabed91700} WARNING: something failed d= uring BuildTable() -- check your remap plugins! > > [Oct 3 00:06:29.598] Server {0x2aaabed91700} WARNING: failed to reload r= emap.config, not replacing! > > > > > > _ Vasanth > > Sent from Mail for Windows 10 > > > > From: Shu Kit Chan > Sent: Wednesday, October 3, 2018 12:23 PM > To: users@trafficserver.apache.org > Subject: Re: How to use lua plugin and Scripts in Traffic server ? > > > > It looks like the lua plugin cannot find your lua script. I think you > should not be using "@@pparam" . Instead can you try just using > "@pparam" ? > > Thanks. > > Kit > On Tue, Oct 2, 2018 at 10:49 PM Vasanth Mathivanan > wrote: > > > > Hi Chan, > > > > > > > > 1.We had ATS 6.2 in Centos 6 > > > > > > > > 2.Remap rules looks like below : > > > > # DO NOT EDIT - Generated for edge1 by Traffic Ops (https://x.x.x.x= ) on Wed May 30 09:22:41 EDT 2018 > > > > map http://x.x.x.x:8082/ http://x.x.x.x/ @plugin=3Dheader_rew= rite.so @pparam=3Ddscp/set_dscp_32.config @plugin=3Dheader_rewrite.so @ppar= am=3Dhdr_rw_live.config @plugin=3Dbackground_fetch.so @pparam=3Dbg_fetch.co= nfig @plugin=3Dcollapsed_forwarding.so @plugin=3Dtslua.so @@pparam=3Dlua_t= est.lua > > > > map http://x.x.x.x:8082/ http://x.x.x.x/ @plugin=3Dheader_rew= rite.so @pparam=3Ddscp/set_dscp_0.config @plugin=3Dbackground_fetch.so @ppa= ram=3Dbg_fetch.config @plugin=3Dcollapsed_forwarding.so @plugin=3Dtslua.so = @@pparam=3Dlua_test.lua > > > > > > > > note: I tried to given entire path in @@pparm syntax like @@pparam=3D/o= pt/trafficserver/libexec/trafficserver/test_lua.lua > > > > > > > > > > > > 3.Lua Script looks like : > > > > > > > > function cache_lookup() > > > > local cache_status =3D ts.http.get_cache_lookup_status() > > > > if cache_status =3D=3D TS_LUA_CACHE_LOOKUP_HIT_FRESH then > > > > print('hit') > > > > else > > > > print('not hit') > > > > end > > > > ts.http.set_cache_lookup_status(TS_LUA_CACHE_LOOKUP_MISS) > > > > end > > > > > > > > function do_remap() > > > > ts.hook(TS_LUA_HOOK_CACHE_LOOKUP_COMPLETE, cache_lookup) > > > > return 0 > > > > end > > > > > > > > 4.yes I did curl method only . > > > > > > > > [root@wow-den-stremer174 ~]# curl -I x.x.x.x:8082 > > > > TTP/1.1 404 Not Found on Accelerator > > > > Date: Wed, 03 Oct 2018 05:13:23 GMT > > > > Connection: keep-alive > > > > Via: http/1.1 x.x.x.x. (ApacheTrafficServer/6.2.3 [uSc s f p eS:tNc i = p s ]) > > > > Server: ATS/6.2.3 > > > > Cache-Control: no-store > > > > Content-Type: text/html > > > > Content-Language: en > > > > Content-Length: 297 > > > > > > > > 5.Diags log: > > > > > > > > > > > > [Oct 2 22:38:33.537] Server {0x2b25ed7fd240} ERROR: [ReverseProxy] fai= led to add remap rule at /opt/trafficserver/etc/trafficserver/remap.config = line 2: Failed to create instance for plugin "/opt/trafficserver/libexec/tr= afficserver/tslua.so": [TSRemapNewInstance] - lua script file or string is = required !! > > > > > > > > > > > > Note : traffic.out and error.log nothing to do . > > > > > > > > -Vasanth > > > > > > > > Sent from Mail for Windows 10 > > > > > > > > From: Shu Kit Chan > > Sent: Tuesday, October 2, 2018 1:55 AM > > To: users@trafficserver.apache.org > > Subject: Re: How to use lua plugin and Scripts in Traffic server ? > > > > > > > > A few things > > > > 1) What version of ATS are you on? 5.3.x ? > > 2) Can you show how your remap rules looks like? > > 3) you use the example lua script? if not, what is written in your scri= pt? > > 4) how do you test that? curl a url that goes against your machine? > > 5) Any messages in traffic.out / error.log / diags.log that is of inter= est ? > > > > Thanks. > > > > Kit > > On Mon, Oct 1, 2018 at 6:08 AM Vasanth Mathivanan > > wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > > As per document I saw lot of examples in this https://docs.trafficser= ver.apache.org/en/5.3.x/reference/plugins/ts_lua.en.html#ts-lua-plugin I = did the remap config changes ( plugin and parameters ) then make a script= file in some path and pointed on remap Config .There is no response on i= t . > > > > > > How I could use in traffic server and also test them ? > > > > > > > > > > > > -Vasanth > > > > > > > > > > > > Sent from Mail for Windows 10 > > > > > > --_000_SN6PR02MB56776421FDD37F7F1945CD6A82EA0SN6PR02MB5677namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Yes that I did but nothing to see any updates in d= iags.logs about lua plugin

 

Here the logs on below :

[Oct  3 21:41:09.405] Server {0x2= ae65d787240} WARNING: connection throttle too high, 165585 (throttle) += 192 (internal use) > 165585 (file descriptor limit), using throttle of = 165393

[Oct  3 = 21:41:09.405] Server {0x2ae65d787240} NOTE: cache clustering disabled

[Oct  3 = 21:41:09.437] Server {0x2ae65d787240} NOTE: ip_allow.config updated, reload= ing

[Oct  3 = 21:41:09.795] Server {0x2ae65d787240} NOTE: cache clustering disabled

[Oct  3 = 21:41:09.797] Server {0x2ae65d787240} NOTE: logging initialized[3], logging= _mode =3D 3

[Oct  3 = 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/trafficser= ver/libexec/trafficserver/astats_over_http.so'

[Oct  3 = 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/trafficser= ver/libexec/trafficserver/regex_revalidate.so'

[Oct  3 = 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/trafficser= ver/libexec/trafficserver/remap_stats.so'

[Oct  3 = 21:41:09.798] Server {0x2ae65d787240} NOTE: loading plugin '/opt/trafficser= ver/libexec/trafficserver/stale_while_revalidate.so'

[Oct  3 = 21:41:09.800] Server {0x2ae65d787240} NOTE: loading SSL certificate configu= ration from /opt/trafficserver/etc/trafficserver/ssl_multicert.config

[Oct  3 = 21:41:09.961] Server {0x2ae664f1c700} NOTE: cache enabled

[Oct  3 = 21:41:10.042] Server {0x2ae65d787240} NOTE: traffic server running

[Oct  3 = 21:41:14.346] Server {0x2ae664100700} WARNING: failover: connection to DNS = server 10.137.10.115 lost, move to 10.150.1.15

 

_Vasanth

Sent from Mail for Windows 10

 

From: Shu Kit Chan
Sent: Wednesday, October 3, 2018 11:04 PM
To: users@traffics= erver.apache.org
Subject: Re: How to use lua plugin and Scripts in Traffic server ?

 

You need to provide a full path to the lua script.= e.g.

"@plugin=3Dtslua.so @pparam=3D/tmp/cache.lua"

Thanks.

Kit

On Wed, Oct 3, 2018 at 12:16 AM Vasanth Mathivanan
<vasanth.m@evolutiondigital.com> wrote:
>
> Now It  accessible the plugin but have some script issue
>
> [Oct  3 00:06:29.598] Server {0x2aaabed91700} ERROR: [ReverseProx= y] failed to add remap rule at /opt/trafficserver/etc/trafficserver/remap.c= onfig line 2: Failed to create instance for plugin "/opt/trafficserver= /libexec/trafficserver/tslua.so": [ts_lua_add_module] luaL_loadstring  failed: [string "cache.lua"]:1: '=3D' expe= cted near '<eof>'
>
> [Oct  3 00:06:29.598] Server {0x2aaabed91700} WARNING: something = failed during BuildTable() -- check your remap plugins!
>
> [Oct  3 00:06:29.598] Server {0x2aaabed91700} WARNING: failed to = reload remap.config, not replacing!
>
>
>
>
>
> _ Vasanth
>
> Sent from Mail for Windows 10
>
>
>
> From: Shu Kit Chan
> Sent: Wednesday, October 3, 2018 12:23 PM
> To: users@trafficserver.apache.org
> Subject: Re: How to use lua plugin and Scripts in Traffic server ?
>
>
>
> It looks like the lua plugin cannot find your lua script. I think you<= br> > should not be using "@@pparam" . Instead can you try just us= ing
> "@pparam" ?
>
> Thanks.
>
> Kit
> On Tue, Oct 2, 2018 at 10:49 PM Vasanth Mathivanan
> <vasanth.m@evolutiondigital.com> wrote:
> >
> > Hi Chan,
> >
> >
> >
> > 1.We had ATS 6.2 in Centos 6
> >
> >
> >
> > 2.Remap rules looks like below :
> >
> >     # DO NOT EDIT - Generated for edge1 by Tr= affic Ops (https://x.x.x.x) on Wed May 30 0= 9:22:41 EDT 2018
> >
> > map       http://x.x.x.x:8082/     http://x.x.x.x/ @plugin=3Dheader_rewrite.so @pparam=3Ddscp/set_dscp_32.= config @plugin=3Dheader_rewrite.so @pparam=3Dhdr_rw_live.config @plugin=3Db= ackground_fetch.so @pparam=3Dbg_fetch.config @plugin=3Dcollapsed_forwarding= .so  @plugin=3Dtslua.so @@pparam=3Dlua_test.lua
> >
> > map       http://x.x.x.x:8082/     http://x.x.x.x/ @plugin=3Dheader_rewrite.so @pparam=3Ddscp/set_dscp_0.c= onfig @plugin=3Dbackground_fetch.so @pparam=3Dbg_fetch.config @plugin=3Dcol= lapsed_forwarding.so @plugin=3Dtslua.so @@pparam=3Dlua_test.lua
> >
> >
> >
> > note: I tried to given entire path in @@pparm syntax like @@ppara= m=3D/opt/trafficserver/libexec/trafficserver/test_lua.lua
> >
> >
> >
> >
> >
> > 3.Lua Script looks like :
> >
> >
> >
> >    function cache_lookup()
> >
> >     local cache_status =3D ts.http.get_cache_= lookup_status()
> >
> >     if cache_status =3D=3D TS_LUA_CACHE_LOOKU= P_HIT_FRESH then
> >
> >         print('hit')
> >
> >     else
> >
> >         print('not hit')<= br> > >
> >     end
> >
> >     ts.http.set_cache_lookup_status(TS_LUA_CA= CHE_LOOKUP_MISS)
> >
> > end
> >
> >
> >
> > function do_remap()
> >
> >     ts.hook(TS_LUA_HOOK_CACHE_LOOKUP_COMPLETE= , cache_lookup)
> >
> >     return 0
> >
> > end
> >
> >
> >
> > 4.yes I did curl method only .
> >
> >
> >
> > [root@wow-den-stremer174 ~]# curl -I x.x.x.x:8082
> >
> > TTP/1.1 404 Not Found on Accelerator
> >
> > Date: Wed, 03 Oct 2018 05:13:23 GMT
> >
> > Connection: keep-alive
> >
> > Via: http/1.1 x.x.x.x. (ApacheTrafficServer/6.2.3 [uSc s f p eS:t= Nc  i p s ])
> >
> > Server: ATS/6.2.3
> >
> > Cache-Control: no-store
> >
> > Content-Type: text/html
> >
> > Content-Language: en
> >
> > Content-Length: 297
> >
> >
> >
> > 5.Diags log:
> >
> >
> >
> >
> >
> > [Oct  2 22:38:33.537] Server {0x2b25ed7fd240} ERROR: [Revers= eProxy] failed to add remap rule at /opt/trafficserver/etc/trafficserver/re= map.config line 2: Failed to create instance for plugin "/opt/traffics= erver/libexec/trafficserver/tslua.so": [TSRemapNewInstance] - lua script file or string is required !!
> >
> >
> >
> >
> >
> > Note : traffic.out and error.log nothing to do .
> >
> >
> >
> > -Vasanth
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
> >
> > From: Shu Kit Chan
> > Sent: Tuesday, October 2, 2018 1:55 AM
> > To: users@trafficserver.apache.org
> > Subject: Re: How to use lua plugin and Scripts in Traffic server = ?
> >
> >
> >
> > A few things
> >
> > 1) What version of ATS are you on? 5.3.x ?
> > 2) Can you show how your remap rules looks like?
> > 3) you use the example lua script? if not, what is written in you= r script?
> > 4) how do you test that? curl a url that goes against your machin= e?
> > 5) Any messages in traffic.out / error.log / diags.log that is of= interest ?
> >
> > Thanks.
> >
> > Kit
> > On Mon, Oct 1, 2018 at 6:08 AM Vasanth Mathivanan
> > <vasanth.m@evolutiondigital.com> wrote:
> > >
> > >
> > >
> > > Hi,
> > >
> > >
> > >
> > > As per document I saw lot of examples in this https://docs.trafficserver.apache.org/en/5.3.x/reference/plugins/ts_lua.en.= html#ts-lua-plugin   I did the  remap config changes&nbs= p; ( plugin and parameters ) then make a script file in some path and = pointed on remap  Config .There is no response on it .
> > >
> > > How I could use in traffic server  and also test them&n= bsp; ?
> > >
> > >
> > >
> > > -Vasanth
> > >
> > >
> > >
> > > Sent from Mail for Windows 10
> > >
> > >
--_000_SN6PR02MB56776421FDD37F7F1945CD6A82EA0SN6PR02MB5677namp_--