You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Lei Sun <le...@gmail.com> on 2020/11/30 04:50:27 UTC

Help needed to get ts_lua working

Hi Guys,

I'm trying to setup ATS with LUA. I started the server no problem, and
didn't see any issues loading the LUA plugin.

leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
> traffic_server: using root directory '/usr/local'
> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered config
> string proxy.config.plugin.lua.max_states: with default [256]
> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found
> proxy.config.plugin.lua.max_states: [256]
>

However, as I was curling the server, and the ATS seems to be doing it's
proxy job fine, but I cannot see any logs coming out of the following LUA
script.

> function send_request()
> local uri = ts.server_request.get_uri()
> ts.debug(uri)
> ts.note('send_request')
> ts.error('send_request')
> ts.warning('send_request')
> end
>
> function do_remap()
> ts.note('do_remap')
> ts.error('do_remap')
> ts.warning('do_remap')
> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
> return 0
> end
>

I spent 2 full days searching online, and didn't get much luck.

Could someone please let me know what I missed?

PS - how do I get invited to the Slack channel please?

Thank you so much!
Lei

Re: Help needed to get ts_lua working

Posted by Lei Sun <le...@gmail.com>.
Here is my records.config
>
> CONFIG proxy.config.diags.debug.enabled INT 1
> CONFIG proxy.config.diags.debug.tags STRING ts_lua|http|dns
>

Here is the curl request

> $ curl --proxy http://127.0.0.1:8080 http://httpbin.org/get?answer=43 -v
> *   Trying 127.0.0.1...
> * TCP_NODELAY set
> * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> > GET http://httpbin.org/get?answer=43 HTTP/1.1
> > Host: httpbin.org
> > User-Agent: curl/7.54.0
> > Accept: */*
> > Proxy-Connection: Keep-Alive
> >
> < HTTP/1.1 200 OK
> < Date: Mon, 30 Nov 2020 04:56:00 GMT
> < Content-Type: application/json
> < Content-Length: 328
> < Server: ATS/10.0.0
> < Access-Control-Allow-Origin: *
> < Access-Control-Allow-Credentials: true
> < Age: 0
> < Proxy-Connection: keep-alive
> <
> {
>   "args": {
>     "answer": "43"
>   },
>   "headers": {
>     "Accept": "*/*",
>     "Client-Ip": "127.0.0.1",
>     "Host": "httpbin.org",
>     "User-Agent": "curl/7.54.0",
>     "X-Amzn-Trace-Id": "Root=1-5fc47b60-0a4141d40331f1945a40e11c"
>   },
>   "origin": "127.0.0.1, 24.28.105.173",
>   "url": "http://httpbin.org/get?answer=43"
> }


I am using ATS/10.0.0, on Mac

Log didn't show up on any of the in traffic.out / diags.log

I used global plugin for LUA in plugin.config

> tslua.so /Users/leisun/dev/ats/test_server_request.lua




On Sun, Nov 29, 2020 at 10:50 PM Lei Sun <le...@gmail.com> wrote:

> Hi Guys,
>
> I'm trying to setup ATS with LUA. I started the server no problem, and
> didn't see any issues loading the LUA plugin.
>
> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
>> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
>> traffic_server: using root directory '/usr/local'
>> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered config
>> string proxy.config.plugin.lua.max_states: with default [256]
>> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found
>> proxy.config.plugin.lua.max_states: [256]
>>
>
> However, as I was curling the server, and the ATS seems to be doing it's
> proxy job fine, but I cannot see any logs coming out of the following LUA
> script.
>
>> function send_request()
>> local uri = ts.server_request.get_uri()
>> ts.debug(uri)
>> ts.note('send_request')
>> ts.error('send_request')
>> ts.warning('send_request')
>> end
>>
>> function do_remap()
>> ts.note('do_remap')
>> ts.error('do_remap')
>> ts.warning('do_remap')
>> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
>> return 0
>> end
>>
>
> I spent 2 full days searching online, and didn't get much luck.
>
> Could someone please let me know what I missed?
>
> PS - how do I get invited to the Slack channel please?
>
> Thank you so much!
> Lei
>
>

Re: Help needed to get ts_lua working

Posted by Lei Sun <le...@gmail.com>.
Very cool!

I will take a crack at it, and come back to you. I have another question,
which I will ask in a different thread.

