Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • aports aports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 656
    • Issues 656
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 337
    • Merge requests 337
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpinealpine
  • aportsaports
  • Issues
  • #10478
Closed
Open
Issue created May 21, 2019 by Zach van Rijn@z

Package 'nginx-mod-http-lua' breaks nginx

Recent versions of nginx-mod-http-lua have broken nginx with the default configuration. There has been much activity on this package lately, and therefore it is not easy to pinpoint the breaking change.

A related discussion has determined that one must add lua_load_resty_core off; to the nginx configuration.

I have tested this issue on Alpine 3.8 and 3.9 as of 2019-05-19.

To Reproduce:

  1. Launch a fresh copy of Alpine, update and upgrade.
  2. # apk add nginx-mod-http-lua
  3. # nginx

You will be greeted with something like:

nginx: [alert] 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)
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:                 
        no field package.preload['resty.core']
        no file './resty/core.lua'
        no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
        no file '/usr/local/share/lua/5.1/resty/core.lua'
        no file '/usr/local/share/lua/5.1/resty/core/init.lua'
        no file '/usr/share/lua/5.1/resty/core.lua'
        no file '/usr/share/lua/5.1/resty/core/init.lua'
        no file '/usr/share/lua/common/resty/core.lua'
        no file '/usr/share/lua/common/resty/core/init.lua'
        no file './resty/core.so'
        no file '/usr/local/lib/lua/5.1/resty/core.so'
        no file '/usr/lib/lua/5.1/resty/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/usr/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')
nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)

One might think we need to install OpenResty:

# apk add $(apk search resty | awk F’[]’ ‘{print $1 “-” $2 “-” $3}’)

This does not resolve the issue. It appears that we need lua-resty-core, but this is not packaged on Alpine at this time.

Possible Workaround:

If we instead add lua_load_resty_core off; to the nginx http { } configuration, we still get the OpenResty warning above, but not the missing libraries, and nginx starts as expected.

A better solution would be to fix the package. This type of issue catches system administrators by surprise and can be incredibly frustrating.

ZV

(from redmine: issue id 10478, created on 2019-05-21)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking