openresty / openresty/lua-resty-core

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: module 'resty.core' not found:

Open
#452 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
853
Forks
286
Avg merge
35m
Merged PRs (30d)
1

Description

we are trying to update our nginx from 1.20 to 1.24 or 1.25 with latest lua nginx. but facing issue in doing so .

Using the latest stable version
https://github.com/openresty/lua-nginx-module/archive/refs/tags/v0.10.26rc1.tar.gz

I am using nginx :
Nginx:
https://nginx.org/packages/mainline/rhel/8/SRPMS/nginx-1.25.3-1.el8.ngx.src.rpm

Luajit:
wget https://github.com/openresty/luajit2/archive/refs/tags/v2.1-20231117.tar.gz

Lua-nginx:
https://github.com/openresty/lua-nginx-module/archive/refs/tags/v0.10.25.tar.gz

njs version:
https://github.com/nginx/njs/archive/refs/tags/0.8.2.tar.gz

I am getting error
nginx: [warn] lua_load_resty_core is deprecated (the lua-resty-core library is required since ngx_lua v0.10.16) in /etc/nginx/nginx.conf:58 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:43 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:43 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:44 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:44 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:836 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:836 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:837 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:837 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1009 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1009 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1010 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1010 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1562 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1562 2023/12/18 09:08:27 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1563 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/infra.conf:1563 2023/12/18 09:08:27 [alert] 1#1: 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: no field package.preload['resty.core'] no file '/etc/nginx/webui/lua/callhome/resty/core.lua' no file '/etc/nginx/webui/lua/hostadmin-mfa/resty/core.lua' no file '/etc/nginx/webui/lua/common/resty/core.lua' no file '/etc/nginx/webui/lua/eca/resty/core.lua' no file '/etc/nginx/webui/lua/fips-compliance-check/resty/core.lua' no file '/etc/nginx/webui/lua/smtp/resty/core.lua' no file '/etc/nginx/webui/lua/smart-card/resty/core.lua' no file './resty/core.lua' no file '//share/luajit-2.1/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 '//share/lua/5.1/resty/core.lua' no file '//share/lua/5.1/resty/core/init.lua' no file './resty/core.so' no file '/usr/local/lib/lua/5.1/resty/core.so' no file '//lib/lua/5.1/res in /etc/nginx/nginx.conf:151 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: module 'resty.core' not found: no field package.preload['resty.core'] no file '/etc/nginx/webui/lua/callhome/resty/core.lua' no file '/etc/nginx/webui/lua/hostadmin-mfa/resty/core.lua' no file '/etc/nginx/webui/lua/common/resty/core.lua' no file '/etc/nginx/webui/lua/eca/resty/core.lua' no file '/etc/nginx/webui/lua/fips-compliance-check/resty/core.lua' no file '/etc/nginx/webui/lua/smtp/resty/core.lua' no file '/etc/nginx/webui/lua/smart-card/resty/core.lua' no file './resty/core.lua' no file '//share/luajit-2.1/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 '//share/lua/5.1/resty/core.lua' no file '//share/lua/5.1/resty/core/init.lua' no file './resty/core.so' no file '/usr/local/lib/lua/5.1/resty/core.so' no file '//lib/lua/5.1/res in /etc/nginx/nginx.conf:151

From lines from error "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: module 'resty.core' not found:"
It is suggesting to use complete openresty package from https://openresty.org/en/download.html
Can we just use resty.core module insted of whole package? If yes which version should i pick?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /etc/nginx/nginx.conf around lines 58 and 151, then review the listed nginx, lua-nginx-module, LuaJIT, and njs versions alongside the reported Lua module search paths. Determine the compatible way to provide resty.core without the load failure; done means the selected setup starts without the alert.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.