Thank you so much Kit!

On Wed, Dec 2, 2020 at 4:41 PM Shu Kit Chan <ch...@gmail.com> wrote:

> A couple things to share -
>
> 1) At that time, we also wanted to be a bit lean in the
> implementation. So we also asked people to use a local redis if that
> satisfies their requirements. With luajit, you can integrate with a
> library to interact with a local redis server through unix domain
> socket and just get/set your key/value pairs accordingly .Some example
> here -
> https://github.com/shukitchan/ats_lua_scripts/blob/master/connect_redis.lua
>
> 2) You can check out this PR for some inspiration on how to do this -
> https://github.com/apache/trafficserver/pull/1641
> Although i do think that PR is actually stuffing too much in and also
> can be packaged as a separate lua module instead .
>
> Thanks.
>
> Kit
>
> On Wed, Dec 2, 2020 at 11:40 AM Lei Sun <le...@gmail.com> wrote:
> >
> > Hi Shu,
> >
> > I'd be happy to help!
> >
> > I didn't do much C/C++ other than I was in school. Could you please send
> me a bit more instruction on how to get it going, that would make things
> from impossible to possible for me LOL.
> >
> > Cheers,
> > Lei
> >
> >
> >
> > On Wed, Dec 2, 2020 at 1:28 PM Shu Kit Chan <ch...@gmail.com>
> wrote:
> >>
> >> The shared dict feature was using TCL (for hashtable and related
> >> stuff) and we don't want to add a dependency at that time on TCL. So
> >> we took that feature out when we are adding the plugin to ATS repo. I
> >> think it is not that difficult to add this back in without TCL and
> >> contributions are welcome :)
> >>
> >>
> >> On Tue, Dec 1, 2020 at 10:12 PM Lei Sun <le...@gmail.com> wrote:
> >> >
> >> > Hi Kit,
> >> >
> >> > Thank you so much for your help! I was able to get this working.
> >> >
> >> > I saw on the documentation
> https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is
> the ts.shared.DICT feature. However, I couldn't get it to work according to
> the documentation.
> >> >
> >> > Could you please let me know if I'm missing something?
> >> >
> >> > Thanks,
> >> > Lei
> >> >
> >> >
> >> >
> >> > On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <ch...@gmail.com>
> wrote:
> >> >>
> >> >> Are you running the plugin as a remap plugin or not ?
> >> >>
> >> >> If you are using the lua plugin in plugin.config, then the entry
> >> >> functions are those that start with "do_global_"
> >> >> If you are using it in the remap.config, then the entry function is
> do_remap()
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Kit
> >> >>
> >> >> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
> >> >> >
> >> >> > Hi Guys,
> >> >> >
> >> >> > I'm trying to setup ATS with LUA. I started the server no problem,
> and didn't see any issues loading the LUA plugin.
> >> >> >
> >> >> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server
> -T"ts_lua"
> >> >> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
> >> >> >> traffic_server: using root directory '/usr/local'
> >> >> >> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered
> config string proxy.config.plugin.lua.max_states: with default [256]
> >> >> >> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found
> proxy.config.plugin.lua.max_states: [256]
> >> >> >
> >> >> >
> >> >> > However, as I was curling the server, and the ATS seems to be
> doing it's proxy job fine, but I cannot see any logs coming out of the
> following LUA script.
> >> >> >>
> >> >> >> function send_request()
> >> >> >> local uri = ts.server_request.get_uri()
> >> >> >> ts.debug(uri)
> >> >> >> ts.note('send_request')
> >> >> >> ts.error('send_request')
> >> >> >> ts.warning('send_request')
> >> >> >> end
> >> >> >>
> >> >> >> function do_remap()
> >> >> >> ts.note('do_remap')
> >> >> >> ts.error('do_remap')
> >> >> >> ts.warning('do_remap')
> >> >> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
> >> >> >> return 0
> >> >> >> end
> >> >> >
> >> >> >
> >> >> > I spent 2 full days searching online, and didn't get much luck.
> >> >> >
> >> >> > Could someone please let me know what I missed?
> >> >> >
> >> >> > PS - how do I get invited to the Slack channel please?
> >> >> >
> >> >> > Thank you so much!
> >> >> > Lei
> >> >> >
> >> >
> >> >
> >>
>

Re: Help needed to get ts_lua working

Posted by Shu Kit Chan <ch...@gmail.com>.
A couple things to share -

1) At that time, we also wanted to be a bit lean in the
implementation. So we also asked people to use a local redis if that
satisfies their requirements. With luajit, you can integrate with a
library to interact with a local redis server through unix domain
socket and just get/set your key/value pairs accordingly .Some example
here - https://github.com/shukitchan/ats_lua_scripts/blob/master/connect_redis.lua

2) You can check out this PR for some inspiration on how to do this -
https://github.com/apache/trafficserver/pull/1641
Although i do think that PR is actually stuffing too much in and also
can be packaged as a separate lua module instead .

Thanks.

Kit

On Wed, Dec 2, 2020 at 11:40 AM Lei Sun <le...@gmail.com> wrote:
>
> Hi Shu,
>
> I'd be happy to help!
>
> I didn't do much C/C++ other than I was in school. Could you please send me a bit more instruction on how to get it going, that would make things from impossible to possible for me LOL.
>
> Cheers,
> Lei
>
>
>
> On Wed, Dec 2, 2020 at 1:28 PM Shu Kit Chan <ch...@gmail.com> wrote:
>>
>> The shared dict feature was using TCL (for hashtable and related
>> stuff) and we don't want to add a dependency at that time on TCL. So
>> we took that feature out when we are adding the plugin to ATS repo. I
>> think it is not that difficult to add this back in without TCL and
>> contributions are welcome :)
>>
>>
>> On Tue, Dec 1, 2020 at 10:12 PM Lei Sun <le...@gmail.com> wrote:
>> >
>> > Hi Kit,
>> >
>> > Thank you so much for your help! I was able to get this working.
>> >
>> > I saw on the documentation https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is the ts.shared.DICT feature. However, I couldn't get it to work according to the documentation.
>> >
>> > Could you please let me know if I'm missing something?
>> >
>> > Thanks,
>> > Lei
>> >
>> >
>> >
>> > On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <ch...@gmail.com> wrote:
>> >>
>> >> Are you running the plugin as a remap plugin or not ?
>> >>
>> >> If you are using the lua plugin in plugin.config, then the entry
>> >> functions are those that start with "do_global_"
>> >> If you are using it in the remap.config, then the entry function is do_remap()
>> >>
>> >> Thanks.
>> >>
>> >> Kit
>> >>
>> >> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
>> >> >
>> >> > Hi Guys,
>> >> >
>> >> > I'm trying to setup ATS with LUA. I started the server no problem, and didn't see any issues loading the LUA plugin.
>> >> >
>> >> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
>> >> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
>> >> >> traffic_server: using root directory '/usr/local'
>> >> >> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered config string proxy.config.plugin.lua.max_states: with default [256]
>> >> >> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found proxy.config.plugin.lua.max_states: [256]
>> >> >
>> >> >
>> >> > However, as I was curling the server, and the ATS seems to be doing it's proxy job fine, but I cannot see any logs coming out of the following LUA script.
>> >> >>
>> >> >> function send_request()
>> >> >> local uri = ts.server_request.get_uri()
>> >> >> ts.debug(uri)
>> >> >> ts.note('send_request')
>> >> >> ts.error('send_request')
>> >> >> ts.warning('send_request')
>> >> >> end
>> >> >>
>> >> >> function do_remap()
>> >> >> ts.note('do_remap')
>> >> >> ts.error('do_remap')
>> >> >> ts.warning('do_remap')
>> >> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
>> >> >> return 0
>> >> >> end
>> >> >
>> >> >
>> >> > I spent 2 full days searching online, and didn't get much luck.
>> >> >
>> >> > Could someone please let me know what I missed?
>> >> >
>> >> > PS - how do I get invited to the Slack channel please?
>> >> >
>> >> > Thank you so much!
>> >> > Lei
>> >> >
>> >
>> >
>>

Re: Help needed to get ts_lua working

Posted by Lei Sun <le...@gmail.com>.
Hi Shu,

I'd be happy to help!

I didn't do much C/C++ other than I was in school. Could you please send me
a bit more instruction on how to get it going, that would make things from
impossible to possible for me LOL.

Cheers,
Lei



On Wed, Dec 2, 2020 at 1:28 PM Shu Kit Chan <ch...@gmail.com> wrote:

> The shared dict feature was using TCL (for hashtable and related
> stuff) and we don't want to add a dependency at that time on TCL. So
> we took that feature out when we are adding the plugin to ATS repo. I
> think it is not that difficult to add this back in without TCL and
> contributions are welcome :)
>
>
> On Tue, Dec 1, 2020 at 10:12 PM Lei Sun <le...@gmail.com> wrote:
> >
> > Hi Kit,
> >
> > Thank you so much for your help! I was able to get this working.
> >
> > I saw on the documentation
> https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is
> the ts.shared.DICT feature. However, I couldn't get it to work according to
> the documentation.
> >
> > Could you please let me know if I'm missing something?
> >
> > Thanks,
> > Lei
> >
> >
> >
> > On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <ch...@gmail.com>
> wrote:
> >>
> >> Are you running the plugin as a remap plugin or not ?
> >>
> >> If you are using the lua plugin in plugin.config, then the entry
> >> functions are those that start with "do_global_"
> >> If you are using it in the remap.config, then the entry function is
> do_remap()
> >>
> >> Thanks.
> >>
> >> Kit
> >>
> >> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
> >> >
> >> > Hi Guys,
> >> >
> >> > I'm trying to setup ATS with LUA. I started the server no problem,
> and didn't see any issues loading the LUA plugin.
> >> >
> >> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
> >> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
> >> >> traffic_server: using root directory '/usr/local'
> >> >> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered
> config string proxy.config.plugin.lua.max_states: with default [256]
> >> >> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found
> proxy.config.plugin.lua.max_states: [256]
> >> >
> >> >
> >> > However, as I was curling the server, and the ATS seems to be doing
> it's proxy job fine, but I cannot see any logs coming out of the following
> LUA script.
> >> >>
> >> >> function send_request()
> >> >> local uri = ts.server_request.get_uri()
> >> >> ts.debug(uri)
> >> >> ts.note('send_request')
> >> >> ts.error('send_request')
> >> >> ts.warning('send_request')
> >> >> end
> >> >>
> >> >> function do_remap()
> >> >> ts.note('do_remap')
> >> >> ts.error('do_remap')
> >> >> ts.warning('do_remap')
> >> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
> >> >> return 0
> >> >> end
> >> >
> >> >
> >> > I spent 2 full days searching online, and didn't get much luck.
> >> >
> >> > Could someone please let me know what I missed?
> >> >
> >> > PS - how do I get invited to the Slack channel please?
> >> >
> >> > Thank you so much!
> >> > Lei
> >> >
> >
> >
>
>

Re: Help needed to get ts_lua working

Posted by Shu Kit Chan <ch...@gmail.com>.
The shared dict feature was using TCL (for hashtable and related
stuff) and we don't want to add a dependency at that time on TCL. So
we took that feature out when we are adding the plugin to ATS repo. I
think it is not that difficult to add this back in without TCL and
contributions are welcome :)


On Tue, Dec 1, 2020 at 10:12 PM Lei Sun <le...@gmail.com> wrote:
>
> Hi Kit,
>
> Thank you so much for your help! I was able to get this working.
>
> I saw on the documentation https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is the ts.shared.DICT feature. However, I couldn't get it to work according to the documentation.
>
> Could you please let me know if I'm missing something?
>
> Thanks,
> Lei
>
>
>
> On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <ch...@gmail.com> wrote:
>>
>> Are you running the plugin as a remap plugin or not ?
>>
>> If you are using the lua plugin in plugin.config, then the entry
>> functions are those that start with "do_global_"
>> If you are using it in the remap.config, then the entry function is do_remap()
>>
>> Thanks.
>>
>> Kit
>>
>> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
>> >
>> > Hi Guys,
>> >
>> > I'm trying to setup ATS with LUA. I started the server no problem, and didn't see any issues loading the LUA plugin.
>> >
>> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
>> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
>> >> traffic_server: using root directory '/usr/local'
>> >> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered config string proxy.config.plugin.lua.max_states: with default [256]
>> >> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found proxy.config.plugin.lua.max_states: [256]
>> >
>> >
>> > However, as I was curling the server, and the ATS seems to be doing it's proxy job fine, but I cannot see any logs coming out of the following LUA script.
>> >>
>> >> function send_request()
>> >> local uri = ts.server_request.get_uri()
>> >> ts.debug(uri)
>> >> ts.note('send_request')
>> >> ts.error('send_request')
>> >> ts.warning('send_request')
>> >> end
>> >>
>> >> function do_remap()
>> >> ts.note('do_remap')
>> >> ts.error('do_remap')
>> >> ts.warning('do_remap')
>> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
>> >> return 0
>> >> end
>> >
>> >
>> > I spent 2 full days searching online, and didn't get much luck.
>> >
>> > Could someone please let me know what I missed?
>> >
>> > PS - how do I get invited to the Slack channel please?
>> >
>> > Thank you so much!
>> > Lei
>> >
>
>
>
> --
> Stay Hungry, Stay Foolish.
> Lei Sun
> Cell: 408-306-9199

