Giter Site home page Giter Site logo

Comments (21)

oerdnj avatar oerdnj commented on August 17, 2024

@dingobits Are you willing to beta-test the new repository with separated modules? I am starting to work on this and I need someone to test this.

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

WIP repositories:

from deb.sury.org.

dingobits avatar dingobits commented on August 17, 2024

Thanks for the great work! I'm trying the mainline nginx-core and nginx-full package on Debian bookworm, and everything is so far so good. I don't use every nginx module so I don't know what I can test that's not covered by the standard test suite. Let me know what I can help with if you need any.

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

Thanks for the testing. I’ll swap the contents next week.

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

I’ll swap the contents next week.

means: Next week we'll use https://packages.sury.org/nginx/ or should we stay on https://packages.sury.org/nginx-qa/?

(Switching from /nginx/ to /nginx-qa/ resolved upgrade issues on our bookworms)

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

nginx-qa will be removed, so switch back to just nginx

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

sorry to bother, I still having problems with updating existing nginx installations in bookworm.

A fresh install of Debian Bookworm works fine with https://packages.sury.org/nginx/

$ apt install nginx-extras

results in correct package versions:

dpkg -l |grep nginx
ii  libnginx-mod-http-auth-pam            1:1.5.5+1.24.0-2+0~20240226.3+debian12~1.gbpc07838                   amd64        PAM authentication module for Nginx
ii  libnginx-mod-http-cache-purge         1:2.3+1.24.0-7~20240226.1+debian12                                   amd64        Purge content from Nginx caches
ii  libnginx-mod-http-dav-ext             1:3.0.0+1.24.0-5+0~20240226.1+debian12~1.gbp2ebee6                   amd64        WebDAV missing commands support for Nginx
ii  libnginx-mod-http-echo                1:0.63+1.24.0-6+0~20240226.1+debian12~1.gbp641470                    amd64        Bring echo and more shell style goodies to Nginx
ii  libnginx-mod-http-fancyindex          1:0.5.2+1.24.0-5+0~20240226.1+debian12~1.gbpc55420                   amd64        Fancy indexes module for the Nginx
ii  libnginx-mod-http-geoip               1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        GeoIP HTTP module for Nginx
ii  libnginx-mod-http-geoip2              1:3.4+1.24.0-5+0~20240226.1+debian12~1.gbpf3955f                     amd64        GeoIP2 HTTP module for Nginx
ii  libnginx-mod-http-headers-more-filter 1:0.37+1.24.0-2+0~20240226.1+debian12~1.gbp554baf                    amd64        Set and clear input and output headers for Nginx
ii  libnginx-mod-http-image-filter        1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        HTTP image filter module for Nginx
ii  libnginx-mod-http-lua                 1:0.10.26+1.24.0-2+0~20240226.2+debian12~1.gbp890c46                 amd64        Lua module for Nginx
ii  libnginx-mod-http-ndk                 1:0.3.3+1.24.0-1+0~20240226.1+debian12~1.gbp4eef54                   amd64        Nginx Development Kit module
ii  libnginx-mod-http-perl                1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        Perl module for Nginx
ii  libnginx-mod-http-subs-filter         1:0.6.4+1.24.0-6+0~20240226.1+debian12~1.gbpd1bc1d                   amd64        Substitution filter module for Nginx
ii  libnginx-mod-http-uploadprogress      1:0.9.2+1.24.0-5+0~20240226.1+debian12~1.gbp741e9d                   amd64        Upload progress system for Nginx
ii  libnginx-mod-http-upstream-fair       1:0.0~git20120408.a18b409+1.24.0-5+0~20240226.1+debian12~1.gbp76b535 amd64        Nginx Upstream Fair Proxy Load Balancer
ii  libnginx-mod-http-xslt-filter         1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        XSLT Transformation module for Nginx
ii  libnginx-mod-mail                     1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        Mail module for Nginx
ii  libnginx-mod-nchan                    1:1.3.6+dfsg+1.24.0-4+0~20240226.1+debian12~1.gbpda3c7f              amd64        Fast, flexible pub/sub server for Nginx
ii  libnginx-mod-stream                   1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        Stream module for Nginx
ii  libnginx-mod-stream-geoip             1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        GeoIP Stream module for Nginx
ii  libnginx-mod-stream-geoip2            1:3.4+1.24.0-5+0~20240226.1+debian12~1.gbpf3955f                     amd64        GeoIP2 Stream module for Nginx
ii  nginx                                 1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        small, powerful, scalable web/proxy server
ii  nginx-common                          1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          all          small, powerful, scalable web/proxy server - common files
ii  nginx-extras                          1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b                          amd64        nginx web/proxy server (extended version)

however another install from yesterday (2024-02-26) with https://packages.sury.org/nginx/ resulted in the following:

dpkg -l|grep nginx
ii  libnginx-mod-brotli                   1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Brotli lossless compression support for Nginx
ii  libnginx-mod-http-auth-pam            1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        PAM authentication module for Nginx
ii  libnginx-mod-http-cache-purge         1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Purge content from Nginx caches
ii  libnginx-mod-http-dav-ext             1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        WebDAV missing commands support for Nginx
ii  libnginx-mod-http-echo                1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Bring echo and more shell style goodies to Nginx
ii  libnginx-mod-http-fancyindex          1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Fancy indexes module for the Nginx
ii  libnginx-mod-http-geoip               1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        GeoIP HTTP module for Nginx
ii  libnginx-mod-http-geoip2              1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        GeoIP2 HTTP module for Nginx
ii  libnginx-mod-http-headers-more-filter 1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Set and clear input and output headers for Nginx
ii  libnginx-mod-http-image-filter        1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        HTTP image filter module for Nginx
ii  libnginx-mod-http-lua                 1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Lua module for Nginx
ii  libnginx-mod-http-ndk                 1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Nginx Development Kit module
ii  libnginx-mod-http-perl                1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Perl module for Nginx
ii  libnginx-mod-http-subs-filter         1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Substitution filter module for Nginx
ii  libnginx-mod-http-uploadprogress      1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Upload progress system for Nginx
ii  libnginx-mod-http-upstream-fair       1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Nginx Upstream Fair Proxy Load Balancer
ii  libnginx-mod-http-xslt-filter         1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        XSLT Transformation module for Nginx
ii  libnginx-mod-mail                     1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Mail module for Nginx
ii  libnginx-mod-nchan                    1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Fast, flexible pub/sub server for Nginx
ii  libnginx-mod-ssl-ct                   1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Certificate Transparency support for Nginx
ii  libnginx-mod-stream                   1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        Stream module for Nginx
ii  libnginx-mod-stream-geoip             1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        GeoIP Stream module for Nginx
ii  libnginx-mod-stream-geoip2            1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        GeoIP2 Stream module for Nginx
ii  nginx-common                          1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc all          small, powerful, scalable web/proxy server - common files
ii  nginx-extras                          1.24.0-1+0~20230615.28+debian12~1.gbpd7c5fc amd64        nginx web/proxy server (extended version)

now I try hard to update the packages to the latest version, which always fails with dependency problems like:

Errors were encountered while processing:
 nginx
 libnginx-mod-http-headers-more-filter
 libnginx-mod-http-image-filter
 libnginx-mod-stream
 libnginx-mod-http-upstream-fair
 nginx-common
 libnginx-mod-stream-geoip
 libnginx-mod-http-uploadprogress
 libnginx-mod-http-xslt-filter
 libnginx-mod-http-auth-pam
 libnginx-mod-http-geoip
 libnginx-mod-nchan
 libnginx-mod-http-ndk
 libnginx-mod-http-cache-purge
 libnginx-mod-http-echo
 libnginx-mod-http-subs-filter
 libnginx-mod-http-perl
 libnginx-mod-http-geoip2
 libnginx-mod-http-lua
 nginx-extras
 libnginx-mod-stream-geoip2
 libnginx-mod-http-dav-ext
 libnginx-mod-mail
 libnginx-mod-http-fancyindex
E: Sub-process /usr/bin/dpkg returned an error code (1)

with first error shown as:

Setting up lua-resty-lrucache (0.13-10+0~20240226.1+debian12~1.gbp686f29) ...
Setting up debsuryorg-archive-keyring (2024.02.05+0~20240226.2+debian12~1.gbp343037) ...
Setting up nginx (1.24.0-2+0~20240226.30+debian12~1.gbp2cd02b) ...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
invoke-rc.d: initscript nginx, action "start" failed.
× nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-02-27 20:13:15 CET; 9ms ago
   Duration: 3min 25.517s
       Docs: man:nginx(8)
    Process: 4454 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 4ms

Feb 27 20:13:15 debian12 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Feb 27 20:13:15 debian12 nginx[4454]: 2024/02/27 20:13:15 [emerg] 4454#4454: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
Feb 27 20:13:15 debian12 nginx[4454]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 27 20:13:15 debian12 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Feb 27 20:13:15 debian12 systemd[1]: nginx.service: Failed with result 'exit-code'.
Feb 27 20:13:15 debian12 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
dpkg: error processing package nginx (--configure):
 installed nginx package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libnginx-mod-http-headers-more-filter:
 libnginx-mod-http-headers-more-filter depends on nginx-abi-1.24.0-1; however:
  Package nginx-abi-1.24.0-1 is not installed.
  Package nginx which provides nginx-abi-1.24.0-1 is not configured yet.

(will attach full transcript transcript.txt)

What I tried so far is to remove and purge the packages and reinstall them, but that still fails with the same error.
My trials included both apt remove and apt purge with single packages or even a list of all packages.

Any hints on what I am missing here?

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

open() "/etc/nginx/nginx.conf"

Missing config file for the log above?

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

well apt purge should remove it while apt install should add it. The root issue is that apt update keeps back newer packages and apt install fails to install them manually.

This is the case on bookworm hosts that installed nginx before today, while updating. Other hosts that I installed today from scratch just work fine. Also all older debian hosts updated today without issues.

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

Feb 27 20:13:15 debian12 nginx[4454]: 2024/02/27 20:13:15 [emerg] 4454#4454: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

Again, the installation of new nginx package has failed because you are missing the configuration file. It's not the packages, it's your system that's broken.

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

here is a transcript of a simple apt upgrade && apt full-upgrade scenario to resolve uninstalled packages that are kept back by apt upgrade. Alle config files are in place and they work fine with a fresh install.

(I am recovering from snapshots between each trial to reproduce the initial state of that host)

transcript-upgrade.txt

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

This is a different log. Disable the lua module before upgrade and then re-enable it after full upgrade. That should help.

Feb 27 21:25:31 debian12 nginx[8284]: 2024/02/27 21:25:31 [emerg] 8284#8284: dlopen() "/usr/share/nginx/modules/ngx_http_lua_module.so" failed (/usr/share/nginx/modules/ngx_http_lua_module.so: undefined symbol: lua_setexdata) in /etc/nginx/modules-enabled/50-mod-http-lua.conf:1

But for the sake of sanity, what's the output of ldd /usr/share/nginx/modules/ngx_http_lua_module.so?

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

Ok thanks, the upgrade was seamless with http_lua disabled. Output of ldd is:

root@debian12 ➜  nginx git:(master) ldd /usr/share/nginx/modules/ngx_http_lua_module.so
	linux-vdso.so.1 (0x00007fffb6bd4000)
	libluajit-5.1.so.2 => /lib/x86_64-linux-gnu/libluajit-5.1.so.2 (0x00007f2bc284a000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2bc2669000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2bc258a000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2bc256a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2bc295e000)

reenabling crashes nginx again:

root@debian12 ➜  modules-enabled git:(master) mv 50-mod-http-lua.conf.disabled 50-mod-http-lua.conf
root@debian12 ➜  modules-enabled git:(master) ✗ nginx -t
2024/02/27 21:59:18 [emerg] 8981#8981: dlopen() "/usr/share/nginx/modules/ngx_http_lua_module.so" failed (/usr/share/nginx/modules/ngx_http_lua_module.so: undefined symbol: lua_setexdata) in /etc/nginx/modules-enabled/50-mod-http-lua.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

full transcript attached
transcript-disable-lua.txt

Can I help with any further info?

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

Do you have libluajit-5.1-2 or libluajit2-5.1-2 installed?

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

looks like to be installed:

root@debain12 ➜  modules-enabled git:(master) ✗ dpkg -l |grep libluajit
ii  libluajit-5.1-2:amd64                 2.1.0~beta3+git20220320+dfsg-4.1                                     amd64        Just in time compiler for Lua - library version
ii  libluajit-5.1-common                  2.1.0~beta3+git20220320+dfsg-4.1                                     all          Just in time compiler for Lua - common files

btw: ldd on the fresh installed host:

root@XXX-01 ➜  nginx git:(master) ldd /usr/share/nginx/modules/ngx_http_lua_module.so
	linux-vdso.so.1 (0x00007ffd037c2000)
	libluajit-5.1.so.2 => /lib/x86_64-linux-gnu/libluajit-5.1.so.2 (0x00007f02e55a1000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f02e53c0000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f02e52e1000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f02e52c1000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f02e56b8000)

and also has libluajit installed:

root@XXX-01 ➜  nginx git:(master) dpkg -l|grep libluajit
ii  libluajit2-5.1-2:amd64                2.1-20230119-1                                                       amd64        OpenResty-maintained branch of LuaJIT (shared objects)
ii  libluajit2-5.1-common                 2.1-20230119-1                                                       all          OpenResty-maintained branch of LuaJIT (common files)

...but another version. Dependency issue?

from deb.sury.org.

oerdnj avatar oerdnj commented on August 17, 2024

The luajit situation in Debian is little bit of mess right now. Install the other version on the broken host and you should be fine for the moment. I'll think of what to do with the luajit vs luajit2 packages in the repositories at least.

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

I see, openresty vs. debian... well installation of luajit2 worked (with a little warning) and nginx -t is is fine again. Thank you very much for your work!

At least that workaround is addressable by an ansible-playbook...

fwiw: output from manual install:

apt install libluajit2-5.1-2 libluajit2-5.1-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libluajit-5.1-2 libluajit-5.1-common
The following NEW packages will be installed:
  libluajit2-5.1-2 libluajit2-5.1-common
0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 305 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://debian.uscreen.net/debian bookworm/main amd64 libluajit2-5.1-2 amd64 2.1-20230119-1 [258 kB]
Get:2 http://debian.uscreen.net/debian bookworm/main amd64 libluajit2-5.1-common all 2.1-20230119-1 [46.6 kB]
Fetched 305 kB in 0s (1,099 kB/s)
dpkg: libluajit-5.1-2:amd64: dependency problems, but removing anyway as you requested:
 lua-resty-lrucache depends on libluajit2-5.1-2 | libluajit-5.1-2; however:
  Package libluajit2-5.1-2 is not installed.
  Package libluajit-5.1-2:amd64 is to be removed.
 lua-resty-core depends on libluajit2-5.1-2 | libluajit-5.1-2; however:
  Package libluajit2-5.1-2 is not installed.
  Package libluajit-5.1-2:amd64 is to be removed.
 libnginx-mod-http-lua depends on libluajit2-5.1-2 (>= 2.1-20220411) | libluajit-5.1-2 (>= 2.1.0~beta3); however:
  Package libluajit2-5.1-2 is not installed.
  Package libluajit-5.1-2:amd64 is to be removed.

from deb.sury.org.

mashpie avatar mashpie commented on August 17, 2024

Meanwhile, I can confirm that workaround has been working without issues on a number debian12 hosts. No need to disable lua or tweak existing config files. Just 2 extra prerequisites:

apt update
apt install libluajit2-5.1-2 libluajit2-5.1-common
apt full-upgrade

from deb.sury.org.

nta avatar nta commented on August 17, 2024

Related to this refactor, it appears the current builds of libnginx-mod-http-lua for Ubuntu jammy (at least 1:0.10.26-2+ubuntu22.04.1+deb.sury.org+4) are built with OPENRESTY_LUAJIT disabled (probably as they are built with mainline LuaJIT, not the fork), while the ondrej/nginx PPA still contains the OpenResty fork of LuaJIT, leading to "no request found" errors if having the forked LuaJIT installed, since lua-resty-core will fetch the request from exdata if exdata is supported.

As a workaround I explicitly installed the Ubuntu-packaged version of libluajit-5.1-2, but once the module is fixed this workaround will (obviously) break again.

from deb.sury.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.