Open saurabhmehta86 opened 4 years ago
i have the same issue
[C]: in function 'require'
/usr/local/openresty/nginx/base-validation.lua:2: in main chunk, client: 10.40.18.231, server: fsmcez.adrem.ro, request: "POST /be-mdm/api/KioskMode/GroupCount HTTP/1.1", host: "fsmcez.adrem.ro", referrer: "https://fsmcez.adrem.ro/mdm/app/browser/kioskMode"
2021/08/13 13:19:30 [error] 11819#11819: *89 lua entry thread aborted: runtime error: /usr/local/openresty/nginx/base-validation.lua:2: module 'resty.jwt' not found: no field package.preload['resty.jwt'] no file '/usr/local/openresty/site/lualib/resty/jwt.ljbc' no file '/usr/local/openresty/site/lualib/resty/jwt/init.ljbc' no file '/usr/local/openresty/lualib/resty/jwt.ljbc' no file '/usr/local/openresty/lualib/resty/jwt/init.ljbc' no file '/usr/local/openresty/site/lualib/resty/jwt.lua' no file '/usr/local/openresty/site/lualib/resty/jwt/init.lua' no file '/usr/local/openresty/lualib/resty/jwt.lua' no file '/usr/local/openresty/lualib/resty/jwt/init.lua' no file './resty/jwt.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/resty/jwt.lua' no file '/usr/local/share/lua/5.1/resty/jwt.lua' no file '/usr/local/share/lua/5.1/resty/jwt/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/resty/jwt.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/resty/jwt/init.lua' no file '/usr/local/openresty/site/lualib/resty/jwt.so' no file '/usr/local/openresty/lualib/resty/jwt.so' no file './resty/jwt.so' no file '/usr/local/lib/lua/5.1/resty/jwt.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/resty/jwt.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/usr/local/openresty/site/lualib/resty.so' no file '/usr/local/openresty/lualib/resty.so' no file './resty.so' no file '/usr/local/lib/lua/5.1/resty.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/resty.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: coroutine 0: [C]: in function 'require' /usr/local/openresty/nginx/base-validation.lua:2: in main chunk, client: 10.40.18.231, server: fsmcez.adrem.ro, request: "POST /be-mdm/api/KioskMode/GetRequests HTTP/1.1", host: "fsmcez.adrem.ro", referrer: "https://fsmcez.adrem.ro/mdm/app/browser/kioskMode"
did you fixed?
I don't believe I was able to recreate when this was originally posted. Let me test this weekend and will respond with my findings.
Working with nginx r21.
I need to decode jwt token and extract the value of a key out of it. I have downloaded the following libs
All above mentioned libs are present in /etc/nginx/saurabh/
Nginx.conf
load_module /etc/nginx/ndk_http_module.so; load_module /etc/nginx/ngx_http_lua_module.so; .... http { lua_package_path "/etc/nginx/saurabh/*/lib/?.lua;;"; .... server{ .... rewrite_by_lua_file test.lua; .... } }
test.lua
function validate()
print("<-----Starting validate Client IP----->"); print("<-----r.uri-------------------------->", ngx.var.uri);
end
validate()
Error Message
2020/10/31 17:31:28 [error] 12#12: *17 lua entry thread aborted: runtime error: /etc/nginx/test.lua:21: module 'cjson' not found: no field package.preload['cjson'] no file '/etc/nginx/saurabh/lua-resty-jwt/lib/cjson.lua' no file './cjson.lua' no file '/usr/share/nginx-luajit-2.1/cjson.lua' no file '/usr/local/share/lua/5.1/cjson.lua' no file '/usr/local/share/lua/5.1/cjson/init.lua' no file '/usr/share/lua/5.1/cjson.lua' no file '/usr/share/lua/5.1/cjson/init.lua' no file './cjson.so' no file '/usr/local/lib/lua/5.1/cjson.so' no file '/usr/lib/lua/5.1/cjson.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: coroutine 0: [C]: in function 'require' /etc/nginx/test.lua:21: in function 'validate' /etc/nginx/test.lua:29: in main chunk,