Re: Help needed to get ts_lua working

Posted by Lei Sun <le...@gmail.com>.
Hi Kit,

Thank you so much for your help! I was able to get this working.

I saw on the documentation
https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is
the ts.shared.DICT feature. However, I couldn't get it to work according to
the documentation.

Could you please let me know if I'm missing something?

Thanks,
Lei



On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <ch...@gmail.com> wrote:

> Are you running the plugin as a remap plugin or not ?
>
> If you are using the lua plugin in plugin.config, then the entry
> functions are those that start with "do_global_"
> If you are using it in the remap.config, then the entry function is
> do_remap()
>
> Thanks.
>
> Kit
>
> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
> >
> > Hi Guys,
> >
> > I'm trying to setup ATS with LUA. I started the server no problem, and
> didn't see any issues loading the LUA plugin.
> >
> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
> >> traffic_server: using root directory '/usr/local'
> >> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered
> config string proxy.config.plugin.lua.max_states: with default [256]
> >> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found
> proxy.config.plugin.lua.max_states: [256]
> >
> >
> > However, as I was curling the server, and the ATS seems to be doing it's
> proxy job fine, but I cannot see any logs coming out of the following LUA
> script.
> >>
> >> function send_request()
> >> local uri = ts.server_request.get_uri()
> >> ts.debug(uri)
> >> ts.note('send_request')
> >> ts.error('send_request')
> >> ts.warning('send_request')
> >> end
> >>
> >> function do_remap()
> >> ts.note('do_remap')
> >> ts.error('do_remap')
> >> ts.warning('do_remap')
> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
> >> return 0
> >> end
> >
> >
> > I spent 2 full days searching online, and didn't get much luck.
> >
> > Could someone please let me know what I missed?
> >
> > PS - how do I get invited to the Slack channel please?
> >
> > Thank you so much!
> > Lei
> >
>


-- 
Stay Hungry, Stay Foolish.
Lei Sun
Cell: 408-306-9199

Re: Help needed to get ts_lua working

Posted by Shu Kit Chan <ch...@gmail.com>.
Are you running the plugin as a remap plugin or not ?

If you are using the lua plugin in plugin.config, then the entry
functions are those that start with "do_global_"
If you are using it in the remap.config, then the entry function is do_remap()

Thanks.

Kit

On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <le...@gmail.com> wrote:
>
> Hi Guys,
>
> I'm trying to setup ATS with LUA. I started the server no problem, and didn't see any issues loading the LUA plugin.
>
>> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua"
>> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local
>> traffic_server: using root directory '/usr/local'
>> [Nov 29 22:43:54.442]  DIAG: (ts_lua) [create_lua_vms] registered config string proxy.config.plugin.lua.max_states: with default [256]
>> [Nov 29 22:43:54.443]  DIAG: (ts_lua) [create_lua_vms] found proxy.config.plugin.lua.max_states: [256]
>
>
> However, as I was curling the server, and the ATS seems to be doing it's proxy job fine, but I cannot see any logs coming out of the following LUA script.
>>
>> function send_request()
>> local uri = ts.server_request.get_uri()
>> ts.debug(uri)
>> ts.note('send_request')
>> ts.error('send_request')
>> ts.warning('send_request')
>> end
>>
>> function do_remap()
>> ts.note('do_remap')
>> ts.error('do_remap')
>> ts.warning('do_remap')
>> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
>> return 0
>> end
>
>
> I spent 2 full days searching online, and didn't get much luck.
>
> Could someone please let me know what I missed?
>
> PS - how do I get invited to the Slack channel please?
>
> Thank you so much!
> Lei
>