openresty / openresty/lua-resty-core

Error : failed to run balancer_by_lua*: /usr/local/lib/lua/resty/core/base.lua:24: ngx_http_lua_module 0.10.19 or 0.10.20 required

Open
#359 2 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

Why curl localhost always return "500 Internal Server Error".
I followed the example of ngx.balancer :
https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md

Error : failed to run balancer_by_lua*: /usr/local/lib/lua/resty/core/base.lua:24: ngx_http_lua_module 0.10.19 or 0.10.20 required
stack traceback:
[C]: in function 'error'
/usr/local/lib/lua/resty/core/base.lua:24: in main chunk
[C]: in function 'require'
/usr/local/lib/lua/ngx/balancer.lua:4: in main chunk
[C]: in function 'require'
balancer_by_lua:2: in main chunk while connecting to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "localhost"

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 the ngx.balancer documentation linked in the issue, then inspect lib/resty/core/base.lua and lib/ngx/balancer.lua around the reported require path. Reproduce the curl request and compare the installed ngx_http_lua_module version with the requirement shown in the error; done means the example runs without the 500 response or the compatibility limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.