The necessary modules nginx-mod-lua-resty-lrucache and nginx-mod-lua-resty-core required for nginx-mod-lua are missing
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 28.5k
- Forks
- 13k
- PR merge metrics
- PR metrics pending
Description
Describe the bug
Greetings. I installed Nginx and nginx-mod-lua via package manager, then I created a file ngx_http_lua.module in /etc/nginx/module.d and added ‘load_module /usr/lib/nginx/modules/ngx_http_lua_module. so;’ to connect the additional module, then I rebooted Nginx but the system log I got the following messages:
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: 2024/10/11 11:56:29 [alert] 5819#0: detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: 2024/10/11 11:56:29 [alert] 5819#0: failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: module 'resty.core' not found:
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no field package.preload['resty.core']
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file './resty/core.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/share/lua/resty/core.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/share/lua/resty/core/init.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/share/lua/resty/core.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/share/lua/resty/core/init.lua'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file './resty/core.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/resty/core.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/resty/core.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/loadall.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file './resty.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/resty.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/resty.so'
Fri Oct 11 11:56:29 2024 daemon.err nginx[5819]: no file '/usr/lib/lua/loadall.so') in /etc/nginx/uci.conf:55
Fri Oct 11 11:56:29 2024 daemon.info procd: Instance nginx::instance1 s in a crash loop 6 crashes, 0 seconds since last crash.
If OpenResty modules are required for Nginx to function together with nginx-mod-lua, why are they not installed and why are they not in the package manager? Why install Luajit, which is not well suited to work with OpenResty? https://downloads.openwrt.org/snapshots/packages/x86_64/packages/ has the required packages: nginx-mod-lua-resty-lrucache, nginx-mod-lua-resty-core and luajit2 but they are not compatible with OpenWrt version 23.05.4. I hope that the problem will be solved
OpenWrt version
r24012-d8dd03c46f
OpenWrt release
23.05.4
OpenWrt target/subtarget
x86/64
Device
VMware, Inc. VMware Virtual Platform
Image kind
Official downloaded image
Steps to reproduce
No response
Actual behaviour
No response
Expected behaviour
No response
Additional info
No response
Diffconfig
No response
Terms
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the nginx-mod-lua package metadata and the module paths under /etc/nginx/module.d and /etc/nginx/uci.conf, then compare its dependencies with the listed snapshot packages. Confirm the compatible resty modules and LuaJIT package are available for OpenWrt 23.05.4 and that nginx starts without the resty.core error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100