openresty / openresty/lua-resty-dns
error: .../modules/lua-resty-dns-master/lib/resty/dns/resolver.lua:92: attempt to call local 'new_tab' (a table value)
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 338
- Forks
- 107
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 2
Description
hi, when I try to use this module it got me this error:
nginx: [error] init_by_lua error: .../modules/lua-resty-dns-master/lib/resty/dns/resolver.lua:92: attempt to call local 'new_tab' (a table value)
stack traceback:
.../modules/lua-resty-dns-master/lib/resty/dns/resolver.lua:92: in main chunk
[C]: in function 'require'
init_by_lua:2: in main chunk
the configuration that I use in nginx.conf is :
lua_package_path "/etc/nginx/modules/lua-resty-dns-master/lib/resty/dns/resolver.lua";
Is there something that I doing wrong? Thanks.
Update: is it need to use lua 5.2.3? because my current lua version is 5.1.4
Update: this issues is resolved by not using require "resty.dns.resolver" in init_by_lua_block. THanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/resty/dns/resolver.lua at line 92 and compare how it is loaded from nginx.conf through lua_package_path and init_by_lua_block. The issue is resolved when the configuration guidance explains the supported loading pattern and avoids the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100