After updating the lua-resty-core library to version 0.1.28, I encountered a critical startup issue with Nginx version 1.24.0. The error message indicates a failure to load the 'resty.core' module, as outlined below: nginx: [alert] 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: /usr/local/share/lua/5.1/resty/core/base.lua:24: ngx_http_lua_module 0.10.26 required) in /usr/local/etc/nginx/nginx.conf:1044 The error suggests that the current version of the ngx_http_lua_module (v0.10.25) is incompatible with the latest lua-resty-core update, which requires ngx_http_lua_module version 0.10.26. To address this compatibility issue I recommend updating the Nginx port's Makefile.extmod to use the compatible version of the ngx_http_lua_module. Current Configuration Line: openresty:lua-nginx-module:v0.10.25:lua Suggested Change: openresty:lua-nginx-module:v0.10.26:lua
Add osa@
(In reply to Ryan Steinmetz from comment #1) Hi Ryan, I'd recommend to update third-party lua module to its recent version. Thank you.
(In reply to Sergey A. Osokin from comment #2) Agreed. Pending joneum@.
Created attachment 248577 [details] Patch to update ngx_http_lua_module version
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=51f2e5e1228ddfa53ac91a51f1b68273d1bce45c commit 51f2e5e1228ddfa53ac91a51f1b68273d1bce45c Author: Christos Chatzaras <chris@cretaforce.gr> AuthorDate: 2024-02-21 19:14:26 +0000 Commit: Florian Smeets <flo@FreeBSD.org> CommitDate: 2024-02-21 19:21:20 +0000 www/nginx: Fix nginx with LUA after lua-resty-core update In f08bfacc8fd6 lua-resty-core was updated this requires an updated version of openresty-lua-nginx-module. To prevent further people from bricking their nginx update the openresty-lua-nginx-module 3rd party module to 0.10.26. Otherwise people will find an nginx that does not start anymore with the following error message: nginx: [alert] 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: /usr/local/share/lua/5.1/resty/core/base.lua:24: ngx_http_lua_module 0.10.26 required) in /usr/local/etc/nginx/nginx.conf:1044 PR: 277145 Approved by: portmgr (blanket, just fix it) www/nginx/Makefile | 2 +- www/nginx/Makefile.extmod | 2 +- www/nginx/distinfo | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
I ran into this myself yesterday evening. I just committed the fix. Thanks.
(In reply to Florian Smeets from comment #6) Thanks a lot for getting the patch in! Can you think of a way to prevent this from happening again? It was quite unpleasant for us (took a bit to find out what was actually going on) and it's not the first time this precise issue has cropped up. I suspect it can only be verified by actually spinning up the nginx binary with an appropriate configuration, but could the nginx port pick up the correct version from the lua-* ports?
(In reply to Eirik Oeverby from comment #7) joneum@, Can I have future approval for updates to the ngx_http_lua_module to ensure these are always in sync?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d08dcf215d0bae3642cb0837f3272070188908f2 commit d08dcf215d0bae3642cb0837f3272070188908f2 Author: Ryan Steinmetz <zi@FreeBSD.org> AuthorDate: 2024-08-20 13:50:13 +0000 Commit: Ryan Steinmetz <zi@FreeBSD.org> CommitDate: 2024-08-20 13:53:15 +0000 www/(nginx|nginx-devel|lua-resty-core): Document lua module dependencies/alternate maintainers PR: 280882, 277145 www/lua-resty-core/Makefile | 2 ++ www/nginx-devel/Makefile.extmod | 1 + www/nginx/Makefile.extmod | 1 + 3 files changed, 4 insertions(+)