openresty / openresty/lua-upstream-nginx-module

module 'ngx.upstream' not found in openresty 1.13.6

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
512
Forks
153
Avg merge
1h 29m
Merged PRs (30d)
2

Description

when I run the lua code like this:
stream{ preread_by_lua_block{ local upstream = require("ngx.upstream") ... } }
nginx throw the error: module 'ngx.upstream' not found

should I install the module upstream or is it a bug in openresty 1.13.3?

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 by reproducing the require("ngx.upstream") call inside stream.preread_by_lua_block on the reported OpenResty versions. Check how lua-upstream-nginx-module is built and loaded for stream contexts, then compare the result with its documented scope. Done means determining whether the module is supported there and documenting the required setup or confirming a compatibility bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua, nginx
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.