lua-resty-session icon indicating copy to clipboard operation
lua-resty-session copied to clipboard

prob setting a compressor (zlib)

Open AramshamFedaykin opened this issue 3 years ago • 3 comments

Hello,

I tried to add a compressor in an nginx ingress controller via set $session_compressor zlib;, but I get this error :

lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/session.lua:569: attempt to index local 'com' (a number value) stack traceback: coroutine 0: /usr/local/share/lua/5.1/resty/session.lua: in function 'new' /usr/local/share/lua/5.1/resty/session.lua:581: in function 'open' /usr/local/share/lua/5.1/resty/session.lua:621: in function 'start' /usr/local/share/lua/5.1/resty/openidc.lua:1708: in function 'authenticate' access_by_lua(nginx.conf

I installed lua-ffi-zlib and penlight via luarocks in my dockerfile.

env : k8s v1.21.9 nginx-ingress-controller v1.5.1 (nginx 1.21.6)

Is it a path problem or something else ? Could you please take a look at this ?

AramshamFedaykin avatar Dec 22 '22 11:12 AramshamFedaykin

I got the exact same error

lua entry thread aborted: runtime error: /usr/share/lua/common/resty/session.lua:566: attempt to index local 'com' (a number value) stack traceback: coroutine 0: /usr/share/lua/common/resty/session.lua: in function 'new' /usr/share/lua/common/resty/session.lua:578: in function 'open' /usr/share/lua/common/resty/session.lua:618: in function 'start' /usr/share/lua/common/resty/openidc.lua:1470: in function 'authenticate' /etc/nginx/sso.lua:54: in function 'sso_auth'

env: alpinelinux nginx version: nginx/1.22.1 lua-resty-session v3.8

Any ideas?

jvarruda avatar Sep 13 '23 16:09 jvarruda

In my case it was a missing dependency... the error message is very misleading though.

jvarruda avatar Sep 13 '23 19:09 jvarruda

Oh ! Good to know, could you please tell me what was your missing dependency ?

For my part, I hesitated to continue on the old version, but as long as openidc.lua is using it...

AramshamFedaykin avatar Sep 14 '23 06:09 AramshamFedaykin