bungle / lua-resty-session

Session library for OpenResty – flexible and secure
BSD 2-Clause "Simplified" License
318 stars 111 forks source link

prob setting a compressor (zlib) #154

Open AramshamFedaykin opened 1 year ago

AramshamFedaykin commented 1 year ago

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 ?

jvarruda commented 1 year ago

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 commented 1 year ago

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

AramshamFedaykin commented 12 months ago

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...