Hello. I`a updated nginx up to versionnginx-1.22.1_1,3. Nginx with lua support. # nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful # service nginx start Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx. 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:23: ngx_http_lua_module 0.10.22 required) in /usr/local/etc/nginx/nginx.conf:76 /usr/local/etc/rc.d/nginx: WARNING: failed to start nginx # nginx -V nginx version: nginx/1.22.1 built with OpenSSL 1.1.1o-freebsd 3 May 2022 TLS SNI support enabled configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --user=www --group=www --with-compat --with-pcre --modules-path=/usr/local/libexec/nginx --with-file-aio --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx/access.log --with-http_v2_module --with-http_addition_module --with-http_auth_request_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-cc-opt='-DNGX_HAVE_INET6=0 -I /usr/local/include' --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --without-pcre2 --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-stream=dynamic --add-dynamic-module=/usr/ports/www/nginx/work/ngx_devel_kit-0.3.1 --add-dynamic-module=/usr/ports/www/nginx/work/lua-nginx-module-0.10.21 Installed programs: # pkg version -v | egrep "lua|nginx" lua-resty-core-0.1.24 = up-to-date with index lua-resty-lrucache-0.13 = up-to-date with index lua53-5.3.6 = up-to-date with index luajit-openresty-2.1.20220915 = up-to-date with index nginx-1.22.1_1,3 = up-to-date with index How to fix? Rollback to old version of nginx-1.22.0_9,3? To return the version lua-resty-core-0.1.23. This version lua-resty-core-0.1.23|nginx-1.22.0_9,3 works without errors.
-add-dynamic-module=/usr/ports/www/nginx/work/lua-nginx-module-0.10.21
Cc: maintainer of www/lua-resty-core <https://test.freshports.org/www/lua-resty-core/>
Perhaps the developer of the nginx port forgot to update the module, I think so.
Please ignore the test URL in comment #2. Instead: <https://www.freshports.org/www/lua-resty-core/>
Created attachment 237709 [details] nginx.diff Update lua-nginx-module to v0.10.22 bugfix: did not wakeup coroutine when worker thread finished.
How to update correctly?
(In reply to bagas from comment #6) git apply nginx.diff
(In reply to Dmitry Wagin from comment #7) and build from ports or poudriere
in file /usr/ports/www/nginx/Makefile.extmod LUA_GH_TUPLE= openresty:lua-nginx-module:v0.10.21:lua LUA_VARS= DSO_EXTMODS+=lua change to LUA_GH_TUPLE= openresty:lua-nginx-module:v0.10.22:lua LUA_VARS= DSO_EXTMODS+=lua right?
(In reply to bagas from comment #9) See attached patch: https://bz-attachments.freebsd.org/attachment.cgi?id=237709
Works, thanks.
Add www/nginx maintainer. I just ran into this myself. www/nginx-devel already includes lua-nginx-module:v0.10.22, www/nginx still has 0.10.21.
Why didn't add edits to the port? I have to to patch the port manually.
Same problem here, bumping openresty:lua-nginx-module dependency to 0.10.22 as per patch fixes the ixssue.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=48a7ce510ad18eea66a32b0b8e9a69e9a564ee1a commit 48a7ce510ad18eea66a32b0b8e9a69e9a564ee1a Author: bagas <bagas1983@mail.ru> AuthorDate: 2022-11-10 19:27:41 +0000 Commit: Florian Smeets <flo@FreeBSD.org> CommitDate: 2022-11-10 19:42:31 +0000 www/nginx: Fix nginx after lua-resty-core update Update 3rd party module ngx_http_lua_module to 0.10.22 otherwise nginx fails to start 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:23: ngx_http_lua_module 0.10.22 required) in /usr/local/etc/nginx/nginx.conf:76 This has been broken for almost two weeks, use the "Trivial and tested build and runtime fixes" blanket from 22.8.1 of the committers guide to prevent more people from breaking their production setups. nginx-devel already has version 0.10.22 of the module. PR: 267418 www/nginx/Makefile | 2 +- www/nginx/Makefile.extmod | 2 +- www/nginx/distinfo | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
(In reply to commit-hook from comment #15) if you take care of my port without asking me, then also edit the PR properly
(In reply to Jochen Neumeister from comment #16) So what about 2022Q4 then? I cannot cherry-pick this change as there are conflicts, because 1.22.1 hasn't been merged to quarterly. Looking at the update it mentions a security fix, which makes me wonder why it hasn't been merged? I'm happy to let you take care of it, but please do so. People upgrading nginx and then realizing nginx does not start after the update is quite a bad situation to be in. Also I added you to cc of the PR on the 30th, which hardly fits the description of "not asking you" about "your" port... Let me know how you want to proceed.
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b36da0c4991dd77a4fbc08bff5087264279e4972 commit b36da0c4991dd77a4fbc08bff5087264279e4972 Author: bagas <bagas1983@mail.ru> AuthorDate: 2022-11-10 19:27:41 +0000 Commit: Florian Smeets <flo@FreeBSD.org> CommitDate: 2022-11-14 18:06:39 +0000 www/nginx: Fix nginx after lua-resty-core update Update 3rd party module ngx_http_lua_module to 0.10.22 otherwise nginx fails to start 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:23: ngx_http_lua_module 0.10.22 required) in /usr/local/etc/nginx/nginx.conf:76 This has been broken for almost two weeks, use the "Trivial and tested build and runtime fixes" blanket from 22.8.1 of the committers guide to prevent more people from breaking their production setups. nginx-devel already has version 0.10.22 of the module. PR: 267418 (cherry picked from commit 48a7ce510ad18eea66a32b0b8e9a69e9a564ee1a) www/nginx/Makefile | 2 +- www/nginx/Makefile.extmod | 2 +- www/nginx/distinfo | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Still no reply from the maintainer so I went ahead and MFHed the change, without the last nginx sec fix. www/nginx-full should probably also get its PORTREVISION bumped, but fixing www/nginx was most important to me, leave the rest to the maintainer.